Jump to content

Grid ValidateEdit Event: Read Focused Row/Column Cell Value After Editing via ajax


andyhill

Recommended Posts

I need to send back via ajax the focused row, focused colX ([1] or by field name) the cell value - please advise how - thanks.

  MyScript:= 'validateedit=function validateedit(editor, context, eOpts) '#10+
             '{'#10+
             '  txt = this.columnManager.columns[1].getEditor().getValue(); '#10+
             '  ajaxRequest(MainForm.grdWorkSheet, ''_ValidateEdit_'', ["t="+txt]); '+
             '} ';
  grdWorkSheet.ClientEvents.ExtEvents.Add(MyScript);
 

 

Link to comment
Share on other sites

Not quite what I am after.

This is my JS code to read the Old Data and the Newly Typed Data OR the Newly Selected Combo Data.

  MyScript:= 'validateedit=function validateedit(editor, context, eOpts) '#10+
             '{'#10+
             '  n = context.value; '+
             '  o = context.record.data[context.field]; '+
             '  ajaxRequest(MainForm.grdWorkSheet, ''_ValidateEdit_'', ["new="+n, "old="+o]); '+
             '} ';
  grdWorkSheet.ClientEvents.ExtEvents.Add(MyScript);

In my grdWorkSheet _ValidateEdit_ event how can I replace the focused row's store data with the newly typed data and any other computed changes that I may have generated (a lot of logic has taken place inside the _ValidateEdit_ event, now I want the store's data to reflect my approved changes for that row).

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...