[ 3 posts ]

Venkata Sirish

  • Username: gurumvg
  • Joined: Thu Jun 17, 2010 10:30 am
  • Posts: 38
  • GitHub: gurumvg
  • Gists: gurumvg
  • IRC: gurumvg
  • Offline
  • Profile

Datatable TextBox value change Handler

Post Posted: Wed Sep 28, 2011 12:39 am
+0-
Hi,

I am formatting one of the datatable's column as TextBox using the below built-in formatter.
Code:
YAHOO.widget.DataTable.formatTextbox


But whenever user changes the value in the textbox, i need to do some business logic like validations etc...

Is there any built-in textbox value change Event just like we have radioClickEvent, dropdownChangeEvent etc.. for other built-in formatters ? If there is one, i can subscribe to that event and do my business logic.

Appreciate any help on this. Thanks in advance.

Todd Smith

YUI Contributor

  • Username: stlsmiths
  • Joined: Thu Nov 05, 2009 10:03 am
  • Posts: 675
  • GitHub: stlsmiths
  • Gists: stlsmiths
  • IRC: t_smith
  • Offline
  • Profile

Re: Datatable TextBox value change Handler

Post Posted: Wed Sep 28, 2011 4:59 am
+0-
I think you may be confusing "formatting" with "inline cell editing", which is easy to do with YUI2 DataTables as they both appear very similar.

First things first, I recommend you carefully read articles written by one of the contributors who goes by Satyam, specifically http://yuiblog.com/blog/2008/10/27/datatable-260-part-two/. He also has a website devoted almost fully to YUI2 DataTables at http://www.satyam.com.ar/yui/. This is essential reading ... especially based on the questions you have asked.

These references will introduce you to inline cell-editing, validation, saving editor changes, etc...
Then I suggest you read the DataTable API and look into the "editorSaveEvent" Event where you can incorporate some of your business logic.

Hopefully this will give you a good starting place.

Todd

Venkata Sirish

  • Username: gurumvg
  • Joined: Thu Jun 17, 2010 10:30 am
  • Posts: 38
  • GitHub: gurumvg
  • Gists: gurumvg
  • IRC: gurumvg
  • Offline
  • Profile

Re: Datatable TextBox value change Handler

Post Posted: Thu Sep 29, 2011 3:12 am
+0-
Thanks Smith,

I was precisely referring to 'Formatter' and not cell 'Editor'. Below link has the example of the same.

http://developer.yahoo.com/yui/examples ... kedit.html
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
cron