This is a migrated thread and some comments may be shown as answers.

To enable the RadGrid

3 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sudha
Top achievements
Rank 1
Sudha asked on 22 Feb 2012, 11:24 AM
<asp:Panel ID="PnlFileDetails" runat="server" BorderStyle="Solid" BorderWidth="1px"
            Width="100%">
            <asp:Panel ID="PnlCurrentConntentDetails" runat="server" Width="100%">
            <table style="width: 100%">
                    <tr>
                        <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">
                                <ClientSettings>
                                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                    <Selecting AllowRowSelect="true" />
                                    <ClientEvents OnRowSelecting="RowSelecting" OnRowSelected="RowSelected" OnRowDeselected="RowDeSelected" />
                                </ClientSettings>
                                <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">
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridBoundColumn UniqueName="RuleID" DataField="RuleID" HeaderText="RuleID"
                                            Display="false">
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemStyle Wrap="true" HorizontalAlign="Left" CssClass="RadGridRow" />
                                        </telerik:GridBoundColumn>
                                   </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>                       
                    </tr>
                </table>
            </asp:Panel>
</asp:Panel>

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;

 

document.getElementById(

 

'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).

 

 

 

 

 

Thanks,
Sudha.

 

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Feb 2012, 11:58 AM
Hello Sudha,

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

Also check the following documentation.
Enabled/Disabled conventions

-Shinu.
0
Sudha
Top achievements
Rank 1
answered on 24 Feb 2012, 07:22 AM
I tried this. But this is not working. Please suggest how to proceed.

Thanks,
Sudha.
0
Radoslav
Telerik team
answered on 24 Feb 2012, 12:18 PM
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

Regards,
Radoslav
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.
Tags
Grid
Asked by
Sudha
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Sudha
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or