Utilizing the devexpress bootstrap grid view, I have added a checkbox column to select rows and implemented a client-side event for handling selected items on change.
However, an issue arises occasionally where the selected rows array appears empty even though it contains data.
Is there a way to retrieve these selected rows from the server side? Can alternative client-side events be used instead of the Grid selected event?
<dx:BootstrapGridView ID="dgvData" runat="server" KeyFieldName="Id" Width="100%"
ClientInstanceName="dgvData" ClientSideEvents-SelectionChanged="OnDataGridSelectionChanged"
OnDataBinding="dgvData_DataBinding" EnableRowsCache="false">
<SettingsAdaptivity AdaptivityMode="HideDataCells" AllowOnlyOneAdaptiveDetailExpanded="true" />
<SettingsSearchPanel Visible="false" ShowApplyButton="true" />
<Settings ShowGroupPanel="false" ShowHeaderFilterButton="true" ShowFilterRow="true" />
<Columns>
<dx:BootstrapGridViewCommandColumn ShowSelectCheckbox="True" SelectAllCheckboxMode="AllPages" />
...
</Columns>
<SettingsPager PageSize="1000" PageSizeItemSettings-Visible="false" Visible="false"></SettingsPager>
<SettingsBootstrap Striped="true" />
</dx:BootstrapGridView>
<script type="text/javascript">
function OnDataGridSelectionChanged() {
dgvData.GetSelectedFieldValues('Id', OnDataGridSelectionComplete);
}
var DataKeys = [];
function OnDataGridSelectionComplete(values) {
DataKeys = values;
}
</script>