void GridView_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { var control = sender as ASPxGridView; if (e.Parameters == "clear") { control.Selection.UnselectAll(); control.FocusedRowIndex = -1; ((ASPxGridLookup)this.Editor).Value = null; WriteValue(); } else if (e.Parameters.StartsWith("newObjId=")) { object newObject = helper.GetObjectByKey(this.CurrentObject, e.Parameters.Replace("newObjId=", "")); ((ASPxGridLookup)this.Editor).Value = newObject; WriteValue(); } }
private object GetObjectByKey(string key) { return(helper.GetObjectByKey(CurrentObject, key)); }
private void ComboBoxOnValueChanged(object sender, EventArgs e) { PropertyValue = _helper.GetObjectByKey(CurrentObject, $"{_comboBox.Value}"); WriteValue(); }