in my application, i have used url rewriting(Seo friendly url) ,
in one my aspx page i am using radgrid with EnableSeoPaging true. when i set EnableSEOPaging false then paging is working fine.
when i set EnableSEOpaging true then radgrid paging does not work while in url querystring appned with page no.
like this
http://localhost:53500/alabama/alabaster?ctl00_MainContent_BusinessList1_RadGridListingChangePage=2
but page index of radgrid does not change only 1st page of data show in radgrid.
I also want url shoul look like,
http://localhost:53500/alabama/alabaster/2
how to handle these things
i did not analyze why paging does not work when i set EnableSEOPaging true.
<telerik:RadGrid ID="RadGridListing" runat="server" AutoGenerateColumns="false" ShowHeader="false"
BorderWidth="0" AlternatingItemStyle-BackColor="White" ItemStyle-BackColor="White"
OnNeedDataSource="RadGridListing_NeedDataSource" GridLines="None" ItemStyle-BorderStyle="None"
AlternatingItemStyle-BorderStyle="None" Skin="Vista" AllowPaging="true" PageSize="5"
PagerStyle-Mode="NextPrevAndNumeric" PagerStyle-BackColor="#F3F4F3"
OnItemCreated
="RadGridListing_ItemCreated">
<PagerStyle EnableSEOPaging="true"/>
<MasterTableView DataKeyNames="UserId" AllowPaging="true">
<Columns>
<telerik:GridTemplateColumn>
<ItemTemplate>
<div style="vertical-align: top">
<asp:HyperLink ID="HypPracticeName" runat="server" Text='<%#bind("PracticeName")%>'
ForeColor="#0A0A0A" Font-Bold="true" Font-Size="12px">
</asp:HyperLink>
</div>
<div>
<asp:Label ID="LblAddress" runat="server" Text='<%#Bind("StreetName") %>' Font-Size="12px"></asp:Label></div>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
in aspx.cs page
protected void RadGridListing_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
TList<BusinessUsers> objUsers = DataRepository.BusinessUsersProvider.GetByCityId(this.CityId);
objUsers.Sort(
"UserId asc");
if (objUsers.Count > 0)
RadGridListing.DataSource = objUsers;
}
protected void RadGridListing_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
long UserId = long.Parse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["UserId"].ToString());
TList<BusinessPerCity> objPerCity = DataRepository.BusinessPerCityProvider.GetByCityId(this.CityId);
objPerCity.Filter =
"IsFeatured = True";
objPerCity.ApplyFilter();
objPerCity.Sort(
"UserId asc");
//here is my business logic
}
}