那还不是一样,就是写SQL语句不同而已啦

解决方案 »

  1.   

    我用的DataSet绑定数据,而MSDN是用的DataTable
    请教用DataSet绑定数据时,排序事件怎么写
    msdn的排序事件如下:
    // Retrieve the data source from session state.
    DataTable dt = (DataTable)Session["Source"]; // Create a DataView from the DataTable.
    DataView dv = new DataView(dt);// The DataView provides an easy way to sort. Simply set the
    // Sort property with the name of the field to sort by.
    dv.Sort = e.SortExpression;// Rebind the data source and specify that it should be sorted
    // by the field specified in the SortExpression property.
    ItemsGrid.DataSource = dv;
    ItemsGrid.DataBind();