Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
760
XamDataGrid - adding a XamComboEditor to a field inside the grid
posted

Hi,

I have a table with some foreign keys, i am trying build a XamDataGrid, where the foreign keys are translated display the code as well as the user can edit them.

So i have come with the following code in my XAML.

My grid is auto generated and i control the display of fields from code behind.

case "ExpenseLedgerPlanKey": field.Label = "Expense Ledger Plan #";
                                field.Width = Infragistics.Windows.DataPresenter.FieldLength.Auto;

//unable to create  a binding path.
                                field.Settings.EditorStyle = (Style)Resources["YearsFieldStyle"];
                                break;

I tried creating a unbound field, it throws "Collection was modified; enumeration operation may not execute." exception, as i am controlling all the fields on the FieldLayout_Initialized event of the XamDataGrid.