Hi ,
I use the two div to load radgrids which one only show grid title (null data) ,other show detail data. and use javascript to control them, but display abnormal..
If i have not set grid AllowScroll=true,and not use the RadFormDecorator control,webpage can be show normal...Once i setup one of them,the page will show abnormal.
my project must be used grid allow scroll and RadFormDecorator .
the attachment is error screen,
I don't know how to handle, please help me! Thank you..
I use the two div to load radgrids which one only show grid title (null data) ,other show detail data. and use javascript to control them, but display abnormal..
If i have not set grid AllowScroll=true,and not use the RadFormDecorator control,webpage can be show normal...Once i setup one of them,the page will show abnormal.
my project must be used grid allow scroll and RadFormDecorator .
the attachment is error screen,
I don't know how to handle, please help me! Thank you..
<%@ 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 runat="server"> <title>Div+RadGird Error</title> <script language="javascript" type="text/javascript"> function showdiv() { var obj=document.getElementById("DType").value; if(obj==1) { document.getElementById("Div_NullData").style.display="none"; document.getElementById("Div_FullData").style.display=""; } else { document.getElementById("Div_NullData").style.display=""; document.getElementById("Div_FullData").style.display="none"; } } </script></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" /> <select id="DType" onclick="showdiv()"> <option value="0" selected="selected">Null Data</option> <option value="1">Full Data</option> </select> <div id="Div_NullData"> <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None" Width="780"> <HeaderContextMenu EnableAutoScroll="True"> </HeaderContextMenu> <MasterTableView AutoGenerateColumns="False" DataKeyNames="CustomerID" DataSourceID="SqlDataSource1"> <RowIndicatorColumn> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" UniqueName="CompanyName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName" UniqueName="ContactName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle" UniqueName="ContactTitle"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address" UniqueName="Address"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City" UniqueName="City"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Region" HeaderText="Region" SortExpression="Region" UniqueName="Region"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT * FROM [Customers] WHERE 1=0"></asp:SqlDataSource> </div> <div id="Div_FullData" style="display:none"> <telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="SqlDataSource2" GridLines="None" Width="780" Height="300px"> <HeaderContextMenu EnableAutoScroll="True"> </HeaderContextMenu> <MasterTableView AutoGenerateColumns="False" DataKeyNames="CustomerID" DataSourceID="SqlDataSource2"> <Columns> <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" UniqueName="CompanyName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName" UniqueName="ContactName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle" UniqueName="ContactTitle"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address" UniqueName="Address"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City" UniqueName="City"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Region" HeaderText="Region" SortExpression="Region" UniqueName="Region"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="True" /> </ClientSettings> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT TOP 20 * FROM [Customers]"></asp:SqlDataSource> </div> </form></body></html>