Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
262 views
Hi,

I have a Radgrid with add/update/delete custom buttons on top of the grid. I can invoke the clientside edit of a row using this script on rowclick or rowdblclick.

 editedRow = eventArgs.get_itemIndexHierarchical();
 $find("<%= RadGrid1.MasterTableView.ClientID %>").editItem(editedRow);

However, I am unable to persist the changes to the server when I use

 $find("<%= RadGrid1.MasterTableView.ClientID %>").updateItem(editedRow);

Can anyone explain what exactly happens when updateItem is called. Does the UpdateCommand get fired on the server?

Here is my code

The Script BLOCK :

 <telerik:RadScriptManager ID="ScriptManager" runat="server" /> 
         <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

                <script type="text/javascript">
                    
                    var hasChanges = false;
                    var editedRow;
                    var editedRowId;
                    var editButton;

                  
                    
                    function RowClick(sender, eventArgs)
                    {

                        editedRow = eventArgs.get_itemIndexHierarchical();
                        var grid = $find("<%= RadGrid1.ClientID %>");
                        var masterTable = grid.get_masterTableView();
                        if (editedRow && hasChanges) {
                            if (confirm("Update changes?")) {
                                hasChanges = false;
                                 $find("<%= RadGrid1.MasterTableView.ClientID %>").updateItem(editedRow);
                                editButton.set_enabled(true);
                               
                            }
                            else {
                                hasChanges = true;
                            }
                        }
                       
                  }


                  function onToolButtonClick(sender, args) {
                      editButton = args.get_item();
                      var commandName = editButton.get_commandName();
                      var grid = $find("<%= RadGrid1.ClientID %>");
                      alert("Selected Item Count: " + grid.get_selectedItems().length);
                      switch (commandName)
                      {
                      case "AddSelectedItem":
                            
                              grid.get_masterTableView().insertItem();
                              break;
                          case "EditSelectedItem":
                              editButton.set_enabled(false);                            
                              grid.get_masterTableView().editItem(editedRow);
                              editedRowId = editedRow;
                              hasChanges = true;
                              break;
                      case "DeleteSelectedItem":                       
                          editButton.set_enabled(!confirm('Delete selected item?'));
                          break;   
                      }
                  }

                
                </script>

            </telerik:RadCodeBlock>




<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            DefaultLoadingPanelID="RadAjaxLoadingPanel1">
           <AjaxSettings>
               <telerik:AjaxSetting  AjaxControlID="RadGrid1">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="Label1" />
                       <telerik:AjaxUpdatedControl ControlID="RadGrid1" />                    
                   </UpdatedControls>
               </telerik:AjaxSetting>
           </AjaxSettings>          
       </telerik:RadAjaxManager>  
          
       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" >
            <img alt="Loading..." src="Images/Toolbar/anibusy.gif" />
       </telerik:RadAjaxLoadingPanel>
       



ToolBar Control For Single Select:

         <br /><br />
            <telerik:RadToolBar ID="RadToolBar1" runat="server" OnClientButtonClicked="onToolButtonClick" AutoPostBack="false">
                <Items>
                     <telerik:RadToolBarButton runat="server" Text="Create Provider Audit Chart" CommandName="AddSelectedItem"  PostBack=false ImageUrl="~/Images/Toolbar/select.gif" >
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton runat="server" Text="Edit" PostBack="False" CommandName="EditSelectedItem" ImageUrl="~/Images/Toolbar/edit.gif" >
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton runat="server"  Text="Delete" CommandName="DeleteSelectedItem" ImageUrl="~/Images/Toolbar/delete.gif">
                    </telerik:RadToolBarButton>
                    
                </Items>
            </telerik:RadToolBar>
         <br /><br />
 <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <br /><br />
         Single Select Grid:
         <br /><br />
            <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="XmlDataSource1"  OnItemUpdated="RadGrid1_ItemUpdated"  >
                <MasterTableView  CommandItemDisplay="Top"  CommandItemStyle-CssClass="RadGrid_MonarchSkin" ClientDataKeyNames="CustomerID" EditMode="InPlace" ShowHeader=true >               
                <Columns>                         
                        <telerik:GridBoundColumn  UniqueName="CustomerID" DataField="CustomerID" HeaderText="Customer ID" Visible="false">
                        </telerik:GridBoundColumn>                      
                        <telerik:GridBoundColumn UniqueName="CompanyName" ColumnEditorID="GridTextBoxColumnEditor1" DataField="CompanyName" HeaderText="CompanyName" >
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="ContactName" ColumnEditorID="GridTextBoxColumnEditor2"  DataField="ContactName" HeaderText="ContactName" >
                        </telerik:GridBoundColumn>  
                                             
                    </Columns>
                     
                </MasterTableView>  
                <ClientSettings >
                    <ClientEvents OnRowClick ="RowClick" />                
                </ClientSettings>
                             
            </telerik:RadGrid>
           







