Hi All,
I have an entirely code-behind, C#, RadGrid in a SharePoint web part.
It needs to be able to switch between tables in a SQL database through the use of a drop-down list (containing the table names), and I have implemented this functionality by storing/retrieving the value of the drop-down list in a Page.Session variable.
The SqlDataSource and RadGrid are both built in CreateChildControls based upon the selected SQL Table from the drop-down list. The RadGrid is manually built based upon the DataView/Table acquired through the SqlDataSource with GridBoundColumns, GridDateTimeColumns and Google-Like Filtering Columns based upon the datatype of the field/column.
When the drop-down list's value is changed that value is stored in a Page.Session variable and a response.redirect is called, refreshing the entire page, retrieving the selected SQL Table from the Page.Session variable and therefore building a new SqlDataSource and RadGrid with the new Table data.
This works well, but causes issues when multiple tabs/browser windows are open at the same time. Since I use Page.Session to store the drop-down list value all of the tabs/browsers open will be of the same table on a per User basis, and they would like to ensure that each tab/window is unique.
Is there a better way of implementing this?
Thanks,
Mark
I have an entirely code-behind, C#, RadGrid in a SharePoint web part.
It needs to be able to switch between tables in a SQL database through the use of a drop-down list (containing the table names), and I have implemented this functionality by storing/retrieving the value of the drop-down list in a Page.Session variable.
The SqlDataSource and RadGrid are both built in CreateChildControls based upon the selected SQL Table from the drop-down list. The RadGrid is manually built based upon the DataView/Table acquired through the SqlDataSource with GridBoundColumns, GridDateTimeColumns and Google-Like Filtering Columns based upon the datatype of the field/column.
When the drop-down list's value is changed that value is stored in a Page.Session variable and a response.redirect is called, refreshing the entire page, retrieving the selected SQL Table from the Page.Session variable and therefore building a new SqlDataSource and RadGrid with the new Table data.
This works well, but causes issues when multiple tabs/browser windows are open at the same time. Since I use Page.Session to store the drop-down list value all of the tabs/browsers open will be of the same table on a per User basis, and they would like to ensure that each tab/window is unique.
Is there a better way of implementing this?
Thanks,
Mark