I'm in need of displaying a large amount of data at once to the screen, 1000+ records. I know that this will take some time, but what I want is that the page will display with the "Loading..." text first, that way the other portions of the page load quickly, and then use a callBack to Render the control.
This works just fine with a GridView, but using the RadGrid it fails. Any Help would be great.
Thanks in Advance
Davey
This works just fine with a GridView, but using the RadGrid it fails. Any Help would be great.
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!Page.IsPostBack) |
| { |
| ...... |
| ...... |
| ...... |
| ltCallbackAttributeGrid.Text = ClientScript.GetCallbackEventReference(this, |
| "'bindAttr'", "EndGetData2", "'asyncgrid2'", false); |
| } |
| } |
| #region ICallbackEventHandler Members |
| private string _callBack; |
| public string GetCallbackResult() |
| { |
| return _callBack; |
| } |
| public void RaiseCallbackEvent(string eventArgument) |
| { |
| grdAttributes.DataSource = _additionalAttributeColumns; |
| grdAttributes.DataBind(); |
| using (StringWriter sw = new StringWriter()) |
| { |
| grdAttributes.RenderControl(new HtmlTextWriter(sw)); |
| _callBack = sw.ToString(); |
| } |
| } |
| #endregion |
| <div id="attributeGridDiv"> |
| <telerik:RadGrid runat="server" ID="grdAttributes" AutoGenerateColumns="false" |
| BorderWidth="0" Skin="Office2007" GridLines="None" > |
| <MasterTableView> |
| <Columns> |
| <telerik:GridTemplateColumn UniqueName="chkbxSelect"> |
| <ItemTemplate> |
| <asp:CheckBox runat="server" ID="chkbxAttributeSelect" AutoPostBack="true" OnCheckedChanged="chkbxAttributeSelect_CheckedChanged" /> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn UniqueName="Name" DataField="string_Text" HeaderText="Name" DataType="System.String" /> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| </div> |
| <script type="text/javascript"> |
| function EndGetData2(arg) |
| { |
| document.getElementById("attributeGridDiv").innerHTML = arg; |
| } |
| setTimeout("<asp:literal runat='server' id='ltCallbackAttributeGrid' />", 3000); |
| </script> |
Thanks in Advance
Davey