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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding row in hierarchial grid.

Thread ID:

Created:

Updated:

Platform:

Replies:

17792 Aug 17,2004 12:08 PM UTC Aug 17,2004 12:58 PM UTC Windows Forms 5
loading
Tags: GridControl
Umangi
Asked On August 17, 2004 12:08 PM UTC

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; qRow["Screening"]= query.ScreeningNumber; qRow["Unread"]=false; queryTable.Rows.Add(qRow); to show the new row in grid I call Update() function of grid but still new row is not displayed Thanks in advance

Administrator [Syncfusion]
Replied On August 17, 2004 12:34 PM UTC

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. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17790

Umangi
Replied On August 17, 2004 12:44 PM UTC

Clay 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. > >http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17790

Administrator [Syncfusion]
Replied On August 17, 2004 12:52 PM UTC

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?

Administrator [Syncfusion]
Replied On August 17, 2004 12:54 PM UTC

yes physically clicking to collapse and expand does not show the new row

Administrator [Syncfusion]
Replied On August 17, 2004 12:58 PM UTC

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?

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

;