Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
453 views

Hello I got this problem yesterday at work, and i worked few extra hours to solve it and I couldn't, please read the following scenario. 
 
1-a radgrid with multiselection rows set to "false", a button to modify and another to add data to the grid, all(2 buttons and the radgrid) exist in the same UpdatePanel(the classical one),  
 
2-the user will select a row,press the modify button, a rad window will open(using radwindow and radwindowmanager

(note: i tried to place the rad windowmanager is outside and inside the update panel , and i also tried to remove the whole updatepanel)
 
3- radwindow property to postback the parent page after closing it is set to "true". when the user saves his changes using the save button in the radWindow, the changes is saved successfully. and for more insuring; after the modification done successfully and before closing the rad grid, the parent page is forced to be refreshed using JavaScript, the same function that is used in telerik forum. 
 
so the parent page is refreshed twice , one after the modifications is completed, and another after closing the radwindow. 
 
the problem is after the rad window is closed, the radgrid selected index change event doesn't always  fire when selecting a row and if it does,  an out of index exception is fired because the count of the selected rows is Zero !! so the event is fired , but no row is selected inside the code.
 
and another question. isn't there any direct way to know the selected index immediately when multirow selection is set to "false".?

Veli
Telerik team
 answered on 26 Apr 2010
1 answer
104 views

I can't understand is this bug or feature:
I can select row by clicking on check box cell with Shift button pushing, but can't unselect row by clicking on check box with pushing Shift button.

Bug (feature) raise under IE only.
Steps:

1)       Open http://demos.telerik.com/aspnet-ajax/grid/examples/client/selecting/defaultcs.aspx (Second grid)

2)       Select rows by clicking on checkbox with Shift button

3)       Try to unselect row by clicking on check box wit a Shift 
4)     Result: row is selected , but check box
checkbox is unchecked
 

My actual version RadControls for ASP.NET AJAX Q2 2009 SP1, but this behaviour is the same in latest release

Yavor
Telerik team
 answered on 26 Apr 2010
1 answer
75 views
Hi,

I want develop application like below link

http://www.bookmeetingroom.com/software-screenshots

whats the best sample and code which is related to this kind of application.

Can i have some link?

krds
lakmal

Shinu
Top achievements
Rank 2
 answered on 26 Apr 2010
4 answers
274 views
Hi,

I want to get the ID of the radgrid on delete and edit command.

i tried e.item.parent.uniqueid but i am getting something like this: "ctl00$ContentPlaceHolder1$grdName$ctl00$ctl00"

I just want to get the "grdName" part without parsing the string. thanks.
Web team
Top achievements
Rank 1
 answered on 26 Apr 2010
2 answers
127 views
I'm unable to access my RadEditor using client-side Javascript functions when I use a Master Page.  The identical code works fine when it's not set in a Master Page.  (This is a super-simple example, lifted straight from Telerik's demos.)

The code for the page is here:

<%@ Page Title="" Language="C#" MasterPageFile="~/AltMasterPage.master" AutoEventWireup="true" CodeFile="Test2.aspx.cs" Inherits="Documentation_Test2" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="SecondLevelHeadContent" Runat="Server">
    <script type="text/javascript">
        function SetHtml() {
            var newValue = $get('textHtml').value;
            $find("RadEditor1").set_html(newValue);
        }
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SecondLevelBodyContent" Runat="Server">
     <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
     <telerik:RadEditor ID="RadEditor1" runat="server" />
     <div class="module">
     <input type="button" value="Set New Html to the RadEditor" onclick="SetHtml()"/>
     <input type="text" value="New HTML" id="textHtml" />
     </div>     
</asp:Content>

And for the Master Page is here:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="AltMasterPage.master.cs" Inherits="MasterPage" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <asp:ContentPlaceHolder id="SecondLevelHeadContent" runat="server" />
</head>
<body>
    <form id="form1" runat="server">               
        <asp:ContentPlaceHolder id="SecondLevelBodyContent" runat="server" />
    </form>
</body>
</html>

The Javascript error thrown is: 
$find("RadEditor1") is null  

The exact same code works like a champ if it's in an ASPX file that doesn't reference a Master Page.  What's going on?

Thanks,

Jesse

Jesse Lawler
Top achievements
Rank 1
 answered on 26 Apr 2010
2 answers
159 views
I want to create a page with a toolbar on it and a 'single' pane of content (that is, no obvious splitterbar) but with a sliding panel that appears when a toolbar button is clicked.

I can get the majority of it working, but I can't seem to hide the slidingpane's tab when it's collapsed so there's always a margin on 'unused' space.

Can this actually be done?

--
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 25 Apr 2010
2 answers
102 views

Ajax - Rotator : Why display jpeg is not the first one?

I have 16 jpeg files for display
Each time show one jpeg only.

I use the sqldatasource to testing the result is correct .
Also I add the get item to display the counter of the item

The result
---------------------
The start screen
jpeg (this is the no.15 jpeg)

1/16
--------------------
press the forward button
jpeg (this is the no.16 jpeg)

16/16
-------------------
press the forward button  
jpeg (this is the no.1 jpeg)

1/16
---------------------

Question:
1)  Why the rotator first display is the no.15 jpeg not the first one jpeg.
2)  When I try using WrapFrames="false" , the last jpeg is blank.

