This example illustrates how to display a custom text inside ASPxGridLookup when all rows are selected.
To implement this scenario, perform the following steps:
Handle the ASPxGridLookup.ValueChanged event to pass some flag to the client side based on the lookup selection:
[JScript]protected void gridLookup_ValueChanged(object sender, EventArgs e){ ASPxGridLookup gl = sender as ASPxGridLookup;if(gl.GridView.Selection.Count == gl.GridView.VisibleRowCount) gl.GridView.JSProperties["cp_selected"] = true;}
Then handle the client-side EndCallback event and set a custom text if our flag has the "true" value (i.e. all rows are selected):
[JScript]function OnEndCallback(s, e){if(s.GetGridView().cp_selected){ s.GetInputElement().value = "(Select All)";delete(s.GetGridView().cp_selected);}}