DataGrid, with editable fields in form

J

Joe Spears

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
 
C

Cowboy (Gregory A. Beamer) - MVP

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.


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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top