How to bind more than one value to a DatagridTemplate column in silverlight? -
I have a button with one button to edit the row, but the ID key is not the only value, but the three values I How can I set three values so that I click on the button, I get three values in the back code?
Column
& lt; Dg: DataGridTemplateColumn header = "edit" & gt; & Lt; DG: DataGridTemplateColumn.CellTemplate & gt; & Lt; DataTemplate & gt; & Lt; Button Content = "Adjust" DataContext = "{Binding WId1}" = "EditButton_Click" /> & Lt; / DataTemplate & gt; & Lt; / DG: DataGridTemplateColumn.CellTemplate & gt; & Lt; / DG: DataGridTemplateColumn & gt;
I want to pass w1d, wId2, wId3. Also, string value wId1 + wId2 + wId3?
It is possible to pass that value, please give me any advice about this, thank you very much.
Why do not you bind the whole thing into datacentact using {binding}? In the back-code, you can contact the data type in your object type and access your desired attribute.
You can also keep a custom attribute with an array or a list of different IDs and can tie it.
If you want for some reason to pass only the ID behind the code, you can use ValueConverter which returns only one list or an array ID.
{binding converter = {StaticResource MyConverter}}
Hope it helps.
Comments
Post a Comment