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
65
UltraWebGrid databinding
posted

Hi, could anybody help in resolving the following problem?

I'm a newbie in Infragistics and really can't understand why I get the following behavior with UltraWebGrid:

I have a simple webform, put UltraWebGrid on it and created a datasource with an SqlSelectCommand retrieving data from a database. Simple 'Select * from Table where id=@id' - I setup id to get its value from a Session variable and setup a default value for it. If I browse my application it will display the proper data regarding default value of session variable.

Then I have some problems.. I want to change the session variable and refresh datagrid to display new data. I put a button and a label on a form and wrote the button OnClick Sub as simple as:

Session("A")=2  ' set new value to a session variable

SqlDataSource1.DataBind()

UltraWebGrid1.DataBind()

Label1.Text = "Rows = "+UltraWebGrid1.Rows.Count.ToString

 

Well, in the result, I'll still have the same rows (nothing has changed with my data in grid), the number of rows changes only if I click the button twice or more.

 What is wrong? :(

Thanks!