Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
e.CurrentSelectedRows[0].DataKey[0] rreturn NULL
posted

I have a simple grid that is in runtime bound to the DataTable object. (in Page_Load event)

On the server event  RowSelectionChanged the e.CurrentSelectedRows[0].DataKey[0] return always null!!

My markup:

 

<ig:WebDataGrid ID="wdgSearchHistory" runat="server" Height="200px" Width="100%"

 

AutoGenerateColumns="False"

 

ShowHeader="False" EnableDataViewState="True" DataKeyFields="searchTime"

 

OnRowSelectionChanged="wdgSearchHistory_RowSelectionChanged"

 

EnableAjax="True" EnableViewState="true" >

 

<Columns>

 

<ig:BoundDataField DataFieldName="QueryHTML" Key="QueryHTML">

 

<Header Text="QueryHTML" />

 

</ig:BoundDataField>

 

<ig:BoundDataField DataFieldName="searchTimestr" Hidden="true" Key="searchTimestr">

 

<Header Text="searchTimestr" />

 

</ig:BoundDataField>

 

<ig:BoundDataField DataFieldName="searchTime" Hidden="true" Key="searchTime">

 

<Header Text="searchTime" />

 

</ig:BoundDataField>

 

</Columns>

 

<Behaviors>

 

<ig:Activation>

 

</ig:Activation>

 

<ig:Selection CellClickAction="Row" RowSelectType="Single">

 

<AutoPostBackFlags RowSelectionChanged="True" />

 

</ig:Selection>

 

</Behaviors>

 

</ig:WebDataGrid>