Hi Isaac,
Thank you for contacting Syncfusion support,
We have analyzed your query and you can achieve your requirement “Manually data fill” by using dynamic type column to load by the button click. Please refer the attached sample in following location.
Sample location: http://www.syncfusion.com/downloads/support/directtrac/118305/Manually_Add_the_Column-1149750162.zip
If your requirement is differ from this, please share more details regarding your request or else please modify the sample based on your requirement that would be more helpful for us to serve you better.
Please let us know if you have any other queries.
Regards,
Mohanraj.
Hi Isaac,
We are sorry about the inconvenience caused.
We have provide the solution for this query ”Manually data fill” in Incident 135831. Please check this incident for more details.
Please let us know if you have any queries.
Regards,
Mohanraj
Hi Isaac,
Thank you for your update.
Please let us know if you require further assistance from us.
Hi Manik,
Sorry for the delay in response.
If you want to add column dynamically in SfDataGrid, you can use “Columns.Add()” to add the column dynamically by using dynamic. We have customized the sample to add column and property at runtime using dynamic as per your need. Please refer the below code,
Code:
private void Button_Click(object sender, RoutedEventArgs e)
{
var colleciton = (this.syncgrid.DataContext as OrderInfoViewModel).DynamicOrders as ObservableCollection<dynamic>;
colleciton[0].Country = "USA";
this.syncgrid.Columns.Add(new GridTextColumn() { MappingName = "Country" });
}
Please let us know if you have any concerns.
Regards,
Muthukumar K