Skip to main content

Microsoft Silverlight

Answered Question fetch the id of the control in a template of datagrid.RSS Feed

(0)

shub1234
shub1234

Member

Member

6 points

59 Posts

fetch the id of the control in a template of datagrid.

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

chaitanyavrk
chaitany...

Member

Member

252 points

57 Posts

Re: fetch the id of the control in a template of datagrid.

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];

Thank you,
Chaitanya VRK
Silverlight Inspiration
Expression Tuts
------------------------------
Please 'mark as answer' if my reply helps you.

shub1234
shub1234

Member

Member

6 points

59 Posts

Re: Re: fetch the id of the control in a template of datagrid.

in which event exactly i need to call ur code.Its not working in currentcellchanged event

varshavmane
varshavmane

Contributor

Contributor

6723 points

1,580 Posts

Re: Re: Re: fetch the id of the control in a template of datagrid.

Try using BeginningEdit Event.

Please "Mark as Answer" if this post answered your question. :)
Visit my Blog: http://varshavmane.blogspot.com/

shub1234
shub1234

Member

Member

6 points

59 Posts

Re: Re: Re: Re: fetch the id of the control in a template of datagrid.

I want to fetch the control ID of the datahrid template in the loaded event of the grid

varshavmane
varshavmane

Contributor

Contributor

6723 points

1,580 Posts

Answered Question

Re: Re: Re: Re: Re: fetch the id of the control in a template of datagrid.

Hi,

Check this post: http://silverlight.net/forums/t/105792.aspx

HTH Smile

Please "Mark as Answer" if this post answered your question. :)
Visit my Blog: http://varshavmane.blogspot.com/
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities