:: Forum >>

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
Tuesday, September 6, 2005
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
Tuesday, September 6, 2005
i could put check box in column.
thnx
sam
Tuesday, September 6, 2005
it doest work can you please paste all the code for better understanding.

Thanks!
julius
Thursday, October 20, 2005
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
Thursday, October 20, 2005
Hello Gernot!
I tried yr code but it is not working....

is there any other code...

Thanks

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

This topic is archived.


Back to support forum

Forum search