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. Image for the cookie policy date

Virtual Tree Grid (2)

Hi, In the VirtTreeGrid sample, I try to add a method Insert in SampleDate class: public void Insert(int index, SampleData newData) { internalRowCount++; ArrayList array = new ArrayList(data); array.Insert(index, newData); data = (SampleData[])array.ToArray(typeof(SampleData)); data[GetParent(index)].ExpandState = TreeNodeState.Closed; data[GetParent(index)].ExpandState = TreeNodeState.Opened; } In a button_click: gridControl1.Model.BeginUpdate(Syncfusion.Windows.Forms.BeginUpdateOptions.None); externalData.Insert(3, new SampleData(1, TreeNodeState.NoChildren, ...); gridControl1.Model.EndUpdate(); The model has been changed, but not the view. If I collapse myself the parent and then expand it, then it is updated. How can I update it by code?

1 Reply

SL Sebastien Lange July 18, 2002 07:27 AM

externalData.CollapseData(index); this.gridControl1.ResetVolatileData();

Loader.
Live Chat Icon For mobile
Up arrow icon