BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Hi Vasanth,
Thank you for using Syncfusion
products.
We have analyzed your query. You
can achieve your requirement for dynamically adding the columns and set the SubjectName
as HeaderText and scores as values by using Indexer binding. We have prepared a
sample based on this and please find the sample under the following location,
Please let us know if you need
further assistance.
Thank you,
Jai Ganesh S
Hi Vasanth,
Thank you for the update.
We have analyzed your query. You can also create the columns by using indexer binding in Xaml like code behind. We
have modified the sample based on this and please find the sample under the
following location,
Sample:
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
Hi Vasanth,
We areunclearabout how SfDataGrid generatescolumns for the indexer properties. If you are expecting something like similar to SfDataGrid.AutoGenerateColmns property, thenit is not possible to auto generate columns for complex/indexer properties. If you want to add columns dynamically,then you have to use code behind to add columns based onyour requirement.
We have support to auto generate columns of direct properties of data by setting SfDataGrid.AutoGenerateColumns. But, you have to define column in XAML or you have to add columns from code behindfor complex and indexer property.
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
Hi Vasanth,
We are sorry about the inconvenience caused.
We analyzed your query. You can achieve your requirement by setting “UseBindingValue” property as true in the column. When we set UseBindingValue property in GridColumn to true then Sorting, Grouping and Filtering make use of binding defined in GridColumn instead of reflection to manipulate the data.
Code Snippet [XAML]:
<syncfusion:GridTextColumn MappingName="SubjectList[0].Score" HeaderText="Physics" UseBindingValue="True"/> |
We have also modified the sample based on this and please find the sample under the following location:
Please find the following Kb link to shows the UseBindingValue in Complex properties,
Kb Link:
http://help.syncfusion.com/ug/wpf/index.html#!Documents/complexpropertybinding.htm
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S