Clicking checkbox in a datagrid

  • Hi,


    I have a data grid on a web page. The first column is a checkbox.



    Code
    1. <td tabIndex="-1" class="ig60e0d7d6 " id="x:558988790.111:val:false" style="width: 20px;" _object="[object Object]" idx="1" adr="1" val="false" type="cell" wlkd="1">
    2. <img title="Unchecked" id="x:558988790.110:chkState:0" alt="Unchecked" src="../../ig_res/Office2007Blue/images/ig_checkbox_off.gif" complete="complete" chkState="0"/>


    I am trying to check the checkbox in any row but am unable to. I have got the handle through

    Code
    1. If InStr(c.className, "ig60e0d7d6") > 0 Then


    but am unable to use the following code.


    Code
    1. If InStr(c.className, "ig60e0d7d6") > 0 Then
    2. targetcheckbox = c
    3. c.FirstChild.Focus
    4. c.FirstChild.Click
    5. c.FirstChild.chkState = 1


    The checkbox does not get marked.


    Please help me check the checkbox.