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

How to determine which detail table in NeedDataSource Event?

1 Answer 152 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 09 Sep 2010, 11:50 PM
In the GridNeedDataSource Event, the eventargs include:
RebindReason
IsFromDetailTable

This useful for determining whether the rebinding is caused by Parent or Child grid.

What if I have a 3-tier grid?
Parent > Child > Grandchild

This boolean parameter will only tell me whether or not the grid raising the event was the parent, it cannot tell me whether it was the Child or Grandchild.... right?

Thanks

EDIT: I suspect I can exploit the sender.Equals() method but I am not sure how to target the detail or master table controls

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 10 Sep 2010, 01:38 PM
Hello Matthew,

Indeed, the purpose of the IsFromDetailTable boolean is to let you know if the MasterTableView is rebound or not. If it is a detail table that is rebound, you can find which it is in the DetailTableDataBind event. Check out this demo for further information.

All the best,
Iana
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
Matthew
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or