How to enter a value in a cell

Oct 11, 2010 at 6:19 PM

Hello,

Can someone please help me in verifying how to enter a value in a cell? Thanks a lot.

Oct 12, 2010 at 8:19 AM

Hi

do you mean a data grid cell?

 

we use keybord.Instance.Enter("some text"), first we make the cell editable (using 2 clicks, or F2 key)

 

Throndorin

Oct 12, 2010 at 2:11 PM

Thanks, How do I pick the cell to enter the value in? Also, Can I use Double click instead of clikcing twice? Thanks for your help.

Oct 12, 2010 at 2:17 PM
sonia123 wrote:

Thanks, How do I pick the cell to enter the value in? Also, Can I use Double click instead of clikcing twice? Thanks for your help.

 

1. pick the cell:

if the application is winform: 

ListViewCell cell = row.Cells["coulumn name"];

for WPF it might be difficult because the cells might be custom controls. So you search all cells from Row using UIAutomation and convert to ListViewCell or to a Custom Control class.

2. Double click

try to double clik manually if this works, you can also use doubleClick in test I think

 

Throndorin

 

 

Oct 12, 2010 at 2:36 PM

Thanks. My application is WPF and cells are custom controls. Do you have any example of code using UI Automation. I know it is going to be difficult for me since i am not very familiar with UI Automation. Thanks again.

Oct 12, 2010 at 2:57 PM

Hi

 

have a look here:

 

DataGrid Problem

Throndorin