ASP.NET DataGrid and TextBox creation at runtime?

Discussion in 'ASP .Net Datagrid Control' started by Arulraja, Nov 7, 2003.

  1. Arulraja

    Arulraja Guest

    Hello,

    How do I create the following at runtime? I am able to create a
    TextBox Column at runtime using "DataGridColumn" class. But I don't
    know how to show the DataSet values on the TextBox(TextBox.Text).

    I am using the following methods of the DataGridColumn class, DataGrid
    Class.

    DataGridColumn class:
    ---------------------
    public override void InitializeCell(TableCell cell, int columnIndex,
    ListItemType itemType)

    DataGrid Class:
    ---------------
    protected override ArrayList CreateColumnSet(PagedDataSource source,
    bool useDataSource)

    I think I am missing something? But I couldn't find out that part.
    Help will be really appreciated on this.


    <asp:TemplateColumn HeaderText="First Name">
    <ItemTemplate>
    <asp:Label runat="server"
    Text='<%# DataBinder.Eval(Container, "DataItem.au_fname") %>'
    />
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox runat="server"
    Text='<%# DataBinder.Eval(Container, "DataItem.au_fname") %>'
    />
    </EditItemTemplate>
    </asp:TemplateColumn>

    Thanks
    Arul
    Arulraja, Nov 7, 2003
    #1
    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. CsaaGuy
    Replies:
    2
    Views:
    962
    Mythran
    Jul 13, 2005
  2. Alan Seunarayan
    Replies:
    5
    Views:
    565
    =?Utf-8?B?Sm9obiBUZWFndWU=?=
    Jul 27, 2005
  3. CreativeMind
    Replies:
    2
    Views:
    846
    Andrew Morton
    Dec 10, 2009
  4. Alan Seunarayan

    Creation and Positioning DataGrid Columns at runtime.

    Alan Seunarayan, Jul 27, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    5
    Views:
    118
    John Teague
    Jul 27, 2005
  5. Alan Seunarayan

    Creation and Positioning DataGrid Columns at runtime.

    Alan Seunarayan, Jul 27, 2005, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    143
    John Teague
    Jul 27, 2005
Loading...

Share This Page