welcome to my space
-
Archives
-
Categories
-
Search
-
Meta
-
Credits
17 March, 2010 |
ColumnModel & renderer
i want to handle data from ArrayReader() with my own function
cm: new xg.ColumnModel([
new xg.RowNumberer(),
{header: "Nazwisko", width: 40, sortable: true, dataIndex: 'UserSurname'},
{header: "Aktywny", width: 40, sortable: false, renderer: TESTFUNC(VALUE?), dataIndex: 'UserLogon'}
]),
...
function TESTFUNC(value)
{
//for example
return ''+value+''
}
how can i pass value of UserLogon to this function?
or maybe there is another way to bulid checkbox but not using CheckboxSelectionModel()
i want to make some kind of switcher
some of checkboxes will be enabled onload ad some will be disabled
and i dont want to select actual row, but i want to make ajax request onclick checkbox with some values from this rendered table
ex:
ID Name checkbox
2 Mr. X [X] <- onclick make request foo.php?ID=2&mode=off
4 Mr. Y [ ] <- onclick make request foo.php?ID=2&mode=on
thanks
{header: "Active", ... ,renderer: CheckboxGenerator.createDelegate(this,['UserLogon','UserID'],true), dataIndex: 'UserLogon'}
...
function CheckboxGenerator(val,id)
{
var UID = id.value;
var onclick = 'CheckboxClicked(this,'+UID+')';
if(val=='1')
{
var checked = ' checked="checked"';
}
else
{
var checked = '';
}
return '';
}
function CheckboxClicked(elm,uid)
{
if(elm.checked)
{
alert('make on');
}
else
{
alert('make off');
}
}
#If you have any other info about this subject , Please add it free.# |