Author: dpreznik | Posted on: 2/4/2010 9:13:36 AM | Views : 261

Hi,
I have a GridView. Its source is an SqlDataSource. Its SelectCommand is generated dynamically for the sake of filtering:
protected void Filter() { FrontListSqlDataSource.SelectCommand = selectAllBookQuest + GenerateWhereClause(); FrontListGridView.DataBind(); } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Filter(); string[] columns = new string[FrontListGridView.Columns.Count + 1]; // + 1 because we need one entry for *None int i; for (i = 0; i < FrontListGridView.Columns.Count; i++) columns[i] = FrontListGridView.Columns[i].HeaderText; columns[i] = "*None"; Array.Sort(columns); ddlBookQuestFields.DataSource = columns; ddlBookQuestFields.DataBind(); } }

When I try to go to anothe ...

Go to the complete details ...