Change Format

Discussion in 'ASP .Net Datagrid Control' started by Bonj, Apr 2, 2004.

  1. Bonj

    Bonj Guest

    Hi
    I have a datagrid control that I want to be able to change the source SQL
    statement for, I presume I can do this by setting the datasource property
    and calling DataBind(). But how can I change the data formatting expression
    property of a bound column at runtime, from within the C# code of my aspx
    page?
    I'm quite inexperienced with this so bear with me.

    Thanks
    Bonj, Apr 2, 2004
    #1
    1. Advertising

  2. Are the fields identical from one datasource to the other? If not, you might
    be better off to have two grids, one for each datasource. You could hide the
    one you don't want.

    "Bonj" <> wrote in message
    news:%...
    > Hi
    > I have a datagrid control that I want to be able to change the source SQL
    > statement for, I presume I can do this by setting the datasource property
    > and calling DataBind(). But how can I change the data formatting
    > expression
    > property of a bound column at runtime, from within the C# code of my aspx
    > page?
    > I'm quite inexperienced with this so bear with me.
    >
    > Thanks
    >
    >
    Ken Cox [Microsoft MVP], Apr 2, 2004
    #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. Brian Candy
    Replies:
    2
    Views:
    1,149
    Janaka
    Feb 18, 2004
  2. Andy
    Replies:
    7
    Views:
    6,241
    Roedy Green
    May 10, 2004
  3. shannon
    Replies:
    1
    Views:
    8,580
  4. shannon
    Replies:
    0
    Views:
    556
    shannon
    Feb 1, 2006
  5. Replies:
    6
    Views:
    455
    Thomas Ganss
    Jan 15, 2006
Loading...

Share This Page