Click here to Skip to main content
16,013,489 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using VB.net (Visual Studio 2012, .NET version 4.5)

I have a Gridview, let's call it GridviewX, where I perform an update. After this particular update, I have configured the data source to a business object and then define the 'update' to a particular method in the business object called "UpdateScore" with the following signature UpdateScore(parameter 1, parameter 2, parameter 3, parameter 4)

GridviewX contains the scores, say, of a team, and GridviewY contains the standings of the league!
The problem where I'm stuck is where the GridviewX is updated... it updates fine and the page is refreshed, BUT, how do I refresh the other gridview, gridviewY, the one containing the league standings based on the scores?

Immediately after the score on GridviewX is updated, I save the session and have tried to call the method to which I have defined/assigned (the data source) GridviewY
GridviewY is ok in that it shows the information needed, BUT when GridviewX is updated, GridviewY is NOT updated. How can I achieve this?

I have tried GridviewY.databind(), but I receive an exception error (something along the lines of object not being referenced)... I don't know if GridviewY.databind() is the correct way to go!
Also, this may be irrelevant, but I'm not using SQL at all... I'm achieving all this by using classes/instantiation. Classes are the ones keeping the data, etc.

Thanks and any information on how to solve the GridviewY update/refresh issue will be greatly appreciated.

Regards,

TheAbominable one! :-)
Posted

1 solution

this is very simple

you are creating methods

bind scores()
and other is
bind league()

when you are updating scores then call
bind league()

it will show you updated data everytime when you will update scores
 
Share this answer
 
v2
Comments
TheAbominable 31-Mar-14 2:23am    
Sorry, but this did not solve my problem. I cannot find a way of applying 'bind()' and 'league' together. However, I can say GridviewY.DataBind(), but I receive an error ('instance not referenced to an object'... or something like that)

Any other ideas, please?

Thanks!
TheAbominable 31-Mar-14 3:23am    
So, I also have tried a response.redirect(same page) at the end of the updateScore(param 1, param2, ..., param 4) method, but I receive an error when the code gets to this line. I just do not how to update the gridview related to the league standings when the gridview on the scores is modified... as soon as the updatescore method ends, the scores update, but not the standings. What can I do??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900