Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   how to do this? (http://www.velocityreviews.com/forums/t762937-how-to-do-this.html)

Ben 08-17-2006 09:22 AM

how to do this?
 
Hi,

I need the values of the fields of the record that has been selected for
updating in a gridview.
In the
"Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewEditEventArgs) Handles
GridView1.RowEditing",

i couldn't find those values ..

Is this possible, and if yes, how?
Thanks for help
Ben



Patrick.O.Ige 08-17-2006 09:31 AM

Re: how to do this?
 
What you posted will not give u what i want
Please post more snippet code
Patrick
"Ben" <sdsd@sdscs.no> wrote in message
news:uO8rw6dwGHA.1272@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> I need the values of the fields of the record that has been selected for
> updating in a gridview.
> In the
> "Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As
> System.Web.UI.WebControls.GridViewEditEventArgs) Handles
> GridView1.RowEditing",
>
> i couldn't find those values ..
>
> Is this possible, and if yes, how?
> Thanks for help
> Ben
>




Ben 08-17-2006 12:27 PM

Re: how to do this?
 
Ok, here part of the code:

1) aspx file:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0 ;Data
Source=C:\my.mdb"
SelectCommand="SELECT * FROM [lokaal]"
UpdateCommand="UPDATE [table] SET [field1] = ?, [field2 = WHERE [field1
= ?">
<UpdateParameters>
<asp:Parameter Name="field1 Type="String" />
<asp:Parameter Name="field2" Type="String" />

<asp:Parameter Name="original_field1" Type="string" />
<asp:Parameter Name="original_field2" Type="String" />

</UpdateParameters>
</asp:SqlDataSource>

<asp:GridView ID="GridView1" runat="server"
DataKeyNames="field1" DataSourceID="SqlDataSource1" />
<Columns>
<asp:CommandField ShowEditButton="True" >
<asp:BoundField DataField="field1" />
<asp:BoundField DataField="field2" />
</Columns>
</asp:GridView>

2) code-behind:
Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewEditEventArgs) Handles
GridView1.RowEditing
' I want here the code for fetching the original values of the two
fields ('field1', 'field2') of that record (before updating)
End Sub


"Patrick.O.Ige" <naijacoder@hotmail.com> schreef in bericht
news:e0$dj$dwGHA.1216@TK2MSFTNGP03.phx.gbl...
> What you posted will not give u what i want
> Please post more snippet code
> Patrick
> "Ben" <sdsd@sdscs.no> wrote in message
> news:uO8rw6dwGHA.1272@TK2MSFTNGP05.phx.gbl...
>> Hi,
>>
>> I need the values of the fields of the record that has been selected for
>> updating in a gridview.
>> In the
>> "Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As
>> System.Web.UI.WebControls.GridViewEditEventArgs) Handles
>> GridView1.RowEditing",
>>
>> i couldn't find those values ..
>>
>> Is this possible, and if yes, how?
>> Thanks for help
>> Ben
>>

>
>




Ben 08-18-2006 07:57 AM

Re: how to do this?
 
Hallo, Patrick ...

Can you help me now?
Thanks
"Patrick.O.Ige" <naijacoder@hotmail.com> schreef in bericht
news:e0$dj$dwGHA.1216@TK2MSFTNGP03.phx.gbl...
> What you posted will not give u what i want
> Please post more snippet code
> Patrick
> "Ben" <sdsd@sdscs.no> wrote in message
> news:uO8rw6dwGHA.1272@TK2MSFTNGP05.phx.gbl...
>> Hi,
>>
>> I need the values of the fields of the record that has been selected for
>> updating in a gridview.
>> In the
>> "Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As
>> System.Web.UI.WebControls.GridViewEditEventArgs) Handles
>> GridView1.RowEditing",
>>
>> i couldn't find those values ..
>>
>> Is this possible, and if yes, how?
>> Thanks for help
>> Ben
>>

>
>




luigi.corrias@gmail.com 08-19-2006 03:57 AM

Re: how to do this?
 
Dear Ben

If i understand your problem i think u can find and handle the value u
need using the sample code explained here

http://msdn2.microsoft.com/en-us/lib...owediting.aspx

Luigi


Ben 08-19-2006 08:16 AM

Re: how to do this?
 
Thanks

<luigi.corrias@gmail.com> schreef in bericht
news:1155959840.853454.57750@75g2000cwc.googlegrou ps.com...
> Dear Ben
>
> If i understand your problem i think u can find and handle the value u
> need using the sample code explained here
>
> http://msdn2.microsoft.com/en-us/lib...owediting.aspx
>
> Luigi
>





All times are GMT. The time now is 07:56 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.