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

Grid Not Displaying

1 Answer 23 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 21 Oct 2010, 09:07 PM
On page load the radgrid is displaying but after postback it is gone.  The grid on page load looks like:

  <div id="RadGrid1" class="RadGrid RadGrid_Default">
 
<!-- 2010.2.929.20 --><table cellspacing="0" class="rgMasterTable" border="0" id="RadGrid1_ctl00" style="width:100%;table-layout:auto;empty-cells:show;">
 <colgroup>

After postback it looks like:

  <div id="RadGrid1" class="RadGrid RadGrid_Default">
 
<!-- 2010.2.929.20 --><input id="RadGrid1_ClientState" name="RadGrid1_ClientState" type="hidden" />
 </div>

Any thoughts.

Thanks

John

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 22 Oct 2010, 03:17 PM
Hello John,

The reason for the behavior which you described is that the control is not properly bound to data. Most probably you are calling DataBind() method which will break the default functionalities of the control, such as filtering/sorting/paging. To populate the control with data, you need to use only NeedDataSource. Whenever you need to raise the NeedDataSource event handler again, you can call the .Rebind() method of the control. This would raise the NeedDataSource event handler, allowing you to pass the proper data to populate the control.

I hope this information helps.

Sincerely yours,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or