TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Raghu Mohan
NA
14
11.8k
Foreach loop on datatables within dataset
Oct 14 2015 4:19 PM
Please see the following
DataSet ds = new DataSet("AB");
ds.ReadXml(reader);
DataTable dtProperty = ds.Tables["property"];
DataTable dtvalue = ds.Tables["value"];
Table table = GeneratingTable();
property table has : prop_id,label
value table has:value,prop_id
DataRow dr;
DataRow dr2;
for (int r = 0; r < dtProperty.Rows.Count; ++r)
{
dr = dtProperty.Rows[r];
dr2 = dtvalue.Rows[r];
}
Now I want the same result by looping through values table only but not property table. something looks like
foreach(prop_id in dtvalue)
{
getpropertyname(prop_id)
}
I know the logic but finding difficulty with code. Can someone help me on this? Please
Thanks
Reply
Answers (
3
)
Advantage .NET data provider
Developing apps for iphone and ipad