473,382 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

VB-APP: How to determine rows of a child based on parent row selected.

nev
251 100+
Good day Sirs & Madams, I know some of you will find this problem very simple. Kindly share a little knowledge to me on how to deal with this. Thank you.

I have a parent-child table relation. when bsParent is navigated, bsChild follows. In code, I did this to determine the rowstate:
Expand|Select|Wrap|Line Numbers
  1. dim dtParent as datatable = ds.Parent.copy
  2. for i as integer to dtParent.defaultview.count - 1
  3. if dtParent.defaultview(i).row.rowstate = datarowstate.modified then
  4. 'code to process
  5. else
  6. dim dtChild as datatable = ds.Child.copy
  7. for j as integer to dtChild.defaultview.count - 1
  8. if dtChild.defaultview(j).row.rowstate = datarowstate.modified then
  9. 'code to process
  10. end if
  11. next
  12. end if
  13. next
  14.  
If you notice the bold statement, what I am checking is the total child rows. I need to determine how to get only the child rows with respect to the parent row that is selected.

Please help me kind Sirs & Madams. Thank you.
Apr 10 '08 #1
1 1089
nev
251 100+
I tried:
Expand|Select|Wrap|Line Numbers
  1. dtChild.defaultview.rowfilter = bsChild.filter
  2. dtChild.defualtview.sort = bsChild.sort
but it didn't work.
Apr 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Terry | last post by:
Hi, I need some feedback. We are converting to .Net and we are trying to decide on whether to use VB.net or C#.net. As far as our current systems, they will probably be rewritten in ASP.Net. I...
5
by: Saga | last post by:
Hi all, I just read the thread by the same name posted on Jun 15, 9:45 AM, but I am looking at it from a different point of view. I came across this question in terms of functionality. Are VB and...
72
by: Robin Tucker | last post by:
I need to find some documents/research for my manager about VB.NET v C# use. I've noticed that there are many more people using C# than VB.NET, that there seem to be more job vacancies specifying...
28
by: Andy | last post by:
Any good resources regarding benefitis by using C3 over VB? /Andy
182
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
2
by: D H | last post by:
Hi, Hi, I was looking for your opinion on VB.NET - its long-term prospects, etc. Sorry this is vague, but it's not meant to be a troll. It's a pro-VB.NET post actually. I haven't used VB or...
19
by: lonelyplanet | last post by:
Hi, I'm studying for 70-306 using the book "MCAD/MCSD Visual Basic .NET Windows Applications" published by McGraw Hill (ISBN: 0-07-212583-7). I found the book has no programming exercise...
39
by: clintonG | last post by:
This is not about starting a fight but an observation that seems to be proving itself on its own merit and is therefore simply a point of conjecture. I did not get serious about writing software...
14
by: John Smith | last post by:
Can someone convert from C# into VB this line for me: if (c is System.Web.UI.HtmlControls.HtmlForm)
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.