This project is read-only.

Working with Datagrid

Feb 25, 2008 at 3:41 AM
I am working with Dtagrid compoent using White testing framework. but when we got all of rows infomation from Table.Rows. My test case broke down. would you give some suggestions about Datafrid testing in Winform application please? Currently, I want to test all of data displayed in this grid is expected. And also can we export all data into local text file or excel file to make a comparsioin with my expected result. Thanks in advance.
Feb 25, 2008 at 11:56 AM
Can you please let me know what do you exactly mean by test broke down. Can you send me some code, stack trace, etc.
Here is sample code, I dont know whether it helps. If you need to know more please download the source code and have a look at the tests.
table = window.Get<Table>("people");
TableRows rows = table.Rows;
rows[1].Cells[0].Value = "Imran";
Feb 26, 2008 at 2:39 AM
Thank you for quick response on this question. I have uses the same codes mentioned in your post. I can get table info from stack of visusal studi 2008 IDE. but when i run coeds into the second line (TableRows rows = table.Rows), i get errros as below, "can not invoke property Rows", and also in this step, it take a long time on accessing this property. by the way. there are 100 items including in the datagrid.would you give me some clues on this problem please? and also have some workaround way to handle this type of problem. thanks in advance.
Mar 22, 2008 at 7:11 PM
Really, sorry for not responding for long time (I have missed some discussion).
If you are still facing the problem can you try doing window.LogStructure() and send me whatever comes out. It would be logged based on your log4net Configuration
Apr 16, 2008 at 4:54 PM
Application app = Application.Attach("WinFormsTestApp");
var p = app.GetWindow("Form1",Core.Factory.InitializeOption.NoCache).Get<Table>("people");
TableRows r = p.Rows;

I tried this with the sample winform app and i get an Nullreference exception.

How do i get data from the datagrid?