To enable the RadGrid

4 posts, 0 answers
  1. Sudha
    Sudha avatar
    27 posts
    Member since:
    May 2011

    Posted 22 Feb 2012 Link to this post

    <asp:Panel ID="PnlFileDetails" runat="server" BorderStyle="Solid" BorderWidth="1px"
                <asp:Panel ID="PnlCurrentConntentDetails" runat="server" Width="100%">
                <table style="width: 100%">
                            <td style="border: 1px solid">
                                <telerik:RadGrid ID="dgCurrentContentDetails" runat="server" AllowMultiRowSelection="True"
                                    Skin="SLB" CellSpacing="1" CellPadding="3" BorderStyle="Solid" BorderWidth="0px"
                                    Width="100%" Height="300px" AutoGenerateColumns="False" GridLines="None" AllowSorting="True"
                                    HeaderStyle-Height="30px" EnableEmbeddedSkins="False" OnItemDataBound="dgCurrentContentDetails_ItemDataBound">
                                        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                        <Selecting AllowRowSelect="true" />
                                        <ClientEvents OnRowSelecting="RowSelecting" OnRowSelected="RowSelected" OnRowDeselected="RowDeSelected" />
                                    <HeaderStyle Font-Underline="False" Height="30px" />
                                    <ItemStyle Wrap="true" />
                                    <MasterTableView AllowNaturalSort="true" AllowCustomSorting="true" ShowHeadersWhenNoRecords="true"
                                        NoMasterRecordsText="No files found for the selected product.">
                                        <ExpandCollapseColumn SortAscImageUrl="~/Skins/SLB/Grid\SortAsc.gif" SortDescImageUrl="~/Skins/SLB/Grid\SortDesc.gif">
                                            <telerik:GridBoundColumn UniqueName="RuleID" DataField="RuleID" HeaderText="RuleID"
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <ItemStyle Wrap="true" HorizontalAlign="Left" CssClass="RadGridRow" />

    Hi ,
    Above is the code for Rad Grid. I have disabled the PnlFileDetails on the server side. On click of a button , I want to enable the rad grid on the client side. I have written the below code to enable the grid.

    document.getElementById('ctl00_CntPlHolder_PnlFileDetails').disabled = false;




    document.getElementById('ctl00_CntPlHolder_PnlCurrentConntentDetails').disabled = false;




    'ctl00_CntPlHolder_dgCurrentContentDetails').enabled = true;

    But the grid is not enabled. Please let me how to enable the grid on the client side(using java script).








  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Feb 2012 Link to this post

    Hello Sudha,

    Access the grid using $find method as shown below.
    var grid = $find("<%=RadGrid1.ClientID%>");

    Also check the following documentation.
    Enabled/Disabled conventions

  3. Sudha
    Sudha avatar
    27 posts
    Member since:
    May 2011

    Posted 24 Feb 2012 Link to this post

    I tried this. But this is not working. Please suggest how to proceed.

  4. Radoslav
    Radoslav avatar
    1564 posts

    Posted 24 Feb 2012 Link to this post

    Hi Sudha,

    RadGrid is a complex ASP.NET control and like with the Microsoft MS GridView sometimes requires additional coding when its table structure should be deactivated client/server side (due to the nested control definitions and features switched on).

    You can find out information on how to disable/enable RadGrid from the online documentation.
    Enabled/Disabled conventions

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top