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
30
UltraWebGrid 20081 - Loose rows on second postback
posted

Hello,

I have a UltraWebGrid control that contains a web WebDataChooser for the user to pick a country from the list and enter a Start and End Date value, simple is that.

I have isolated the control on a page with no other logic to reproduce this issue and still looses the inserted row on the second postback (have a button on the page to fire postback...)

Has anyone ran into this? Or is it a bug on the control?

Bellow is the code to initialize the control to populate the WebDataChooser  and set some other settings.

Thank very much in advance!

 ***************************************************************************************************************

private void InitializeGrid()

{

if (!isEditMode)

{

UltraWebGrid1.DisplayLayout.AllowUpdateDefault = Infragistics.WebUI.UltraWebGrid.
AllowUpdate.Yes;

UltraWebGrid1.DisplayLayout.AllowDeleteDefault = Infragistics.WebUI.UltraWebGrid.AllowDelete.Yes;

UltraWebGrid1.DisplayLayout.AllowAddNewDefault = Infragistics.WebUI.UltraWebGrid.AllowAddNew.Yes;UltraWebGrid1.DisplayLayout.AddNewRowDefault.Visible = Infragistics.WebUI.UltraWebGrid.AddNewRowVisible.Yes;

}

this.SqlDataSource1.ConnectionString = CommonVariables.GetConfigSection("nhibernate", "hibernate.connection.connection_string");

this.CountryDS.ConnectionString = CommonVariables.GetConfigSection("nhibernate", "hibernate.connection.connection_string");

this.UltraWebGrid1.DisplayLayout.Bands[0].Columns.FromKey("trvl_cntry_id").ValueList.DataSource = CountryList();

this.UltraWebGrid1.DisplayLayout.Bands[0].Columns.FromKey("trvl_cntry_id").ValueList.DisplayMember = "CNTRY_NM";

this.UltraWebGrid1.DisplayLayout.Bands[0].Columns.FromKey("trvl_cntry_id").ValueList.ValueMember = "CNTRY_ID";

this.UltraWebGrid1.DisplayLayout.Bands[0].Columns.FromKey("trvl_cntry_id").ValueList.DataBind();

 

}

 

 ***************************************************************************************************************

Parents
No Data
Reply
  • 30
    posted

    Found the answer. I removed DataSourceID="SqlDataSource1" (Since I'm doing it in the codebehind...) and it worked. Now If you remove this value from the Design Mode, you will loose your manually entered columns!. Which is what I did. 

    Thank you.

Children
No Data