473,383 Members | 1,762 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,383 software developers and data experts.

refresh the datagrid

i have tried several things that i have found to refresh my datagrid they are not workin
i insert a record and then try to refresh rebind . i insert the record on a submit click event and then i rerun a stored procedure to get the new data(less the name i inserted) and try to rebind i am still getting the original lis
here is a snippet of the cod
Imports System.Diagnostics.Debug
Imports Alliance.Intranet.Common.Data.Access.Co
Imports Alliance.Intranet.Common.Business.Logic.Co

Public Class MyCodeBehind3 : Inherits System.Web.UI.Pag

Public DDplayers As DropDownLis

Public dgResults as Datagri
Public dgSendBid as Datagri
Public dgMoreHistory as Datagri
Sub Page_Load(
Dim ObjDB As New CustomerBi
Dim ReportDS As DataSe
Dim intPlayerID As Intege
Dim ObjReturnDR As OleDbDataReade
Dim ObjDataset As New DataSe
Dim db As New dbco
Dim params(0) As OleDbParamete
If Not IsPostBack() The

tr
response.write("getsendbid"

ReportDS = ObjDB.GetSendBid5(Session("RoundNumber"),Session(" PlayerID")
Catch exc As Exceptio
response.write("The error is with GetSendBid5"
end tr
dgSendBid.DataSource=nothin
dgSendBid.DataSource = ReportD
dgSendBid.DataBind(
'Bind the Names of all the players who have contracts to the DropDownList Bo
DDplayers.DataSource=nothin
DDplayers.DataSource = ReportD
DDplayers.DataTextField = "PlayerGameName
DDplayers.DataValueField = "PlayerGameName
DDplayers.DataBind(
End I

End Su

Sub cmd_Submit_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim ObjDB As New CustomerBi
Dim ObjDR As OleDbDataReade
Dim ReportDS As DataSe
Dim intResult As Intege
'Ready to save to the databas

try
intResult = ObjDB.AddNewOffer(intRoundID, intPlayerID, intPlayerIDContractHolder, strCooperate, strInsurance, session("RoundNumber")
Catch exc As Exceptio
response.write("The error is with AddNewOffer"
end tr

tr
bResult = ObjDB.AddToNumberOffers(Session("RoundNumber"), Session("PlayerID")
Catch exc As Exceptio
response.write("The error is with AddToNumberOffers"
end tr

BindDataOffers(

End Su

Sub BindDataOffers(
response.write("in bind"
Dim ObjDB As New CustomerBi
Dim ObjDR As OleDbDataReade
Dim ReportDS As DataSe
tr
response.write("getsendbid"
ReportDS = ObjDB.GetSendBid5(Session("RoundNumber"),Session(" PlayerID")

Catch exc As Exceptio
response.write("The error is with GetSendBid5"
end tr
dgSendBid.DataSource=nothin
dgSendBid.DataSource = ReportD
dgSendBid.DataBind(
'Bind the Names of all the players who have contracts to the DropDownList Bo
DDplayers.DataSource=nothin
DDplayers.DataSource = ReportD
DDplayers.DataTextField = "PlayerGameName
DDplayers.DataValueField = "PlayerGameName
DDplayers.DataBind(
End Su

any ideas what could be wrong??
Nov 18 '05 #1
0 1022

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marcus | last post by:
Hello! I'm buildning a webpage in ASP.NET using Visual Basic. The page contains a datagrid, a dropdownlist, some textboxes and a couple of buttons. The datagrid displays barcodes from a table...
0
by: Marcus | last post by:
Hello! I'm buildning a webpage in ASP.NET using Visual Basic. The page contains a datagrid, a dropdownlist, some textboxes and a couple of buttons. The datagrid displays barcodes from a table...
0
by: Marcus | last post by:
Hello! I'm buildning a webpage in ASP.NET using Visual Basic. The page contains a datagrid, a dropdownlist, some textboxes and a couple of buttons. The datagrid displays barcodes from a table...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
6
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi - I'm having trouble refreshing a datagrid control bound to a dataset that was created from the New Data Source wizard. What is the code required to refresh the datagrid with data from the...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.