Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Silverlight datagrid questions
8 replies. Latest Post by codism on December 3, 2008.
(0)
cloudeleven
Member
0 points
4 Posts
09-01-2008 10:35 AM |
I have 2 questions about the silverlight datagrid:
- How can I programmatically set a multiple selection of the datagrid? I have an array of selected rowID's and want to iterate the rows and set the ones that are in my array to 'selected'. Couldn't find anything that does this.
DataGridTextColumn
This doesn't work, but how can I accomplish this?
Skyrunner
Contributor
2489 points
485 Posts
09-01-2008 10:54 AM |
I think you cannot do that.
But you can do that:
textColumn.DataContext = MyArray[x];Binding binding = new Binding();
HarshBar...
Star
9908 points
1,719 Posts
09-01-2008 10:57 AM |
Hi,
You Can set Selection mode by Specifying Selection mode Property.
Example is below..
09-01-2008 11:00 AM |
Hi Harsh,
Yes I know about the selectionmode property, I already have that set on "Extended". But my question is how I can set the selected (highlighted) rows programmatically.
09-01-2008 11:06 AM |
Hi Skyrunner,
My DataGridTextColumn doesn't seem to have a DataContext property. Are you using beta2?
09-01-2008 11:29 AM |
cloudeleven:Hi Skyrunner, My DataGridTextColumn doesn't seem to have a DataContext property. Are you using beta2?
In fact I didn't try.
Try with GridView control.
gridView1.DataContext = xxx;
09-01-2008 1:24 PM |
Gridview? are we both on the silverlight forum?
09-02-2008 3:55 AM |
Sorry DataGrid1.DataContext = xxx;
I'm tired.
codism
372 points
121 Posts
12-03-2008 5:44 PM |
Any one has the answer/workaround to the original question in this thread? I am working on an UI that allows user to adjust the sequence of a list. To allow user to continuously press "Move Up" button, I have to preserve the user's selection between two clicks.
Thanks