We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

data binding with Dynamically Generated SdDataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

123525 Mar 25,2016 02:47 PM UTC Apr 5,2016 02:21 PM UTC WPF 4
loading
Tags: SfDataGrid
Dmytro
Asked On March 25, 2016 02:47 PM UTC

Hallo there!
I have some question about SfDataGrid:
I need dynamically create the table with N columns
After SfDataGrid creation i created columns:

            foreach (var v in _list)
            {
                sfDataGrid2.Columns.Add(new GridTextColumn() {HeaderText = v.chName});
            }
           sfDataGrid2.ItemsSource = model1.Collection2;

After that actions i can see my new columns , but i cant understand how to fill the table?
How to  add new row with N-parameters?
Can i bind my datasourse with dinamically creadted sfDataGrid?

Dmytro
Replied On March 28, 2016 07:10 AM UTC

Hallo there!
I have some question about SfDataGrid:
I need dynamically create the table with N columns
After SfDataGrid creation i created columns:

            foreach (var v in _list)
            {
                sfDataGrid2.Columns.Add(new GridTextColumn() {HeaderText = v.chName});
            }
           sfDataGrid2.ItemsSource = model1.Collection2;

After that actions i can see my new columns , but i cant understand how to fill the table?
How to  add new row with N-parameters?
Can i bind my datasourse with dinamically creadted sfDataGrid?

Sorry for inaccuracy. I want to add a new line with the changes in my collection

Srinivasan Vasu [Syncfusion]
Replied On March 28, 2016 11:12 AM UTC

Hi Dmytro,

Thanks for contacting Syncfusion support.

We have analyzed your query and we have prepared the sample as per your requirement by create DataTable dynamically in SfDataGrid. You can download the sample from the below location.

Sample: http://www.syncfusion.com/downloads/support/forum/123525/ze/Dynamic_DataTable2020643212

Please refer the below UG link to know more about DataBinding in SfDataGrid,

Link: http://help.syncfusion.com/wpf/sfdatagrid/data-binding

Please let us know if you require further assistance on this.

Regards,
Srinivasan



Dmytro
Replied On April 4, 2016 08:31 AM UTC

Thanks for your reply. it is complete answer of my question. but I would like to clarify one moment:
SfDataGrid  is replacement of DataGrid or "wrapper" of this class?


Jai Ganesh S [Syncfusion]
Replied On April 5, 2016 02:21 PM UTC

Hi Dmytro,


The SfDataGrid is a replacement of DataGrid and its not a wrapper of DataGrid. SDataGrid has all the features as like as MSDataGrid and also have some additional features, better performance, and user friendly.


UG Link: http://help.syncfusion.com/wpf/sfdatagrid/overview


Regards,

Jai Ganesh S



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;