Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > how to do this?

Reply
Thread Tools

how to do this?

 
 
Ben
Guest
Posts: n/a
 
      08-17-2006
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


 
Reply With Quote
 
 
 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      08-17-2006
What you posted will not give u what i want
Please post more snippet code
Patrick
"Ben" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
Ben
Guest
Posts: n/a
 
      08-17-2006
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>
<asparameter Name="field1 Type="String" />
<asparameter Name="field2" Type="String" />

<asparameter Name="original_field1" Type="string" />
<asparameter 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" <(E-Mail Removed)> schreef in bericht
news:e0$dj$(E-Mail Removed)...
> What you posted will not give u what i want
> Please post more snippet code
> Patrick
> "Ben" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
Ben
Guest
Posts: n/a
 
      08-18-2006
Hallo, Patrick ...

Can you help me now?
Thanks
"Patrick.O.Ige" <(E-Mail Removed)> schreef in bericht
news:e0$dj$(E-Mail Removed)...
> What you posted will not give u what i want
> Please post more snippet code
> Patrick
> "Ben" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
luigi.corrias@gmail.com
Guest
Posts: n/a
 
      08-19-2006
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

 
Reply With Quote
 
Ben
Guest
Posts: n/a
 
      08-19-2006
Thanks

<(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM



Advertisments