Can we bind data to textbox in a headertemplate of a datagrid

Discussion in 'ASP .Net' started by Vijaya, Nov 12, 2003.

  1. Vijaya

    Vijaya Guest

    Can we bind data to textbox in a headertemplate in a
    template column of a datagrid?

    If so please give some code snippets.

    Thank you
     
    Vijaya, Nov 12, 2003
    #1
    1. Advertising

  2. Vijaya

    vijay Guest

    Normally i think we cannot data to template columns, but there is an
    other way around ... like you can write script to bind a DATAFIELD to
    the Textbox in the Header Template.

    ex:
    ....
    <HeaderTemplate>
    <input type=text value='<%#
    DataBinder.Eval(Container.DataItem,"DATAFIELD").ToString())%>'
    </HeaderTemplate>
    ....
    DATAFIELD can be any field in the DATASOURCE bound to the DATAGRID.



    "Vijaya" <> wrote in message news:<039601c3a913$d2300120$>...
    > Can we bind data to textbox in a headertemplate in a
    > template column of a datagrid?
    >
    > If so please give some code snippets.
    >
    > Thank you
     
    vijay, Nov 12, 2003
    #2
    1. Advertising

  3. Vijaya

    Vijaya Guest

    Can we actually bind data to a header template of a
    datagrid in a item template?
    i have tried in the way given below but it is not
    working .
    Please suggest me some other way.

    Thank you
    >-----Original Message-----
    >Normally i think we cannot data to template columns, but

    there is an
    >other way around ... like you can write script to bind a

    DATAFIELD to
    >the Textbox in the Header Template.
    >
    >ex:
    >....
    ><HeaderTemplate>
    ><input type=text value='<%#
    >DataBinder.Eval(Container.DataItem,"DATAFIELD").ToString

    ())%>'
    ></HeaderTemplate>
    >....
    >DATAFIELD can be any field in the DATASOURCE bound to the

    DATAGRID.
    >
    >
    >
    >"Vijaya" <> wrote in

    message news:<039601c3a913$d2300120$>...
    >> Can we bind data to textbox in a headertemplate in a
    >> template column of a datagrid?
    >>
    >> If so please give some code snippets.
    >>
    >> Thank you

    >.
    >
     
    Vijaya, Nov 13, 2003
    #3
    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. SamIAm
    Replies:
    1
    Views:
    4,558
    Bipin Joshi [MVP]
    Jun 26, 2003
  2. Cheng
    Replies:
    2
    Views:
    9,374
    dany7487
    Nov 14, 2007
  3. mr2_93
    Replies:
    1
    Views:
    3,602
    mr2_93
    Oct 2, 2005
  4. Vijaya

    Can we bind data to textbox in a headertemplate of a datagrid

    Vijaya, Nov 12, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    214
    Pramod Anchuparayil
    Nov 12, 2003
  5. Jodi
    Replies:
    0
    Views:
    157
Loading...

Share This Page