// <![CDATA[function ASPxGridView2_SelectionChanged(s, e) {
s.GetSelectedFieldValues("DisplayListPrice", GetSelectedFieldValuesCallback);
function GetSelectedFieldValuesCallback(values) {
if (e.isSelected) {
var Key = s.GetRowKey(e.visibleIndex);
if (!clientHiddenField.Contains(Key)) {clientHiddenField.Add(Key, Key +
"," + values);}
else {clientHiddenField.Set(Key, Key +
"," + values);}
}
if (!e.isSelected) {
var Key = s.GetRowKey(e.visibleIndex);
if (clientHiddenField.Contains(Key)) {clientHiddenField.Remove(Key);
}
}
}
}
// ]]>
.ASPx file
// Drag a hidden field control................................................
<dx:ASPxHiddenField ID="ASPxHiddenField1" runat="server"></dx:ASPxHiddenField>
// Inside ASPxGridView..................................................................
<ClientSideEvents SelectionChanged="ASPxGridView2_SelectionChanged" />
//.CS file.........................................
// how to get hidden field values..................................
foreach (object key in hiddenField){ string QP = string.Empty; string[] pars = Convert.ToString(key).Split(','); String v = pars[0];String DisplayDetailsID = pars[1];String OfferPrice = pars[2]; // IGV.GetRowValues(j, "DisplayDetailsID").ToString();for (int i = 0; i < (OfferPrice.Length - 1); i++) { QP = QP + OfferPrice[i]; }
customizing data in gridview
ReplyDelete