in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Enable Selection with Generated Columns

Last post 10/2/2007 8:22 AM by Kevin Attard. 2 replies.
Page 1 of 1 (3 items)
Sort Posts:
Previous Next
  • 10/2/2007 6:33 AM

    Enable Selection with Generated Columns

    Hi,

    Is it possible to have a selection column (checkbox or linkbutton) when you set AutoGenerateColumns to true?

    When i click on 'enable selection' in the smart tag, nothing happens. If i turn the designer to source and back to design, the 'enable selection' is not selected.

    If i try to click on the columns button and create a select column, the AutoGenerateColumns is set to false.

    Maybe i'm just forgetting something..

    Thanks
     

  • 10/2/2007 7:41 AM In reply to

    Re: Enable Selection with Generated Columns

    Answer

    Hi Kevin,

    You can use the following for the ASPxGridView's DataBound method. This method will add the command selection column:

        protected void ASPxGridView1_DataBound(object sender, EventArgs e)
        {
            if (!(ASPxGridView1.Columns[0] is GridViewCommandColumn))
            {
                GridViewCommandColumn SelectCol = new GridViewCommandColumn();
                SelectCol.ShowSelectCheckbox = true;
                ASPxGridView1.Columns.Insert(0, SelectCol);
            }
        }

    Thanks. 

    Filed under:
  • 10/2/2007 8:22 AM In reply to

    Re: Enable Selection with Generated Columns

    Thanks

Page 1 of 1 (3 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED