3.0 beta 2

how to put check box in grid?

Hello,

How to put Check box into say column#1 of grid? Is it poosible?
If yes then how?

Thnx in advance.
sam
September 6,
Hello,

something like this should work:

Active.Templates.Checkbox = Active.System.Template.subclass();
Active.Templates.Checkbox.create = function()
{
obj = this.prototype;
input = new Active.HTML.INPUT;

input.setAttribute("type",function(){return this.getItemProperty("inputtype")});
input.setAttribute("name",function(){return this.getItemProperty("inputname")});

obj.setContent("input", input);
};

Active.Templates.Checkbox.create();

obj.setColumnTemplate(new Active.Templates.Checkbox, 0);
obj.defineDataProperty("inputtype", 0);
obj.setDataProperty("inputtype", function(i, j){return myData[i][6]});
obj.defineDataProperty("inputname", 0);
obj.setDataProperty("inputname", function(i, j){return myData[i][7]});

hope this helps,
Gernot
Gernot
September 6,
i could put check box in column.
thnx
sam
September 6,
it doest work can you please paste all the code for better understanding.

Thanks!
julius
October 20,
I'd like to do the same thing; add a checkbox to the first column of a Grid.

I couldn't follow how the posted code relates to the grid control. Any chance of a more complete example showing the grid code too?

Thanks,
Mark Lawford
October 20,
Hello Gernot!
I tried yr code but it is not working....

is there any other code...

Thanks

Rajesh
Rajesh Kumar
December 8,
how can disable <br> ? in input box
tes
June 16,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.