Silverlight / WPF - access value from datagrid

Asked By Saurabh ...... on 05-Jun-09 11:22 AM
i hav a silverlight data gird control in which i hav datagridtemplate column. as

<Data:DataGridTextColumn Width="25" Binding="{Binding UserName}" >

and

 <data:DataGridTemplateColumn Header="Role" Width="138">

                    <data:DataGridTemplateColumn.CellTemplate>

                        <DataTemplate >

                            <TextBlock Text="{Binding Mode=TwoWay, Path=UserId}" VerticalAlignment="Center"  />

                        </DataTemplate>

                    </data:DataGridTemplateColumn.CellTemplate>

                </data:DataGridTemplateColumn>


now how can i access the value of these columns at runtime


Re - Ravenet Rasaiyah replied to Saurabh ...... on 05-Jun-09 11:59 AM

Hi

To access the rows in grid in WPF is little tricky. and not like windows gridview.

http://www.codeproject.com/KB/WPF/WPFDataGridExamples.aspx

thank you