Hi,
I have a AspxGridView and when i double click to a row, it shows a modal window. What i want to do is, send one columns' value to a AspxLabel which is at ModalWindow. But i couldn't manage to do it, in gridview i use ClientSideEvents RowDblClick to get row value. Here is the code:
GridView:
<dxwgv:ASPxGridView ID="gw_Parameters" runat="server"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua"
AutoGenerateColumns="False" ClientInstanceName="grid"
OnCustomDataCallback="gw_Parameters_CustomDataCallback">
<ClientSideEvents RowDblClick="function(s, e) {
grid.GetValuesOnCustomCallback(e.visibleIndex, ShowModalWindow())
}" />
Script:
function ShowModalWindow(val)
{
pcc_Question.Show();
lblCQuestionText.SetText(val);
}
And c#:
protected void gw_Parameters_CustomDataCallback(object sender, ASPxGridViewCustomDataCallbackEventArgs e)
{
int visibleIndex = Convert.ToInt32(e.Parameters);
string fieldName = string.Empty;
if (gw_Parameters.VisibleColumns[0] is GridViewCommandColumn)
fieldName = ((GridViewDataColumn)gw_Parameters.VisibleColumns[3]).FieldName;
else
fieldName = ((GridViewDataColumn)gw_Parameters.VisibleColumns[2]).FieldName;
e.Result = gw_Parameters.GetRowValues(visibleIndex, fieldName);
}
Thanks for the help,
Mehmet Şerif Tozlu