Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > GridView - Edit Record

Reply
Thread Tools

GridView - Edit Record

 
 
shapper
Guest
Posts: n/a
 
      09-20-2007
Hello,

In have a web page layout with various panels.
One panel contains a GridView and other panel contains various
TextBox, DropDownList, etc.

When I click a a GridView row I make visible the Form Panel so that
the user can edit the data.

My questions are:
- How can I fill the form controls with the data of the clicked griv
view row?
- And when I submit the form where can I get the ID of the row that
was clicked?

Thanks,
Miguel

 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
Guest
Posts: n/a
 
      09-20-2007
Howdy,

Assign gridview.DataKeyNames to "Id" column of your data source. then when
user selects a row read gridview.SelectedValue to get "Id" being currently
selected. In addition to that, you can use gridview in conjunction with
FormView / DetailsView that were invented for such scenarios. There are
plenty of examples in the internet.
--
Milosz


"shapper" wrote:

> Hello,
>
> In have a web page layout with various panels.
> One panel contains a GridView and other panel contains various
> TextBox, DropDownList, etc.
>
> When I click a a GridView row I make visible the Form Panel so that
> the user can edit the data.
>
> My questions are:
> - How can I fill the form controls with the data of the clicked griv
> view row?
> - And when I submit the form where can I get the ID of the row that
> was clicked?
>
> Thanks,
> Miguel
>
>

 
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
GridView control enters edit mode when I click Edit link twice Jaime Stuardo ASP .Net Web Controls 0 04-07-2006 12:47 AM
GridView edit validation, edit dropdown list, delete popup confirm =?Utf-8?B?a2Vu?= ASP .Net 1 01-23-2006 12:51 PM
Snapshot restraint - edit, edit, edit Alan Browne Digital Photography 24 05-10-2005 10:15 PM
Snapshot restraint - edit, edit, edit Patrick Digital Photography 0 05-06-2005 10:53 PM
Retrieving Record Key while creating the record. =?Utf-8?B?SnVzdGlu?= ASP .Net 4 10-05-2004 08:11 PM



Advertisments