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.

MultiLine records refresh is unstable

Thread ID:

Created:

Updated:

Platform:

Replies:

19296 Sep 22,2004 04:53 PM Sep 23,2004 05:56 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 22, 2004 04:53 PM

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(); }

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On 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

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.

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.

;