The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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();
}
ADAdministrator Syncfusion Team September 23, 2004 12:05 AM UTC
Hi Jeck,
try setting dataBoundGrid.UseListChanged = true;
Then the grid will list to ListChanged events and new records gonna be reflected.
Stefan
ADAdministrator Syncfusion Team September 23, 2004 09:56 AM UTC
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