Schlurk
Top achievements
Rank 2
 answered on 01 Sep 2009
3 answers
147 views
I have created a grid that i need to insert a new record, delete an record or update... When I run update it gives me the error - Object reference not set to an instance of an object... Can someone help me out... I just do not see what i am misssing... 

 

  <telerik:RadGrid ID="rgEditPhoneList" runat="server"
            AllowPaging="True"
            AllowSorting="True"
            GridLines="None"
            DataSourceID="SqlDataSource1"
            Visible="False"
            OnItemUpdate="rgEditPhoneList_ItemUpdated"
            OnDataBound="rgEditPhoneList_DataBound"
            OnItemInserted="rgEditPhoneList_ItemInserted"
            OnItemDeleted="rgEditPhoneList_ItemDeleted"
            AllowAutomaticUpdates ="True"
            AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True"
            AutoGenerateColumns="False"
            PageSize="50">
        <ExportSettings>
            <Pdf PaperSize="Letter" FontType="Subset"></Pdf>
            <Excel Format="Html"></Excel>
            <Csv RowDelimiter="NewLine" ColumnDelimiter="Comma"></Csv>
        </ExportSettings>
        <MasterTableView CurrentResetPageIndexAction="SetPageIndexToFirst"
                        Dir="LTR"
                        Frame="Border"
                        TableLayout="Auto"
                        CommandItemDisplay="Top"
                        AutoGenerateColumns="False"
                        DataKeyNames="ID"
                        DataSourceID="SqlDataSource1">
            <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                Visible="False">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                Visible="False" Resizable="False">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
            <ItemStyle CssClass="MyImageButton" />
        </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="ID" DataType="System.Int32"
                    FilterListOptions="VaryByDataType" ForceExtractValue="None"
                    HeaderText="ID" SortExpression="ID"
                    UniqueName="ID" ReadOnly="True">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="SortOrder" DataType="System.Int32"
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="SortOrder"
                    SortExpression="SortOrder" UniqueName="SortOrder">
                </telerik:GridBoundColumn>
               
                <telerik:GridDropDownColumn DataSourceID="sqlKMAgrid" ListTextField="KMA_LongDesc" ListValueField="ID"
                SortExpression="KMA_LongDesc" HeaderText="KMA" DropDownControlType="DropDownList"
                DataField="KMA_LongDesc" ColumnEditorID="GridDropDownColumnEditor1" >
                 </telerik:GridDropDownColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="KMA_LongDesc"
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="KMA_LongDesc"
                    SortExpression="KMA_LongDesc" UniqueName="KMA_LongDesc">
                </telerik:GridBoundColumn>
             <%--   <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="KMA_ID" DataType="System.Int32"
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="KMA_ID"
                    SortExpression="KMA_ID" UniqueName="KMA_ID">
                </telerik:GridBoundColumn>--%>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="DispatchLocation"
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="DispatchLocation"
                    SortExpression="DispatchLocation" UniqueName="DispatchLocation">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Sys" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Sys" SortExpression="Sys" UniqueName="Sys">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Prin" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Prin" SortExpression="Prin" UniqueName="Prin">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Site" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Site" SortExpression="Site" UniqueName="Site">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Co_Div" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Co_Div" SortExpression="Co_Div" UniqueName="Co_Div">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Name" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Name" SortExpression="Name" UniqueName="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Title" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Title" SortExpression="Title" UniqueName="Title">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="OfficeNumber"
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="OfficeNumber"
                    SortExpression="OfficeNumber" UniqueName="OfficeNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Extention" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Extention" SortExpression="Extention" UniqueName="Extention">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="CellNumber"
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="CellNumber"
                    SortExpression="CellNumber" UniqueName="CellNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Monday" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Monday" SortExpression="Monday" UniqueName="Monday">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Tuesday" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Tuesday" SortExpression="Tuesday" UniqueName="Tuesday">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Wednesday" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Wednesday" SortExpression="Wednesday" UniqueName="Wednesday">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Thursday" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Thursday" SortExpression="Thursday" UniqueName="Thursday">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Friday" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Friday" SortExpression="Friday" UniqueName="Friday">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Saturday" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Saturday" SortExpression="Saturday" UniqueName="Saturday">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Sunday" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Sunday" SortExpression="Sunday" UniqueName="Sunday">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="StartHour" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="StartHour" SortExpression="StartHour" UniqueName="StartHour">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="EndHour" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="EndHour" SortExpression="EndHour" UniqueName="EndHour">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Notes" FilterListOptions="VaryByDataType"
                    ForceExtractValue="None" HeaderText="Notes" SortExpression="Notes" UniqueName="Notes">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="StartDate" DataType="System.DateTime"
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="StartDate"
                    SortExpression="StartDate" UniqueName="StartDate">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="StopDate" DataType="System.DateTime"
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="StopDate"
                    SortExpression="StopDate" UniqueName="StopDate">
                </telerik:GridBoundColumn>
                 <telerik:GridButtonColumn ConfirmText="Delete this product?" ButtonType="ImageButton"
                 CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                    </telerik:GridButtonColumn>

            </Columns>
              <EditFormSettings ColumnNumber="2" CaptionDataField="ID" CaptionFormatString="Edit properties of Product {0}">
                   <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                    <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White"
                        Width="100%" />
                    <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                    <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record"
                        UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                    </EditColumn>
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                </EditFormSettings>
           
        </MasterTableView>
     
    </telerik:RadGrid>
     </ContentTemplate>
    </asp:UpdatePanel>
   
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:EDCCConnectString %>"
       SelectCommand="DSRV_SelectKMA_PhoneList" UpdateCommandType="StoredProcedure"
        SelectCommandType="StoredProcedure"
        UpdateCommand="update TL_DSRV_KMA_PhoneList
        set SortOrder = @SortOrder, 
  KMA_LongDesc   = @KMA_ID,
  DispatchLocation = @DispatchLocation,
  [Sys]   = @sys,
  Prin   = @Prin,
  [Site]   = @Site,
  Co_Div   = @Co_Div,
  Name   = @Name,
  Title   = @Title,
  OfficeNumber = @OfficeNumber,
  Extention  = @Extention,
  CellNumber  = @CellNumber,
  Monday   = @Monday,
  Tuesday   = @Tuesday,
  Wednesday  = @Wednesday,
  Thursday  = @Thursday,
  Friday   = @Friday,
  Saturday  = @Saturday,
  Sunday   = @Sunday,
  StartHour  = @StartHour,
  EndHour   = @EndHour,
  Notes   = @Notes,
  StartDate  = @StartDate,
  StopDate  = @StopDate
  where ID = @ID"
  
        InsertCommand="INSERT INTO TL_DSRV_KMA_PhoneList (SortOrder, 
  KMA_ID,
  DispatchLocation,
  [Sys],
  Prin,
  [Site],
  Co_Div,
  Name,
  Title,
  OfficeNumber,
  Extention,
  CellNumber,
  Monday,
  Tuesday,
  Wednesday,
  Thursday,
  Friday,
  Saturday,
  Sunday,
  StartHour,
  EndHour,
  Notes,
  StartDate,
  StopDate) values(@SortOrder, 
  @KMA_ID,
  @DispatchLocation,
  @Sys,
  @Prin,
  @Site,
  @Co_Div,
  @Name,
  @Title,
  @OfficeNumber,
  @Extention,
  @CellNumber,
  @Monday,
  @Tuesday,
  @Wednesday,
  @Thursday,
  @Friday,
  @Saturday,
  @Sunday,
  @StartHour,
  @EndHour,
  @Notes,
  @StartDate,
  @StopDate)"
        DeleteCommand="DELETE FROM [TL_DSRV_KMA_PhoneList] WHERE [ID] = @ID" >
        <SelectParameters>
            <asp:ControlParameter ControlID="ddlKMA" Name="KMA_ID"
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="ID" Type="Int32" />
            <asp:Parameter Name="SortOrder" Type="Int32" />
            <asp:Parameter Name="KMA_LongDesc" Type="Int32" />
            <asp:Parameter Name="DispatchLocation" Type="String" />
            <asp:Parameter Name="Sys" Type="String" />
            <asp:Parameter Name="Prin" Type="String" />
            <asp:Parameter Name="Site" Type="String" />
            <asp:Parameter Name="Co_Div" Type="String" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Title" Type="String" />
            <asp:Parameter Name="OfficeNumber" Type="String" />
            <asp:Parameter Name="Extention" Type="String" />
            <asp:Parameter Name="CellNumber" Type="String" />
            <asp:Parameter Name="Monday" Type="String" />
            <asp:Parameter Name="Tuesday" Type="String" />
            <asp:Parameter Name="Wednesday" Type="String" />
            <asp:Parameter Name="Thursday" Type="String" />
            <asp:Parameter Name="Friday" Type="String" />
            <asp:Parameter Name="Saturday" Type="String" />
            <asp:Parameter Name="Sunday" Type="String" />
            <asp:Parameter Name="StartHour" Type="String" />
            <asp:Parameter Name="EndHour" Type="String" />
            <asp:Parameter Name="Notes" Type="String" />
            <asp:Parameter Name="StateDate" Type="DateTime" />
            <asp:Parameter Name="StopDate" Type="DateTime" />           
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="SortOrder" Type="Int32" />
            <asp:Parameter Name="KMA_LongDesc" Type="Int32" />
            <asp:Parameter Name="DispatchLocation" Type="String" />
            <asp:Parameter Name="Sys" Type="String" />
            <asp:Parameter Name="Prin" Type="String" />
            <asp:Parameter Name="Site" Type="String" />
            <asp:Parameter Name="Co_Div" Type="String" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Title" Type="String" />
            <asp:Parameter Name="OfficeNumber" Type="String" />
            <asp:Parameter Name="Extention" Type="String" />
            <asp:Parameter Name="CellNumber" Type="String" />
            <asp:Parameter Name="Monday" Type="String" />
            <asp:Parameter Name="Tuesday" Type="String" />
            <asp:Parameter Name="Wednesday" Type="String" />
            <asp:Parameter Name="Thursday" Type="String" />
            <asp:Parameter Name="Friday" Type="String" />
            <asp:Parameter Name="Saturday" Type="String" />
            <asp:Parameter Name="Sunday" Type="String" />
            <asp:Parameter Name="StartHour" Type="String" />
            <asp:Parameter Name="EndHour" Type="String" />
            <asp:Parameter Name="Notes" Type="String" />
            <asp:Parameter Name="StateDate" Type="DateTime" />
            <asp:Parameter Name="StopDate" Type="DateTime" /> 
        </InsertParameters>
        <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int32" />
            </DeleteParameters>

    </asp:SqlDataSource>
   
    <asp:SqlDataSource ID="sqlKMAgrid" runat="server"
        ConnectionString="<%$ ConnectionStrings:EDCCConnectString %>"
        SelectCommand="SELECT [ID], [KMA_LongDesc] FROM [TL_KMA_Reference]"></asp:SqlDataSource>
       
     

 

 

 protected void rgEditPhoneList_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)
    {

        GridEditableItem item = (GridEditableItem)e.Item;
        String Name = item.GetDataKeyValue("ID").ToString();

        if (e.Exception != null)
        {
            e.KeepInEditMode = true;
            e.ExceptionHandled = true;

            SetMessage("ID " + Name + " cannot be updated. Reason: " + e.Exception.Message);
        }
        else
        {
            SetMessage("ID " + Name + " is updated!");
        }
    }

    private void SetMessage(string message)
    {
        gridMessage = message;
    }

    private void DisplayMessage(string text)
    {
        rgEditPhoneList.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", text)));
    }

    private string gridMessage = null;

    protected void rgEditPhoneList_DataBound(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(gridMessage))
        {
            DisplayMessage(gridMessage);
        }
    }
   
   

 

 

 

 

 

 

 

