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

Grid looses header names and template content

3 Answers 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
chirag
Top achievements
Rank 1
chirag asked on 12 Sep 2008, 08:47 PM
Hi,

I know I am doing something wrong here but I am not able figure it out. I have a radgrid inside a usercontrol, this usercontrol is placed into a RadMultiPage control connected to a RadTabStrip. Rad ajaxmanager is used to ajaxify the tab strip and mutliview control since RenderSelectedPageOnly="true" is for the RadMultiPage. I have to add unknow number of GridTemplateColumn columns to the grid and the datasource is set to an object data source that returns a datatable.

When the page loads, the grid appears perfectly, but when I go accross tabs or click any button inside the same tab, all the column headers in the grid disappear and the images or checkboxes in the template columns also disappear. The data in bound data column is still visible.

All the controls, column headers appear again if I call DataBind() method. but they disapprear as soon as an ajax postback call occurs.


Can anyone please help me with this?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Sep 2008, 04:52 AM
Hi Chirag,

I would suggest you to bind the Grid in the NeedDataSource event. You can refer the following demo link to get more details about AdvanceDataBinding techniques.
Advanced data-binding

Thanks
Shinu.
0
chirag
Top achievements
Rank 1
answered on 15 Sep 2008, 01:22 PM
Thanks for your reply Shinu, I tried using need datasource event, but it is not fired when user flips across tabs, and problem still exists.
0
chirag
Top achievements
Rank 1
answered on 15 Sep 2008, 05:37 PM
I found the solution but its not very elegant. I need to initial the grid columns on every load event for the grid. This seems to work.
Tags
Grid
Asked by
chirag
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
chirag
Top achievements
Rank 1
Share this question
or