3.2.0

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
November 25,
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
February 17,
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
April 2,

This topic is archived.

See also:


Back to support forum