Click here to Skip to main content
11,489,693 members (70,171 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Silverlight
I have a grid, say Grid1.I have created DataGridTextColumns inside the grid dynamically using
DataGridTextColumn textColumn = new DataGridTextColumn();
textColumn.Header = "Marks";
 
Binding bind = new Binding("Marks");            
textColumn.Binding = bind;
Grid1.Columns.Add(textColumn);

And then i assign the itemsource of the grid.

Is there anyway of accessing the itmsource so that i can change the content of DataGridTextColumn. Like, after the itemsource has been assigned, i want to replace all marks(say-80) by marks+grades(80(A Grade)) in Marks column. So how do i access each column of itemsource after it has been assigned to grid???
Posted 6-Apr-13 3:14am
Edited 6-Apr-13 9:34am
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The power of corectly binding a datagrid to either a table or observable collection, is that you can change the underlying collection that is binded, to change their values.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 535
1 OriginalGriff 223
2 Andy Lanng 193
3 Maciej Los 190
4 _duDE_ 141
0 Sergey Alexandrovich Kryukov 9,488
1 OriginalGriff 8,425
2 Sascha Lefèvre 3,344
3 Maciej Los 3,066
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 6 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100