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

GridTableView : Specify DataSource from code behind

1 Answer 482 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ajay
Top achievements
Rank 1
Ajay asked on 02 Aug 2010, 07:33 AM
Hi,

I am using GridTableView inside a RadGrid (for Hierarchy display).
I declared the datasource in the RadGrid1_NeedDataSource event from code-behind and its working fine.

Now how do I set the dataSource of GridTableView from code-behind C#?
I am not able ro refer to the GridTableView from code-behind as it don't has a ID property.

Thanks
Ajay Sharma

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Aug 2010, 08:25 AM
Hello Ajay,

You can try DetailDataBind event to bind the DetaillTable from code behind. RadGrid fires DetailDataBind event to bind each detail table-view. In the code of the DetailDataBind event handler you can write code for constructing detail data-source that will be used by the table to be bound to the hierarchical structure.

Please take a look at the following documentation and demo which illustrates Programmatic binding of detail table-view.
Hierarchical data-binding using DetailTableDataBind event
Grid / Programmatic Binding


Hope this helps,
Princy.
Tags
Grid
Asked by
Ajay
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or