Exemple #1
0
 /// <summary>
 /// Bind Searched Data
 /// </summary>
 private void BindSearchData()
 {
     CaseAdmin _CaseAdminAccess = new CaseAdmin();
     DataSet MyDataSet = _CaseAdminAccess.SearchCase(int.Parse(ListCaseStatus.SelectedValue),txtcaseid.Text.Trim(),txtfirstname.Text.Trim(),txtlastname.Text.Trim(),txtcompanyname.Text.Trim(),txttitle.Text.Trim());
     DataView dv = new DataView(MyDataSet.Tables[0]);
     dv.Sort = "CaseID Desc";
     uxGrid.DataSource = dv;
     uxGrid.DataBind();
 }
Exemple #2
0
    /// <summary>
    /// Occurs when the hyperlink to sort a column is clicked
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void uxGrid_Sorting(object sender, GridViewSortEventArgs e)
    {
        CaseAdmin _CaseAdminAccess = new CaseAdmin();
        DataSet MyDataSet = _CaseAdminAccess.SearchCase(int.Parse(ListCaseStatus.SelectedValue), txtcaseid.Text.Trim(), txtfirstname.Text.Trim(), txtlastname.Text.Trim(), txtcompanyname.Text.Trim(), txttitle.Text.Trim());
        uxGrid.DataSource = SortDataTable(MyDataSet, e.SortExpression,true);
        uxGrid.DataBind();

        if (GetSortDirection() == "DESC")
        {
            e.SortDirection = (SortDirection.Descending);
        }
        else
        {
            e.SortDirection = SortDirection.Ascending;
        }
    }