source:
-----------------------------
 <span class="title"><telerik:RadRotator ID="RadRotatorHorizontal"
                runat="server" DataSourceID="SqlDataSource1"
     RotatorType="FromCode" Height="480px"

Width="1471px" ItemHeight="480px" ItemWidth="1200px" scrollduration="1" frameduration="2000"
      ScrollDirection="Right"

CssClass="floatRotator" OnClientItemShown="OnClientItemShown" >
     <ItemTemplate>
      <div class="itemTemplate">
                            <asp:Image runat="server" ID="Image"
                                ImageUrl='<%# Eval("ImageURL_Full_FileName") %>' 
                                CssClass="displayimage" AlternateText="Customer Image" Height="455px"
                                Width="1200px"/>
          <br />

 

<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$

ConnectionStrings:ConnectionString9 %>"
  
        selectcommand="SELECT * FROM [Cam_Recording] ORDER BY [ImageURL_Full_FileName]"
        ProviderName="<%$ ConnectionStrings:ConnectionString9.ProviderName %>">
</asp:sqldatasource>

 

               function OnClientItemShown(sender, args) {
         var textitem = (args.get_item().get_index() + 1) + "/" + (sender.get_items().length);
         var Label5value = document.getElementById("Label5");
                Label5value.innerHTML = textitem;
     }

-----------------------------

Thanks!!!

edward
Top achievements
Rank 1
 answered on 25 Apr 2010
1 answer
548 views
I have seen several posts on the web about this but, I have not been able to get any of the solutions to work.

I have a page that uses a RadSplitter to separate itself into two RadPanes. In the left pane is a RadTreeview. In the right pane is an ASP.NET Update Panel. It is the classic leftpane-treeview, rightpane-detail view setup.
I use context menus in the treeview to allow users to cut, copy, and paste items in the treeview, and all that works just great. If a user selects an item in the treeview, the right pane shows the detail page for that item and allows them to edit the details. That works just fine.
Here is the problem: If the user selects "Add Item" from the context menu of the treeview, I create a blank form in the detail page and allow them to fill out the form. When the "submit" button is clicked on the form, it is submitted and, when the call to the database is returns the newly created item's ID, I need to update the treeview to reflect the creation of the new item.
I created two hidden fields on my page to help me with all these operations.
hdnOperationType
hdnOperationSource

When the call to the database is returned, I set the value of hdnOperationType to "nodeadded", and I am trying to capture that in the "OnClientLoad" event of the treeview in the browser, so I can do the update of the treeview. But, when I check the value of the hdnOperationType field, after my server code has set it to "nodeadded", the value still reads the old value from the previous call back. The field is not updated. (from Googling this issue, I beleieve the client state is still pointing to a reference of an old version of hdnOperationType, and was not updated with a new reference).

