Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1370
UltraGrid doesn't refresh after setting DataSource
posted

Hi,

In winforms, I set datasource on a UltraGrid from DataSet with only 1 table. 

The Grid is OK, data are well displayed. 

When DataSet changes (Stored procedure with parameter), i reset the DataSource but the Grid doesn't change ! 

ultraGrid.Refresh() doesn't refresh anything. I tried manything ...

if (ds != null)
{
ds.Tables.Clear();
ds.Clear();
}
if (ds2 != null)
{
ds2.Tables.Clear();
ds2.Clear();
}

ds2 = Library.BLL.GetCRA(out error, dateSelect);

ds.Tables.Add(ds2.Tables[0].Clone());

for (int x = 4; x < ds.Tables[0].Columns.Count; x++)
ds.Tables[0].Columns[x].DataType = typeof(int);

foreach (DataRow dr in ds2.Tables[0].Rows)
   ds.Tables[0].ImportRow(dr);

grdCRA.DataSource = ds;
grdCRA.DataBind();
grdCRA.Refresh();

Parents Reply Children
No Data