Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > DataGrid, with editable fields in form

Reply
Thread Tools

DataGrid, with editable fields in form

 
 
Joe Spears
Guest
Posts: n/a
 
      04-17-2006
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


 
Reply With Quote
 
 
 
 
Cowboy (Gregory A. Beamer) - MVP
Guest
Posts: n/a
 
      04-18-2006
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!
***************************


"Joe Spears" wrote:

> 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
>
>
>

 
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
Editable fields in datagrid someone@microsoft.com ASP .Net 2 12-15-2009 06:56 PM
DetailsView with only certain fields editable Seth Williams ASP .Net 0 09-16-2008 03:45 PM
Swing frames with user editable labels and text-fields Stefan Java 0 07-06-2007 05:59 PM
get all the form fields in a form Mr. SweatyFinger ASP .Net 20 01-31-2007 08:24 AM
Configure editable form fields? dm_dal ASP .Net 1 05-30-2004 03:33 AM



Advertisments