Here is what my page definition looks like:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Exp.aspx.cs" Inherits="Exp" MasterPageFile="~/MasterPage.master" %> 
<%@ MasterType VirtualPath="~/MasterPage.master" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server" > 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
        <script type="text/javascript">  
            //<![CDATA[                 
            function updateTreeView() {
                var update = document.getElementById('<%= hdnOperationType.ClientID %>');
                if (update) {
                    if (update.value == "nodeadded") {
                        update.value = "";
                        var newParent = document.getElementById('<%= hdnOperationSource.ClientID %>');
                        updateAffectedNode(newParent.value);
                    }
                    else {
                        if (update.value == "nodeedited") {
                            update.value = "";
                            var target = document.getElementById('<%= hdnOperationSource.ClientID %>');
                            updateAffectedNode(target.value);
                        }
                    }
                }
            }
            
            ...more javascript here
            //]]> 
        </script> 
    </telerik:RadCodeBlock> 
    <asp:HiddenField ID="hdnOperationType" runat="server" /> 
    <asp:HiddenField ID="hdnOperationSource" runat="server" /> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadTreeView1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="tvExplorer" /> 
                    <telerik:AjaxUpdatedControl ControlID="pnlDetail" /> 
                    <telerik:AjaxUpdatedControl ControlID="hdnOperationSource" /> 
                    <telerik:AjaxUpdatedControl ControlID="hdnOperationType" />          
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="UpdatePanel1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="tvExplorer" /> 
                    <telerik:AjaxUpdatedControl ControlID="pnlDetail" /> 
                    <telerik:AjaxUpdatedControl ControlID="hdnOperationSource" /> 
                    <telerik:AjaxUpdatedControl ControlID="hdnOperationType" />          
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadSplitter ID="RadSplitter1" CssClass="grid_12" Height="650" Width="100%" LiveResize="true"  runat="server">  
        <telerik:RadPane ID="pnlExplorer" Height="100%" Width="300" runat="server">  
            <telerik:RadTreeView ID="tvExplorer" runat="server" TabIndex="1" AccessKey="m"   
              OnClientLoad="updateTreeView" 
              OnClientContextMenuItemClicking="OnClientContextMenuItemClicking" 
              OnClientKeyPressing="OnClientKeyPressing" 
              OnNodeClick="tvExplorer_NodeClick" 
              OnContextMenuItemClick="tvExplorer_ContextMenuItemClick" 
            > 
                <WebServiceSettings Path="DataSvcProxy.asmx" Method="GetRadTreeViewNodes" /> 
                <Nodes> 
                    <telerik:RadTreeNode runat="server" Text="Root Node" Value="0" ClassID="0" PermClasses="0" ExpandMode="WebService" /> 
                </Nodes> 
            </telerik:RadTreeView> 
        </telerik:RadPane> 
        <telerik:RadSplitBar ID="RadSplitBar1" CollapseMode="Forward" runat="server" /> 
        <telerik:RadPane ID="pnlDetail" Height="100%" Width="100%" runat="server">  
            <asp:UpdatePanel ID="updDetail" runat="server" UpdateMode="Conditional" > 
                <ContentTemplate> 
                    <div class="emptyItem">  
                        Select an item in the left pane to view its information in this pane.  
                    </div> 
                </ContentTemplate> 
            </asp:UpdatePanel> 
        </telerik:RadPane> 
    </telerik:RadSplitter> 
</asp:Content> 

I have tried wrapping the declaration of the two hidden fields in an update panel and, in my server code, explicitly calling that update panel's "Update()" function but, that has no effect.

I am stumped. I thought I had a good grasp of ajax but this has stopped me in my tracks.

Any suggestions would really be appreciated.

Thanks.

Update: I have also tried registering the hidden fields by putting this code in the Page_Init routine:
        RadScriptManager.RegisterHiddenField(this, "hdnOperationType", "");
        RadScriptManager.RegisterHiddenField(this, "hdnOperationSource", "");
(I used the static member of the class because my RadScriptManager instance (RadScriptManager1) does not provide a RegisterHiddenField method.)
This has had no effect at all.

Roger
Top achievements
Rank 1
 answered on 24 Apr 2010
3 answers
118 views
RadEditor is removing quotes from div id="xyz".  Enclosing the string within CDATA tags has no effect. 

Steps to reproduce:
1. Use RadEditor on a .NET page to select the content of a database row
2. Insert <div id="xyz"></div> into RadEditor
3. Save changes to db
4. Look at what was saved to the db ..... it saved <div id=xyz></div> .... which browsers detect as a syntax error

How to fix?
Rumen Jekov
Top achievements
Rank 1
 answered on 24 Apr 2010
8 answers
250 views

Hi,

I am using the custom skin for the RadEditor:
 

<

 

telerik:RadEditor ID="radEditor" runat="server"

 

 

Skin="WWRDefault" EnableEmbeddedSkins="false"

 

 

ToolbarMode="Default" Height="600px" Width="97%"

 

 

Visible="false" CausesValidation="False"

 

 

ToolsFile="~/DefaultRadEditorToolsFile.xml"

 

 

MaxDocumentSize="2400000" MaxImageSize="20480"

 

 

ImagesFilters="*.png,*.gif,*.jpg,*.jpeg"

 

 

DocumentsFilters="*.pdf,*.xls" />

 


When I select ImageManager I have the following exception:
Telerik.Web.UI.RadTreeView with ID='tree' was unable to find embedded skin with name 'WWRDefault'. Please, make sure that you spelled the skin name correctly, or if you want to use a custom skin, set EnableEmbeddedSkins=false. 

Could you please let me know what I am missing?

Thank you,
Tatiana
Rumen Jekov
Top achievements
Rank 1
 answered on 24 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?