Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Shannon Ramirez #1
datagrid update with stored procedure
I'm using a join statement
in a stored procedure and passing in info to the stored procedure. I
have a unique key value that comes back in the result set.. but I
can't get the edit to work.
Here is a small snibit.
intTblInstitutionId, vcInstitutionName, LastName, email
Sub bindgrid()
Me.daListRequestWorkOff.Fill(Me.dsListRequestWorkO ff)
With Me.grdListRequestWorkOff
.DataSource = Me.dsListRequestWorkOff
.DataKeyField = "intTblRequestId"
.DataBind()
End With
End Sub
Private Sub grdListRequestWorkOff_EditCommand(ByVal source As
Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs )
Handles grdListRequestWorkOff.EditCommand
Me.grdListRequestWorkOff.EditItemIndex = e.Item.ItemIndex
bindgrid()
End Sub
When I open the page, I choose some values from a drop down list that
fills in the info I need to pass the stored procedure. those items
populate a datagrid. when I click on edit, all the data goes away and
I only see the column heading with no data. What have I done wrong.
I have
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
bindgrid()
End If
End Sub
in the page load.
Thanks for the help
Shannon Ramirez Guest
-
Using a stored procedure
I am trying to pass a ProdID to a stored procedure, but I get an error: Error Executing Database Query. Procedure 'PriceBreak' expects... -
date field in update stored procedure
When I try to update a date field that I've previously added to a SQL Server table, I get ths error message: Error converting data type varchar to... -
Populate Datagrid from a Stored Procedure
I am trying to fill datagrid from a stored procedure using the following code: Public Sub dgTicketsFill2() I have removed a of my connString... -
populate datagrid with stored procedure w/parameter
All, I'm trying to populate a datagrid with a data adapter that uses a stored procedure with a parameter. I get the below error when I run my... -
Stored procedure from stored procedure
Is it possible to create a stored procedure from a stored procedure? When I attempt this inanity, it doesn't blow up until syntax error at the... -
Shannon Ramirez #2
Re: datagrid update with stored procedure
working on this some more... I have profiler fired up in sql server.
when the datagrid gets populated, there are values being passed into
the stored proceudre. When I click on edit, the edit event is fired,
however, when the databind fires, the stored procedure is called
again, but this time all the parameters are filled in with the value
of default. How do I get the stored procedure to fire with the values
I passed in the first time and still be able to use the edit event.
any help would be great
thanks
shannon
On Tue, 02 Dec 2003 07:45:22 -0600, Shannon Ramirez
<ramirez@sauder.com> wrote:
>I'm using a join statement
>in a stored procedure and passing in info to the stored procedure. I
>have a unique key value that comes back in the result set.. but I
>can't get the edit to work.
>
>Here is a small snibit.
>intTblInstitutionId, vcInstitutionName, LastName, email
>
> Sub bindgrid()
> Me.daListRequestWorkOff.Fill(Me.dsListRequestWorkO ff)
> With Me.grdListRequestWorkOff
> .DataSource = Me.dsListRequestWorkOff
> .DataKeyField = "intTblRequestId"
> .DataBind()
> End With
> End Sub
> Private Sub grdListRequestWorkOff_EditCommand(ByVal source As
>Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs )
>Handles grdListRequestWorkOff.EditCommand
> Me.grdListRequestWorkOff.EditItemIndex = e.Item.ItemIndex
> bindgrid()
> End Sub
>
>When I open the page, I choose some values from a drop down list that
>fills in the info I need to pass the stored procedure. those items
>populate a datagrid. when I click on edit, all the data goes away and
>I only see the column heading with no data. What have I done wrong.
>I have
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
>System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> If Not Page.IsPostBack Then
> bindgrid()
> End If
> End Sub
>
>in the page load.
>
>Thanks for the helpShannon Ramirez Guest



Reply With Quote

