DataGrid, with editable fields in form

Discussion in 'ASP .Net Datagrid Control' started by Joe Spears, Apr 17, 2006.

  1. Joe Spears

    Joe Spears Guest

    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
     
    Joe Spears, Apr 17, 2006
    #1
    1. Advertising

  2. 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
    >
    >
    >
     
    Cowboy (Gregory A. Beamer) - MVP, Apr 18, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dm_dal

    Configure editable form fields?

    dm_dal, May 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    351
    Anachostic
    May 30, 2004
  2. Stefan
    Replies:
    0
    Views:
    316
    Stefan
    Jul 6, 2007
  3. Seth Williams

    DetailsView with only certain fields editable

    Seth Williams, Sep 16, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    392
    Seth Williams
    Sep 16, 2008
  4. Replies:
    2
    Views:
    269
  5. Replies:
    23
    Views:
    525
    Tim Streater
    Dec 18, 2013
Loading...

Share This Page