Hi,
I want to get the ID of the radgrid on delete and edit command.
i tried e.item.parent.uniqueid but i am getting something like this: "ctl00$ContentPlaceHolder1$grdName$ctl00$ctl00"
I just want to get the "grdName" part without parsing the string. thanks.
4 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 23 Apr 2010, 09:58 AM
Hello Arnold,
Try following code in order to get the grid ID.
string id = e.Item.OwnerGridID.ToString();
Regards,
Princy.
Try following code in order to get the grid ID.
string id = e.Item.OwnerGridID.ToString();
Regards,
Princy.
0
Web team
Top achievements
Rank 1
answered on 23 Apr 2010, 10:15 AM
thanks for the response, how bout during NeedDataSource event?
0
Hi Arnold,
The sender object in the event handler is the RadGrid instance that fires the NeedDataSource event, so you can simply try ((RadGrid)sender).ID.
All the best,
Veli
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.
The sender object in the event handler is the RadGrid instance that fires the NeedDataSource event, so you can simply try ((RadGrid)sender).ID.
All the best,
Veli
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.
0
Web team
Top achievements
Rank 1
answered on 26 Apr 2010, 02:39 AM
That seem to work. Thanks again.