Forum Discussion

ananddave123's avatar
ananddave123
Occasional Contributor
12 years ago

How to whether a checkbox in a dev express grid is enabled or disabled ?

My application  have a checkbox in 3rd row of dev express grid. but before doing any operation on the checkbox i want to know whether that checkbox is enabled or disabled. How can we find this? can you please help me with the code..

  • Hi Anand,


     


    It's difficult to advise you something without seeing a sample of this control. I guess that the grid control should provide a special method or property to check this. Try using the Object Browser to find it.


     

  • ananddave123's avatar
    ananddave123
    Occasional Contributor
    I have attached the sample in the zip file - PropGrid.zip

    please click on file (PropertyGrid.exe ) to run the sample.



    Please let me know how can i focus on the checkbox which is on fourth row.

    Please not i just want to focus the checkbox and then i need to find the enable or disable status of the checkbox.





  • rafiqque's avatar
    rafiqque
    Occasional Contributor
    Well you can try to do record and play

    first try to check the check box on 2nd row then the 3rd row. The code generated might give  you an idea how to solve your problem.



    For testing purpose make all the checkbox in all the rows enabled just for this case. 




  • Hi Anand,


     


    I've found out that you can check the following property:


    Sys.Process("PropertyGrid").WinFormsObject("Form1").WinFormsObject("propertyGridControl1").Rows.Item(1).Properties.Value


     


    If the check box is checked, the value will be True. Otherwise, it will be False.