Custom Edit Action

Nov 5, 2012 at 2:50 PM

I am trying to figure out if there is a way to set up custom editing action for clicking the edit button on the navigator.  What I want is to call an action to render a partial view into my current page so I can use a rich text editor instead of the default JQuery UI dialog.  I see the attributes for the cells but I think that is only for inline editing?

Thanks

Coordinator
Nov 5, 2012 at 7:32 PM

Depending on how far you need to go with the customization, you have several options.

If you need to customize edit element for single column, you can use some of following properties from JqGridColumnEditableAttribute:


  • DataInit
  • CustomElementFunction
  • CustomElementValue

If you want to make general modification to the form which is constructed by jqGrid you can use one of following events available through JqGridNavigatorEditActionOptions:

  • OnInitializeForm
  • BeforeInitData
  • BeforeShowForm
  • AfterShowForm

But if you want to display your own form, it is better to disable defaut editing and create your own button with AddNavigatorButton method.

Nov 5, 2012 at 9:54 PM

Sounds like the third option is what I am looking for.  Thanks.