Hi all,
i try to use a XamDataGrid control in my application. But i don't understand how can i expand the records. I show data from customers table in DataGrid with DataSet.
xamDataGrid1.DataSource = _nds.Customers;
xamDataGrid1.FieldSettings.ExpandableFieldRecordExpansionMode = ExpandableFieldRecordExpansionMode.ExpandAlways;
xamDataGrid1.FieldLayoutSettings.AllowAddNew = true; xamDataGrid1.FieldLayoutSettings.AllowDelete = true;
I can see the empty table but i see no data.
And another question. How can i delete the row? If i press Delete taste selected row is deleting from DataGrid but not from table in the database. What must i do yet?
thanks
Hi,
To expand all of the records, you can hook the grid's InitializeRecord event and put this code in the code-behind file:
void xamDG_InitializeRecord(object sender, InitializeRecordEventArgs e){ e.Record.IsExpanded = true;}
Aauge2002 said:How can i delete the row? If i press Delete taste selected row is deleting from DataGrid but not from table in the database. What must i do yet?
XamDataGrid does not delete anything from databases. It only adds/removes/modifies data in the data source object. It is the application developer's job to move those changes to other parts of their application, such as a database.
Josh