Skip to main content
Home Forums General Silverlight Getting Started fetch the id of the control in a template of datagrid.
5 replies. Latest Post by varshavmane on September 7, 2009.
(0)
shub1234
Member
6 points
59 Posts
09-07-2009 12:21 AM |
How can i fetch the id of the control inside the template of a datagrid in a Currentcellchanged event of the datagrid in silverlight2.
Thank you
chaitany...
252 points
57 Posts
09-07-2009 12:42 AM |
Try this,
1. Get the grid object from the event arguments
Grid objGrid = ((Grid)e.DetailsElement);
2. Fetch the control inside the Grid template, using the 'children' property
Eg, if the control is a listbox
objListBox = (ListBox)objGrid.Children[2];
09-07-2009 1:00 AM |
in which event exactly i need to call ur code.Its not working in currentcellchanged event
varshavmane
Contributor
6723 points
1,580 Posts
09-07-2009 2:39 AM |
Try using BeginningEdit Event.
09-07-2009 4:46 AM |
I want to fetch the control ID of the datahrid template in the loaded event of the grid
09-07-2009 7:56 AM |
Hi,
Check this post: http://silverlight.net/forums/t/105792.aspx
HTH