BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Ari,
Thank you for using Syncfusion products.
We have analysed your query and we are not able to reproduce the reported issue. Could you please share more details whether you are using the indexer binding or what type of column you are using or what kind of collection you are using (ObservableCollection, dynamic or DataTable) and the version you are using. This would help us provide the better resolution to you.
Please let us know if you have any queries.
Thanks,
Elavarasan M
Hi Ari,
Sorry for the inconvenience caused.
In your attached code snippet, you have created the new column with the previously added column mapping name and by adding this, it throws the exception as “Duplicate name exception – A column name already exists in datatable” and the columns in datatble should not be same name. You need to create the new column with the new mapping name and this need to differ from others. We have created the sample based on this and please find the sample from below location. If your scenario is different, please revert us by modify the sample and this will be helpful to provide the better resolution to you.
Sample location: http://www.syncfusion.com/downloads/support/forum/119492/ze/SfDataGridSample64366030
We don’t have support for use same MappingName for multiple columns. Since it leads to be a crash in multiple scenarios. So we suggest you to use different MappingName but you can use the same value for multiple columns. You can achieve this using Displaybinding and ValueBinding in GridColumn. Please refer the below code snippet to achieve your requirement.
Code Snippet:
<syncfusion:GridTextColumn MappingName="Meter" /> <syncfusion:GridTextColumn DisplayBinding="{Binding Meter, Converter={StaticResource converter}}" MappingName="Inch" UseBindingValue="True" ValueBinding="{Binding Meter, Converter={StaticResource converter}}" /> |
Sample:
http://www.syncfusion.com/downloads/support/forum/119492/ze/SfDataGridSample340835505
Please refer the below documentation link to know more about DisplayBinding and ValueBinding.
Please let us know if you have any queries.
Thanks,
Elavarasan M
I attached a sample where we have a sfDataGrid attached to DataTable with 4 fields, two with underscore in field name and two without it.
Thanks.