|
-
Jul 25th, 2007, 09:15 PM
#7
Thread Starter
Fanatic Member
Re: what am i doing wrong(bindingsource loop)
 Originally Posted by jmcilhinney
DataRowViews are almost the same as a DataRow. They are a view to the data in that row and can be used in almost exactly the same way:
Code:
foreach (DataRowView view in myBindingSource)
{
if ((string)view["ref_num"] = "some string")
{
view["ref_num"] = "N/A";
}
}
Note that if the column already contains string objects then you should cast as type string rather than call the ToString method. Why convert a string to a string? If you're unsure of the type then you should cal ToString to ensure it works in all cases.
thanks so much ill give it a shot when i get into work tommrow
i would give you a +rate but i cant give you anymore
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|