Forum Discussion

pratyushdash's avatar
pratyushdash
Occasional Contributor
13 years ago

How to click a checkbox inside a xtragrid?

I want to check a checkbox in a row inside a xtragrid.

But when I try to record it i just get clicks with coordinates.

How can I make it generic?






  Dim gridControl


  Set gridControl = Aliases.Softmar_nTier_Alerts_Client.RecipientsSearchControl.controlPlaceHolder.RecipientsSearchControl.layoutControl.panelControl.DockContainer.Users.ControlContainer.GridControl.baseGridControl


  Call gridControl.ClickCellXY(0, "Mark", 13, 8)

2 Replies

  • pratyushdash's avatar
    pratyushdash
    Occasional Contributor
    Guys please help me with this.This is one of the major functionality for my application and I have to complete a POC on this ASAP.



    Thanks

    Pratyush

  • Hi Pratyush,


     


    There should be some property to allow you to enable/disable a check box. Try to find it by using the Object Browser.


    Another way is to click on the middle of the cell, like this:




    Dim gridControl, bounds


    Set gridControl = Aliases.Softmar_nTier_Alerts_Client.RecipientsSearchControl.controlPlaceHolder.RecipientsSearchControl.layoutControl.panelControl.DockContainer.Users.ControlContainer.GridControl.baseGridControl


    Set bounds = gridControl.Bounds


    Call gridControl.ClickCellXY(0, "Mark", bounds.Left +  bounds.Width / 2, bounds.Top + bounds.Height / 2)