[ 2 posts ]

Thomas Wiedmann

  • Username: thomas_w
  • Joined: Wed Sep 16, 2009 10:37 am
  • Posts: 116
  • Offline
  • Profile

DataTable YUI 2.9.0 with cellEditor jump away

Post Posted: Wed Jul 04, 2012 10:55 pm
+0-
Hi,

I you a DataTable YUI 2.9.0 with cellEditor like this

Quote:
[...]
<div id="json"></div>
[...]
var formatterPrint = function(elCell, oRecord, oColumn, oData) {
var value = (YAHOO.lang.isValue(oRecord.getData(oColumn.key))) ?
oRecord.getData(oColumn.key) : "Nein";

/* update RecordSet mit einer neuen Spalte und neuem Wert */
oRecord.setData("sPrint",value);
markup = '<a href="#">' + value + '</a>';


[...]

YAHOO.example.json = function() {
var myColumnDefs = [
{key:"sCopy", label:"Kopieren", editor: new YAHOO.widget.RadioCellEditor({radioOptions:["Ja","Nein"],disableBtns:true}),
formatter: formatterPrint},

[...]


this work well, but if the datatable is long and I must scroll to the button the DataTable scroll up to the top on refresh, if I click on mein RadioCellEditor - Link an this little editor-form appears.

Is there any way to disable this scroll to the top after refresh?

I little help is to use css #json { overflow-y: scroll; overflow-x: hidden; height: 15em; }

Any better idea?

Thanks
Thomas

Thomas Wiedmann

  • Username: thomas_w
  • Joined: Wed Sep 16, 2009 10:37 am
  • Posts: 116
  • Offline
  • Profile

Re: DataTable YUI 2.9.0 with cellEditor jump away

Post Posted: Thu Jul 05, 2012 12:12 am
+0-
(repost because of some annoying typo, sorry)
-----------------------------------------------------

Hi,

I use a DataTable YUI 2.9.0 with cellEditor like this

Quote:
[...]
<div id="json"></div>
[...]
var formatterPrint = function(elCell, oRecord, oColumn, oData) {
var value = (YAHOO.lang.isValue(oRecord.getData(oColumn.key))) ?
oRecord.getData(oColumn.key) : "Nein";

/* update RecordSet mit einer neuen Spalte und neuem Wert */
oRecord.setData("sPrint",value);
markup = '<a href="#">' + value + '</a>';


[...]

YAHOO.example.json = function() {
var myColumnDefs = [
{key:"sCopy", label:"Kopieren", editor: new YAHOO.widget.RadioCellEditor({radioOptions:["Ja","Nein"],disableBtns:true}),
formatter: formatterPrint},

[...]



this work well, but if the datatable is long and I must scroll to the buttom, the DataTable scroll up to the top on refresh, if I click on my RadioCellEditor - Link an this little editor-form appears.

Is there any way to disable this scroll to the top after DataTable refresh?

I little help is to use css #json { overflow-y: scroll; overflow-x: hidden; height: 15em; }

Any better idea?

Thanks
Thomas
  [ 2 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