Hi:
I have a CellTemplate/CellEditTemplate column in a grid:
The project RadComboBox is populated based upon a customer selected in another combobox column in the grid.
Right now, I am binding to a view WCF RIA collection so that I can get the project name (projname). What I would really like to do is bind directly to the underlying TimeCharge table collection. This will make it much easier to edit the contents. The problem is that I want to display the project name (ProjName), not the ProjectID (an integer) in the textblock, but that field does exist in the TimeCharge table, only the ProjectID. It is easy to show the descriptive project name in the combobox of the CellEditTemplate, but how do I make the textblock show this as well?
I am having a hard time explaining this. Do you understand? If so, do you have any good ideas for a solution?
I have a CellTemplate/CellEditTemplate column in a grid:
<
radGridView:GridViewDataColumn
Header
=
"Project"
DataMemberBinding
=
"{Binding ProjectID, Mode=TwoWay}"
>
<
radGridView:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding ProjName}"
Loaded
=
"TextBlock_Loaded"
/>
</
DataTemplate
>
</
radGridView:GridViewDataColumn.CellTemplate
>
<
radGridView:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
radInput:RadComboBox
x:Name
=
"cboProject"
DisplayMemberPath
=
"ProjName"
Text
=
"{Binding ProjName, Mode=TwoWay}"
SelectedValue
=
"{Binding ProjectID, Mode=TwoWay}"
Loaded
=
"cboProject_Loaded"
SelectionChanged
=
"cboProject_SelectionChanged"
/>
</
DataTemplate
>
</
radGridView:GridViewDataColumn.CellEditTemplate
>
</
radGridView:GridViewDataColumn
>
The project RadComboBox is populated based upon a customer selected in another combobox column in the grid.
Right now, I am binding to a view WCF RIA collection so that I can get the project name (projname). What I would really like to do is bind directly to the underlying TimeCharge table collection. This will make it much easier to edit the contents. The problem is that I want to display the project name (ProjName), not the ProjectID (an integer) in the textblock, but that field does exist in the TimeCharge table, only the ProjectID. It is easy to show the descriptive project name in the combobox of the CellEditTemplate, but how do I make the textblock show this as well?
I am having a hard time explaining this. Do you understand? If so, do you have any good ideas for a solution?