Hi,
I have run into a bit of a problem with Sorting my grid and it seems to be related to the datasource, but I can't see why.
Originally in the code behind I had in the NeedDatasource event for my grid:
Sorting works.
I've now removed the sproc (usp_MER_Sellers_GetAll) from my DAL and access it using a SQL Datasource object on my aspx page.
Then in the codebehind's NeedDatasource for my grid I use:
Sorting on my grid, now doesn't work and I don't see why.
Any help would be greatly appreciated.
Thanks.
I have run into a bit of a problem with Sorting my grid and it seems to be related to the datasource, but I can't see why.
Originally in the code behind I had in the NeedDatasource event for my grid:
Dim lnqMerchSellers = db.usp_MER_Sellers_GetAll(drpStatus.SelectedValue, iSelectedCountryGroup, PageHelper.getUserAccessLevel(Profile.License, HttpContext.Current.User.Identity.Name, "Merchandise").ToString())rgdMerchSellerList.DataSource = lnqMerchSellersSorting works.
I've now removed the sproc (usp_MER_Sellers_GetAll) from my DAL and access it using a SQL Datasource object on my aspx page.
<asp:SqlDataSource ID="sqlUserList" runat="server" ConnectionString="<%$ ConnectionStrings:AU_Deals_ConnectionString %>" SelectCommand="usp_MER_Sellers_GetAll" SelectCommandType="StoredProcedure" />Then in the codebehind's NeedDatasource for my grid I use:
sqlUserList.SelectParameters.Clear()sqlUserList.SelectParameters.Add("filter", DbType.Int32, drpStatus.SelectedValue)sqlUserList.SelectParameters.Add("countryGroupID", DbType.Int32, iSelectedCountryGroup.ToString())sqlUserList.SelectParameters.Add("accessLevel", DbType.String, PageHelper.getUserAccessLevel(Profile.License, HttpContext.Current.User.Identity.Name, "Merchandise").ToString())rgdMerchSellerList.DataSource = lnqMerchSellersSorting on my grid, now doesn't work and I don't see why.
Any help would be greatly appreciated.
Thanks.