Gina
Top achievements
Rank 1
 answered on 01 Sep 2009
1 answer
169 views
Hello!

I've stumbled across a problem with images being moved around, by selecting and dragging them in the editor in Firefox. Whenever I do this, the image url gets changed – two dots are being added in front of the file path. So, instead of having the url read like this: src="/image-file.jpg" (which is what we're intending) it becomes src="../image-file.jpg" which in turn makes the image disappear once the page is saved & published through our cms tool.

Any solution to this?
Rumen
Telerik team
 answered on 01 Sep 2009
10 answers
299 views
I have something very strange.
I get the javascript error telerik is undefined, and only for IE6.

It happens only to the tree object, and on one page it works wel, but on another page I get this error, and the tree is unaccessable.

Is there something where and how I can register the webresource.axd?

When I'm looking with fiddler, I don't see the resource loading on my second page, but it is loading on the first page.

I've already searched in your forum, but there is not any solution described. So please help!

Thanks in advance
yashvir karki
Top achievements
Rank 1
 answered on 01 Sep 2009
1 answer
162 views
I`m currently using RadControls for ASPNET AJAX Q1 2009, and wanted to try the RadCaptcha control in one of my forms. I added the handlers in web.config and tried to add the control to my page(usercontrol). Intellisense inVisual Studio could not find it (Element RadCaptcha is not a known element). I added the code from one of the examples

<

 

telerik:RadCaptcha ID="RadCaptcha1" runat="server" ErrorMessage="Page not valid. The code you entered is not valid." ValidationGroup="Group">

 

 

 

 

 

 

</telerik:RadCaptcha>

 

 

 

 

 


And all it does is throw an Parser Error: "Unknown server tag 'telerik:RadCaptcha'."

Is this control not part of ASPNET AJAX Q1 2009? or am I doing something wrong here?

Schlurk
Top achievements
Rank 2
 answered on 01 Sep 2009
1 answer
208 views
Hi. Is there a way to get a RadPanelBar to resize its width when the RadPane that its in shows a vertical scroll bar? Its always sized to the width of the RadPanel that its in, but if a scrollbar is showing, it covers up the right hand side exspand / collape arrow. Yes, I know you can click anyhere on the main RadPanelItem, but it would look better if its sized properly.
   
How would I accomplish this in java script? Can I detect when a RadPane has a scrollbar showing and what the width of that scrollbar is? Is it possible to even set the width of a RadPanelBar on the client side? I get a error when I call set_width() on its client side object,
Thanks,
Brian

Mr. Plinko
Top achievements
Rank 1
 answered on 01 Sep 2009
5 answers
207 views

Hi there,

It is possible to disable (make invisible) some cells of a RadGrid to visually represent Triangular Matrices ?
Thanks for any help.

Regards,

Marcio Nascimento

Daniel
Telerik team
 answered on 01 Sep 2009
5 answers
2.0K+ views
Full Error: Control 'RadGrid1_ctl00_ctl02_ctl00_ctl04' of type 'Button' must be placed inside a form tag with runat=server

Details:
I'm placing a radgrid in a usercontrol, the usercontrol will be placed on an mvc page 6 times.  The radcontrol works if it is alone on a page (not int a user control) using the following code:
<body>
    <form runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="false" runat="server">
        <MasterTableView>
            <Columns>
                <telerik:GridBoundColumn DataField="region" DataType="System.String" HeaderText="regionheader" />
                <telerik:GridBoundColumn DataField="playCount" DataType="System.Int32" HeaderText="playcountheader" />
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <DataBinding Location="/ASP/GridWS.asmx" SelectMethod="GetData" SelectCountMethod="GetCount" />
        </ClientSettings>
    </telerik:RadGrid>
    </form>
</body>

However I get the error when I attempt to place the grid in the control on the page.  If I move the <form> tag from the page to the control it will render without the error, but I need to have the form on the page as there are other controls that need to post, and basically because it seems like bad practice.
JR Go
Top achievements
Rank 1
 answered on 01 Sep 2009
1 answer
319 views
Hi

Can any one please send me the code snipet for using the radstylesheet manager control.

More please clarify me whether we can use the styesheet manager to use the style sheet developed for the web site apart from the rad control's style sheet.

Veselin Vasilev
Telerik team
 answered on 01 Sep 2009
0 answers
152 views

I am working with migration project.  I have converted the asp ComboBox to  Rad ComboBox. RadComboBox is under DataGrid. asp:RequiredFieldValidator is used for validation. It was working with asp ComboBox but not working with RadComboBox. One of the reason I identify that RadComboBox validate the text not value.

I try with custom validator but it is not working because the RadComboBox is under DataGrid.

 

Please give me proper solution. Thanks.

 

 

 

<asp:DataGrid ID="dgLesson" runat="server" CssClass="dataGridTable" Width="100%" .........

<Columns> 

< asp:TemplateColumn HeaderText="Sequence Number">   

<ItemTemplate>

 <asp:Label ID="lbSequenceNumber" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SequenceNumber") %>'>  

</asp:Label>

 </ItemTemplate>

 <FooterTemplate>  

<telerik:RadComboBox ID="ddAddSequenceNumber" runat="server">

</telerik:RadComboBox>  

<asp:RequiredFieldValidator ID="rfvAddSequenceNumber" runat="server" ControlToValidate="ddAddSequenceNumber"

ErrorMessage="Required" Display="Dynamic"></asp:RequiredFieldValidator>  

</FooterTemplate>

</asp:TemplateColumn>

 

 

Pushkar
Top achievements
Rank 2
 asked on 01 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?