My form contains an AspxGridView. I have a scenario where upon checking the select checkbox, I trigger a ClientSideEvents event to retrieve selected row values and display them in a listbox:
<dx:ASPxListBox ID="listBox" ClientInstanceName="lb" runat="server"
ValueType="System.String" Width="961px"></dx:ASPxListBox>
<ClientSideEvents SelectionChanged="grid_SelectionChanged" />
function grid_SelectionChanged(s, e) {
s.GetSelectedFieldValues('A;B;C;D;E;F;G;H;I', GetSelectedFieldValuesCallback);
}
function GetSelectedFieldValuesCallback(selectedValues) {
lb.ClearItems();
if (selectedValues.length == 0) return;
l = "";
for (i = 0; i < selectedValues.length; i++) {
s = "";
for (j = 0; j < selectedValues[i].length; j++) {
s = s + selectedValues[i][j] + " - ";
}
l = l + s + "\r\n";
lb.AddItem(s);
}
}
Furthermore, when I add datatextcolumns for textboxes and update the javascript function as shown below, I encounter an issue where I receive null values for textboxes.
<dx:GridViewDataTextColumn FieldName="textBox1" VisibleIndex="9">
<Settings AllowHeaderFilter="False"></Settings>
<DataItemTemplate>
<dx:ASPxTextBox ID="txtBox1" Width="70" runat="server"></dx:ASPxTextBox>
</DataItemTemplate>
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="textBox2" VisibleIndex="10">
<Settings AllowHeaderFilter="False"></Settings>
<DataItemTemplate>
<dx:ASPxTextBox ID="txtBox2" Width="70" runat="server"></dx:ASPxTextBox>
</DataItemTemplate>
</dx:GridViewDataTextColumn>
function grid_SelectionChanged(s, e) {
s.GetSelectedFieldValues('A;B;C;D;E;F;textBox1;textBox2;G;H;I',
GetSelectedFieldValuesCallback);
}
How can I resolve this issue?