Hi all,
What im triyng to do here is resumed in this 2 lines:
System.Data.DataTable dt = data.RetValue.ds.Tables[0];xamDataGrid1.DataSource = dt;I'm getting the error canoot convert to Enumerable.
Best Regards,João Loureiro
I'm find the solution for myself in this case in FieldLayoutInitialized property i do the following:
But tell me if there is a better way :)
foreach
(Field field in e.FieldLayout.Fields)
{
switch (field.Label.ToString())
case "Description":
field.Label =
"Description Field";
break;
case "isexternal":
"Is External";
default:
}
You can do that for example in the FieldLayoutInitialized event, which will be fired when the FieldLayouts and Fields have been generated. Each FieldLayout exposes a Fields collection and each Field exposes a Label property which you can modify.
Once again thank you, one more thing, setting the Data Source as xamDataGrid1.DataSource = dt.DefaultView, how can i modify fields header?
There are properties like SelectionTypeCell, SelectionTypeField, SelectionTypeRecord of the FieldLayoutSettings, which you can use to control selection behavior. There are also CellClickAction, LabelClickAction of the FieldSettings which will give you some more control over it.
Yes, the selected items collection holds the objects that are selected. You can individually check if a record for example is selected through the IsSelectedProperty.
You can get the associated with a cell record, through the e.Cell.Record property. There is no way however to go from a field to get the record.
Ok thank you!
I have a few more questions, how to disable select by field and/or select by cell? Only select by record is availiable?
The only way to check selected items is by
xamDataGrid1.SelectedItems.Records, xamDataGrid1.SelectedItems.Fields, xamDataGrid1.SelectedItems. Cells?
It is possible from selected cell/field get the Record?