Data Grid Paging doesn't work

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Raul

    #1

    Data Grid Paging doesn't work

    Hi could some one help me, I have a datagrid displaying some info I set the
    property "AllowSorting=t rue" but it doesn't work.


    private void Page_Load(objec t sender, System.EventArg s e)
    {

    Response.Cache. SetCacheability (System.Web.Htt pCacheability.N oCache);
    if ((Page.IsPostBa ck))
    {
    SqlConnection sConn = new SqlConnection() ;
    sConn = new SqlConnection
    (System.Configu ration.Configur ationSettings.A ppSettings["sConn"].ToString());
    DataSet ds = new DataSet();
    String sText = "SELECT EMPLOYEE_NUMBER ,FULL_NAME, LOCATION FROM TLVSETXEMD
    WHERE FULL_NAME LIKE '"+ TxtName.Text +"%'";
    SqlDataAdapter cmd = new SqlDataAdapter( sText, sConn);
    cmd.Fill(ds,"Pu blished");
    DGEmployee.Data Source= ds.Tables["Published"].DefaultView;
    this.DataBind() ;
    }
    }


Working...