Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

GridView - Edit Record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shapper - 20 Sep 2007 17:43 GMT
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
Milosz Skalecki [MCAD] - 20 Sep 2007 20:46 GMT
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.
Signature

Milosz

> Hello,
>
[quoted text clipped - 13 lines]
> Thanks,
> Miguel

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.