问题描述:

I have One RadGrid. Below is my RadGridview.

<div>

<telerik:RadGrid ID="CommonDataGrid" runat="server" AutoGenerateColumns="true">

<MasterTableView>

<Columns>

</Columns>

</MasterTableView>

<ClientSettings>

<ClientEvents OnRowContextMenu="RowContextmenufunction"></ClientEvents>

<Selecting AllowRowSelect="true" />

</ClientSettings>

</telerik:RadGrid>

</div>

<div>

<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>

</div>

<div>

<asp:PlaceHolder ID="PlaceHolder2" runat="server"></asp:PlaceHolder>

</div>

Step 1:

I would like to set visbile false to RadGrid.

Step 2:

I would like to show GridView in both PlaceHolder1 & PlaceHolder2.

How to do it ?

Any idea ?

网友答案:

First set Visible="false" in radgrid

If you want to display the radgrid in both placeholders on page load, then the follow the below code.

protected void Page_Load(object sender, EventArgs e)
{
  CommonDataGrid.Visible=true;
  PlaceHolder1.Controls.Add(CommonDataGrid);
  PlaceHolder2.Controls.Add(CommonDataGrid);
}
相关阅读:
Top