Dynamic columns and Cancel command

Discussion in 'ASP .Net Datagrid Control' started by sos00, Jan 16, 2006.

  1. sos00

    sos00 Guest

    Hi guys,

    i have created a user control which contains a datagrid and it's columns
    will be create dynamically.
    this grid is able to do Add,Edit and Delete.

    because i create columns dynamically , i put columns generating code in
    LoadViewState method of user control.

    protected override void LoadViewState(object savedState)
    {
    base.LoadViewState (savedState);
    Grd.DataSource = this.DataSource;
    CreateColumns();
    }

    that's ok, but any control which cause postback will make trouble except
    when it calls Grd.DataBind() method...
    i try to call Grd.DataBind() method in LoadViewState() but when i do that,
    Cancel and Update command buttons won't work...
    what can i do ?


    Thanks.
     
    sos00, Jan 16, 2006
    #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. helpful sql
    Replies:
    0
    Views:
    818
    helpful sql
    May 19, 2005
  2. K B
    Replies:
    1
    Views:
    9,114
    Christopher Reed
    Mar 29, 2006
  3. Replies:
    5
    Views:
    599
  4. Julia B
    Replies:
    2
    Views:
    332
    Julia B
    Apr 11, 2006
  5. datagrid update/cancel command not working

    , Sep 15, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    727
Loading...

Share This Page