Dear
Sir or Madam,
I have 2
problems.
First of all, I
get a NullReferenceExcpetion on adding a new row in the Grid. I changed the
behavior of the enter key down handling, so it reacts like a tab. I don't know
where or why the Exception is thrown in the override void ProcessOnTapped function.
Second, I need a Combobox where I can
display diferent values in the DropDown Box and the displaymember in the
selected cell of the Grid. The property I want to show is not at the ItemSource
on the Grid, but on the ItemSource of the Combobox.
I managed to edit the DropDown Box in the
ComboBox, but can´t show the the selected value in the grid cell (only one
property)
I have attached a sample Project.
Thanks for your help
And with kind regards.
|
Queries |
Solutions | ||
|
I get a NullReferenceExcpetion on adding a new row in the Grid. I changed the behavior of the enter key down handling, so it reacts like a tab. I don't know where or why the Exception is thrown in the override void ProcessOnTapped function. |
Based on provided information we have checked the provided sample. In your application AddNewRow initiating event process AddNewRow commit and SelectedItems clear in event. These are different thread running at a time in your application. So, your requirement can be achieved by Calling the SfDataGrid.Dispatcher.BeginInvoke in AddNewRowInitiating in SfDataGrid. Please refer the below code snippet,
| ||
|
I need a Combobox where I can display diferent values in the DropDown Box and the displaymember in the selected cell of the Grid. The property I want to show is not at the ItemSource on the Grid, but on the ItemSource of the Combobox.
|
We are little unclear with your reported scenario. Based on provided information we suspect that your requirement is only display the Name property in GridComboBoxColumn. Only set the DisplayMember property as Name in GridComboBoxColumn. No need to define the Item Template in GridComboBoxColumn. Please refer the below code snippet,
Screenshot for your reference,
If your requirement is display the combobox itemsource values in SfDataGrid. You can achieve this by without set the DisplayMemeber property in GridComboBoxColumn in SfDataGrid. Please refer the below code snippet,
Screenshot for your reference,
If we misunderstood your requirement, please provide more information regarding the requirement. This would help us to proceed further.
|