I'm trying to get the KeyField value from the FocusedRow in devexpress aspxGridview.
Following code i have so far
GridView
<dx:ASPxGridView ID="ClientenSummary" runat="server" Width="700px" OnSelectionChanged="ClientenSummary_SelectionChanged" EnableCallBacks="False"> <ClientSideEvents FocusedRowChanged="function(s, e)
{ OnGridFocusedRowChanged(); }" />
<SettingsBehavior AllowSelectByRowClick="True" AllowSelectSingleRowOnly="True" ProcessSelectionChangedOnServer="True" /> <SettingsPager PageSize="50"> </SettingsPager> <Settings ShowFilterRow="True" ShowFilterRowMenu="True" /> </dx:ASPxGridView>
JavaScript function in asp page markup
<script language="javascript" type="text/javascript"> function OnGridFocusedRowChanged() { ClientenSummary.GetRowValues(ClientenSummary.GetFocusedRowIndex(), 'ClassNR', OnGetRowValues); } function OnGetRowValues(values) { window.location = "../main.aspx?FocusedRowKeyField=" + values[0]; } </script>
Backend C# code to resolve the query string
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.Params["FocusedRowKeyField"])) { GetClientDetails(Request.Params["FocusedRowKeyField"]); }
The thing i can't to figure out is , why the QueryString isn't resolved. After some investigation on the interwebs i can't find a decent solution, so thats why I'm asking here. Hope someone can help