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 / .NET Framework / New Users / April 2006

Tip: Looking for answers? Try searching our database.

DataGrid, with editable fields in form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe Spears - 17 Apr 2006 14:18 GMT
Hi
I want to display a datagrid summary of a datatable.
The grid will not show all the fields, but when the user selects a row, I
want the other controls (text boxes) to also bind to the same row that is
selected in the grid. However, the controls will bind to ALL of the fields,
where the grid will only show some of them.

I want to be able to edit the data using the text boxes, and then update.

I also want to be able to add data using the text boxes, via the creation of
a new row.

Seems simple in concept.

Does anyone have any working code of this?

Thanks
Cowboy (Gregory A. Beamer) - MVP - 18 Apr 2006 04:43 GMT
You have the ability to specify whether a particular column is editable by
determining how it is bound. Bound fields = not editable. Templated fields =
editable. You specify the item template and the edit template. This gives you
the option of making some fields drop down lists.

If you want to do this with the designer. Turn off auto gen of columns. Then
create each column as a bound column. If you drag a data table onto a form,
this is what you get for most items (bit fields will be a checkbox). Change
the columns you wish to edit to Template Columns. They will default to
textboxes. You can change this if you wish to bind to a list of items, like a
type table. There are plenty of tutorials for this on the web.

Signature

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

> Hi
> I want to display a datagrid summary of a datatable.
[quoted text clipped - 13 lines]
>
> Thanks

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.