Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] how to retrieve data from datatable text box

Expand Messages
  • Satyam
    You can call showCellEditor which accepts several different ways of pointing to a cell:
    Message 1 of 4 , Jun 2, 2009
    • 0 Attachment
      You can call showCellEditor which accepts several different ways of
      pointing to a cell:

      http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#method_showCellEditor

      You might use single cell selection mode to set the focus on a cell, but
      that would mean you first clicked on the cell to select it, which would
      than make that pointless. You could use the keyboard to move the selection.

      Satyam


      phanindra valluri escribió:
      >
      >
      > thanks satyam for your reply...
      >
      > one more doubt...
      > when i use textboxcelleditor then i would click on the cell by using
      > my mouse to get cell editor pop up.
      > Is there any chance to pop up cell editor by clicking keyboard buttons
      > like "eneter" or "tab" buttons.
      >
      >
      > Regards
      > Phani
      >
      > ------------------------------------------------------------------------
      > *From:* Satyam <satyam@...>
      > *To:* ydn-javascript@yahoogroups.com
      > *Sent:* Tuesday, 2 June, 2009 10:52:30 PM
      > *Subject:* Re: [ydn-javascript] how to retrieve data from datatable
      > text box
      >
      > Nope your code below would not work. If you were using the
      > TextboxCellEditor then it would. Then you would not even need to have
      > the extra column with the Update button because you would click on the
      > cell to make the cell editor pop up and then, when you click on the Save
      > button of the cell editor, it gets saved right away. You can subscribe
      > to the editorSaveEvent to find out when that happened:
      >
      > http://developer. yahoo.com/ yui/docs/ YAHOO.widget. DataTable.
      > html#event_ editorSaveEvent
      > <http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#event_editorSaveEvent>
      >
      > If you do want the input box visible all the time you might want to look
      > at the right-most column in this example:
      >
      > http://www.satyam. com.ar/yui/ 2.6.0/assortedCo ntrols.html
      > <http://www.satyam.com.ar/yui/2.6.0/assortedControls.html>
      >
      > Satyam
      >
      > phanindra valluri escribió:
      > > Hi All...
      > >
      > > I am using text box in my datatable. How can i retrieve data from the
      > > text box when i click on a button which is present in same row of my
      > > datatable.
      > >
      > > My code is as follows...
      > >
      > > var myColumnDefs = [
      > > { key:"mag_name" ,label:"Magzine Name"},
      > > { key:"sched_date" ,label:"Sched Date" },
      > > { key:"volume" ,label:"Volume" , formatter: function (el, oRecord,
      > > oColumn, oData)
      > > { el.innerHTML = '<input size="10" value = "' + oData + '" />' }
      > > },
      > > { key:"button" , label:"Update Volume", formatter: function (elCell)
      > > {elCell.innerHTML= "<button> Update</button> ";}}
      > > ];
      > >
      > > I wanna retrieve data form my "volume" key, when i click on "update"
      > > button.
      > >
      > > myDataTable. subscribe( "buttonClickEven t", function(oArgs) {
      > > var oRecord = myDataTable. getRecord( oArgs.target) ;
      > > alert(oRecord. getData(' volume')) ; // does this line code works ?
      > > }
      > >
      > > Please correct me if any mistake in above code.
      > > Thanks in advance
      > >
      > >
      > > Regards
      > > Phanindra
      > >
      > > ------------ --------- --------- --------- --------- --------- -
      > > Own a website.Get an unlimited package.Pay next to nothing.* Click
      > > here!.
      > > <http://in.rd. yahoo.com/ tagline_ysb_ website/* http://in.
      > business. yahoo.com/
      > <http://in.rd.yahoo.com/tagline_ysb_website/*http://in.business.yahoo.com/>>
      >
      > >
      > >
      > >
      > > ------------ --------- --------- --------- --------- --------- -
      > >
      > >
      > > No virus found in this incoming message.
      > > Checked by AVG - www.avg.com
      > > Version: 8.5.339 / Virus Database: 270.12.50/2150 - Release Date:
      > 06/02/09 06:47:00
      > >
      > >
      >
      >
      > ------------------------------------------------------------------------
      > Cricket on your mind? Visit the ultimate cricket website. Enter now!
      > <http://in.rd.yahoo.com/tagline_cricket_1/*http://beta.cricket.yahoo.com>
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.339 / Virus Database: 270.12.50/2150 - Release Date: 06/02/09 06:47:00
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.