Пример #1
0
        protected void gvResults_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            CosaWSClient wsClient = new CosaWSClient();
            gvResults.PageIndex = e.NewPageIndex;

            var result = wsClient.GetData(gvResults.PageSize, e.NewPageIndex+1, null, null);

            gvResults.DataSource = result.Items;
            gvResults.DataBind();
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var gu = System.Guid.NewGuid().ToString();

            if (IsPostBack) return;

            CosaWSClient wsClient = new CosaWSClient();
            var result =  wsClient.GetData(gvResults.PageSize, 1, null, null);
            gvResults.VirtualItemCount = result.TotalRows;
            gvResults.PageIndex = 0;
            gvResults.DataSource = result.Items;
            gvResults.DataBind();
        }