please I need try the DataEvents function in Lib.Web.mvc but is no implemented or I don't know how to use this is my code. I use jqGridImport because I generate the columns dynamically
IList<JqGridColumnDataEvent> lstDataEvents = new List<JqGridColumnDataEvent>();
lstDataEvents.Add(new JqGridColumnDataEvent("keypress", "function(e) { soloNumeros() }", null));
jqm = new JqGridColumnModel(NombreColumna) { Index = NombreColumna, Width = 60, Editable = true, Alignment = JqGridAlignments.Right, EditType = JqGridColumnEditTypes.Text, Searchable = false, EditRules = new JqGridColumnRules() { Required = true, Number = true }, Sortable = false, EditOptions = new JqGridColumnEditOptions() { DataEvents = lstDataEvents } };
There is no way to use
DataEventsandjqGridImport.The
jqGridImportfunctionality grabs the whole jqGrid configuration by using AJAX request which returns JSON and then builds jqGrid based on that. DataEvents represent reference to JavaScript functions which should handle specific events - there is no way to pass reference to a function in JSON payload (there are some theoretical workarounds withevaletc. but jqGrid would have to natively support that and it doesn't).