Hi I am using hierarchial grid.
I bind it to data set with two tables
gridDataBoundGrid1.DataMember = "QueryThreads";
gridDataBoundGrid1.DataSource = ds;
gridModel.Options.AllowSelection = GridSelectionFlags.AlphaBlend|GridSelectionFlags.Row|GridSelectionFlags.Keyboard|GridSelectionFlags.Shift;
GridStyleInfo standard = gridModel.BaseStylesMap["Standard"].StyleInfo;
standard.ShowButtons = GridShowButtons.ShowCurrentRow;
standard.CellType = "Static";
// cache grid model and binder
// Reduce flicker
GridHierarchyLevel queryLevel = gridDataBoundGrid1.Binder.AddRelation("QueryThreadQuery");
on button click in child table I add a row
DataTable queryTable = ds.Tables["Queries"];
DataRow qRow = queryTable.NewRow();
qRow["QueryThreadGuid"] = query.QueryThreadGuid;
qRow["QueryGuid"] = query.QueryGuid;
qRow["CreationReason"] = query.CreationReason;
qRow["EndUser"] = query.EndUserName;
qRow["Created"] = query.Created.ToShortDateString();
qRow["FieldName"] = query.FieldName;
qRow["SubjectInitials"] = query.SubjectInitials;
qRow["VisitName"] = query.VisitName;
qRow["FormName"] = query.FormName;
to show the new row in grid
I call Update() function of grid but still new row is not displayed
Thanks in advance
ADAdministrator Syncfusion Team August 17, 2004 07:34 AM
To get a new row added to the child gird to display, you will have to open and close the parent node.
Take a look at the threads listed in this previous post. They contain samples.
UMUmangiAugust 17, 2004 07:44 AM
Thanks for reply
I saw those samples but for them if they collapse and expand the parent node the row gets displayed. but not in my case . do you know any reason ?
>To get a new row added to the child gird to display, you will have to open and close the parent node.
>Take a look at the threads listed in this previous post. They contain samples.
ADAdministrator Syncfusion Team August 17, 2004 07:52 AM
Is queryTable the child table or the parent table?
If it is the parent table, try calling grid.Refresh().
If it is the child table, then I think opening and closing the parent node should display it. In this case, if you physically click the parent node to close it, and then click it again to re-open it, does the new row appear?
ADAdministrator Syncfusion Team August 17, 2004 07:54 AM
yes physically clicking to collapse and expand does not show the new row
ADAdministrator Syncfusion Team August 17, 2004 07:58 AM
The only thing I can think of is that the contraint that puts a row into this particular child table is not being satisfied. (Is the parent relation value in the row the correct one to place it in the current parent?)
If you can attach a sample project showing the problem, we can try to spot something here?