By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,767 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

C# App - Dataset updating, how to update certain aspects

P: 27
Hi guys,

I have run into a little problem once again in my program. I have struggled with this for a while looking around for answers, and have made a make shift method to do a work around. But this will consume a lot of resources and is unnecessary i believe.

My problem is this. I have a dataset which has several relations, i then also have enough datagridviews to display the levels of data. Now i have certain columns in the data that will be sql functions such as SUM and COUNT on the data in the child tables.

My problem is that i want to be able to refresh the parents sql column whenever a child datagridview has been altered.

My makeshift way around this before was to recreate the dataset, recreate the bindingsources and then attaching them to the datagridviews.

What is the best way to do this without needlessly repeating steps?

In summation, all it needs to be able to do is refresh the parents current row in the table from the child data that is related to it.

Sorry if my wording is a little odd, it's very late and I have been wracking my brain over this too long.

Cheers
Gun Slinger
Dec 18 '08 #1
Share this Question
Share on Google+
3 Replies


debasisdas
Expert 5K+
P: 8,127
Thread moved to c# forum.
Dec 19 '08 #2

P: 27
Cheers.

I have been moved to the .net forum quite a lot when i have posted here, that i assumed that i was supposed to post in the .net forum.

It is C#.net, maybe i should have made that clearer in the title.

Also, just to clarify. I want to be able to update SUM and COUNT columns either within the current row, the parents current row, or all children data. Just so i can update information such as, a column in my query which is tickets * ticket cost and shows the user what the total price is.
Then in a parent table which is a ticket bookings table which has various tickets under one person at a particular event and time and in that row, show a total of the totals and show a complete price for the booking.

I have seen it done in a lot of databases, i just want the most efficient and possibly easiest way to do it =)
Dec 19 '08 #3

P: 27
Anyone got any ideas? i have been busying myself with other parts of my project, but i would like to get this part done soon.

Thanks in advance
Dec 25 '08 #4

Post your reply

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