:: Forum >>

CheckBox

Hi!
I'm using a checkbox template in my Grid, but I can't Know when I check what is the row where the checkbox is place. Could anyone help me, please?

Thanks.
ccr
Thursday, November 25, 2004
I have NO idea if this is the correct way to do this (if not, could someone please correct me?).

If you're using the code from this example: http://www.activewidgets.com/javascript.forum.2388.9/checkbox-template-of-my-dream.html, then you can get the index of the row that was checked with this:

this.$owner.$index

For example, I have it selecting a row when the box is checked with this:
function toggleValue(src){
var originalVal = this.getItemProperty("text");
var newValue = (originalVal == this.getCheckedProperty("true")) ? this.getCheckedProperty("false") : this.getCheckedProperty("true");
this.setItemProperty("text", newValue);
this.refresh();
// selects row when it's checked
this.setProperty("selection/index", this.$owner.$index);
}


HTH.
Mark
Thursday, February 17, 2005
how do i get the row number of the checkbox, if i have each checkbox named as chkbox0,chkbox1 etc.
cant i access using
document.form.chkbox0.checked
Ashvini
Saturday, April 2, 2005

This topic is archived.


Back to support forum

Forum search