Hi,
I am trying to create the fileds dynamically.
So as to reflect, i am setting the datasource to null, clearing the fieldlayouts, then setting datasource again.
but, now, the groupbyarea fields are missing.
if i use the fieldSortDescription and add fields...its it coming in groupbyarea, but, if i click on fields its disappearing....
do we have any other possibility to add them dynamically as well?
if so, how?
or how to set the already dymanically added fileds to be in the groupbyarea.?
thanks
Here is ....
dg = xamdatagrid...
fieldlayout.clear() or Fieldlayouts.fields.clear()....both are eliminating the groupbyarea.
public void initialize(){
DataSet ds = GetDataSet("customer"); dg.DataSource = null;// dg.FieldLayouts.Clear(); dg.DataSource = ds.Tables[0].DefaultView; dg.UpdateLayout();}
void inits(object sender, FieldLayoutInitializedEventArgs e) { e.FieldLayout.Settings.AutoGenerateFields = false; FieldCollection fl = e.FieldLayout.Fields; Field f; fl.Clear(); f= new Field(); f.Name="firstname"; f.Label="name"; fl.Add(f); f = new Field(); f.Name = "details"; f.Label = "details"; fl.Add(f); dg.UpdateLayout();
}