I have a telerik radgrid with paging enabled and attaching the oncommand client event messes up paging.
Without the oncommand event, I am able to click on page numbers on the pager and it properly shows the selected page number text in bold.
But if I attach a oncommand event, it does not highlight the selected page number at all. And all the page numbers remain as hyperlinks including the selected page. Here is the sample code to reproduce this issue. Can some one please let me know if there is a fix ? I need to be able to trap the commands and cancel them if possible before postback happens to the server. And pagination is very critical for me as well. I tried to attach the oncommand event handler in the server side code(on page load event) but it doesnt help.
Appreciate your help.
Without the oncommand event, I am able to click on page numbers on the pager and it properly shows the selected page number text in bold.
But if I attach a oncommand event, it does not highlight the selected page number at all. And all the page numbers remain as hyperlinks including the selected page. Here is the sample code to reproduce this issue. Can some one please let me know if there is a fix ? I need to be able to trap the commands and cancel them if possible before postback happens to the server. And pagination is very critical for me as well. I tried to attach the oncommand event handler in the server side code(on page load event) but it doesnt help.
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock2"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function onInqGridCmd(sender, eventArgs) {
}
</
script
>
</
telerik:RadCodeBlock
>
<
telerik:RadGrid
ID
=
"RadGrid1"
DataSourceID
=
"SqlDataSource1"
EnableEmbeddedSkins
=
"true"
Skin
=
"Gray"
AllowSorting
=
"True"
AllowPaging
=
"True"
PageSize
=
"5"
runat
=
"server"
GridLines
=
"None"
Width
=
"100%"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"true"
SaveScrollPosition
=
"true"
UseStaticHeaders
=
"true"
/>
<
ClientEvents
OnCommand
=
"onInqGridCmd"
></
ClientEvents
>
</
ClientSettings
>
</
telerik:RadGrid
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers" runat="server"></
asp:SqlDataSource
>
Appreciate your help.