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

MultiLine records refresh is unstable

I use LayoutColumns and make my records in GDBG multilined. When I add new data to underlying datatable, grid apparently fails to build the new rows in the proper order. Or at least it looks like it. Take as the example the following code. Clicking on the button few times make grid look very strange. DataSet ds; DataTable dt; DataView dv; private void Form1_Load(object sender, System.EventArgs e) { ds = new DataSet("MyDataset"); dt = new DataTable("MyTable"); dt.Columns.Add("MyCol1", typeof(int)); dt.Columns.Add("MyCol2", typeof(int)); dt.Columns.Add("MyCol3", typeof(int)); dt.Columns.Add("MyCol4", typeof(int)); ds.Tables.Add(dt); gridDataBoundGrid1.DataSource = dt; gridDataBoundGrid1.Binder.RootHierarchyLevel.LayoutColumns( new string [] { "MyCol1", "MyCol2", ".", "MyCol3", "MyCol4" }); return; } private void button1_Click(object sender, System.EventArgs e) { gridDataBoundGrid1.BeginUpdate(); gridDataBoundGrid1.Model.BeginUpdate(); DataRow nr = dt.NewRow(); nr["MyCol1"] = 1234; dt.Rows.Add(nr); gridDataBoundGrid1.Model.EndUpdate(); gridDataBoundGrid1.EndUpdate(); gridDataBoundGrid1.Refresh(); }

2 Replies

AD Administrator Syncfusion Team September 22, 2004 08:05 PM

Hi Jeck, try setting dataBoundGrid.UseListChanged = true; Then the grid will list to ListChanged events and new records gonna be reflected. Stefan


AD Administrator Syncfusion Team September 23, 2004 05:56 AM

Actually - my previous answer was wrong. I see the problem now with a sample. This is a bug in the ListChanged handler and we''ll get that corrected. For now, a workaround would be to set UseListChanged = false; But we''ll get that fixed. Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon