This is a migrated thread and some comments may be shown as answers.

how to fetch the binded data in coded step with C#

1 Answer 59 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shirley
Top achievements
Rank 1
Shirley asked on 27 Oct 2011, 10:12 AM
I am creating a test with coded steps using C#. I created a coded step to verify whether the specific column of the binding Exel data sheet is NULL or not.  If it is null, do thing 1. If it is not, do thing 2.
I wanna know that how to fetch the data, I mean , use which method or property.
For example:
string flag;
flag = ?     // flag is the data (column name is "CustomerName") from Exel.  I want to know what i shoud code to replace the "?".
if (flag==" " || flag == null)
   {
         do thing 1;
    }
else
   {
        do thing 2;
   }
 It is urgent. Thank you very much.

1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 27 Oct 2011, 04:01 PM
Hello Shirley,

Here's how to reference a data column in code:

object myData = Data["Col1"];
Assert.IsNotNull(myData);
 

See here for more information.

Kind regards,
Anthony
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Shirley
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or