Skip to content Skip to sidebar Skip to footer

How To View 2nd Page In Paging On Click Numbers In Bottom

I am trying to search and my grids shows me results of 20 records. If i have applied allow paging true and page size is 20 Then on click on 2nd page in Grid my whole grid is refres

Solution 1:

i think you should use

  XDocument document = XDocument.Load(@"c:\users\administrator\documents\visual studio 2010\Projects\LINQtoXMLSelectApp\LINQtoXMLSelectApp\Employee.xml");
        var query = from r in document.Descendants("Employee") where (int)r.Element("Age") > 27 select new
        {
            FirstName = r.Element("FirstName").Value, Age = r.Element("Age").Value };
        GridView1.DataSource = query;
        GridView1.DataBind();

Solution 2:

Your issue is not producing with me. It is working fine. I have used the following XML file to bind to gridview. Code and HTML is the same.

    <?xml version="1.0" encoding="utf-8" ?>  
<Customer>  
  <Customerinfo>  
    <Name>Vithal Wadje</Name>  
    <city>Mumbai</city>  
    <Address>Sion, Mumbai</Address>  
 </Customerinfo>  
  <Customerinfo>  
    <Name>D Sudhir Wadje</Name>  
    <city>Latur</city>  
    <Address>Latur</Address>  
  </Customerinfo>  
  <Customerinfo>  
    <Name>U D</Name>  
    <city>Mumbai</city>  
    <Address>DN,Road Mumbai</Address>  
  </Customerinfo>  
  <Customerinfo>  
    <Name>Anil Kumar</Name>  
    <city>Delhi</city>
    <Address>Nehru House</Address>  
  </Customerinfo>  
<Customerinfo>  
    <Name>Five</Name>  
    <city>Mumbai</city>  
    <Address>Sion, Mumbai</Address>  
 </Customerinfo>  
<Customerinfo>  
    <Name>Six</Name>  
    <city>Mumbai</city>  
    <Address>Sion, Mumbai</Address>  
 </Customerinfo>  
<Customerinfo>  
    <Name>Seven</Name>  
    <city>Mumbai</city>  
    <Address>Sion, Mumbai</Address>  
 </Customerinfo>  
<Customerinfo>  
    <Name>Eight</Name>  
    <city>Mumbai</city>  
    <Address>Sion, Mumbai</Address>  
 </Customerinfo>  
<Customerinfo>  
    <Name>Nine</Name>  
    <city>Mumbai</city>  
    <Address>Sion, Mumbai</Address>  
 </Customerinfo>  
<Customerinfo>  
    <Name>Ten</Name>  
    <city>Mumbai</city>  
    <Address>Sion, Mumbai</Address>  
 </Customerinfo>  
<Customerinfo>  
    <Name>Eleven</Name>  
    <city>Mumbai</city>  
    <Address>Sion, Mumbai</Address>  
 </Customerinfo>
<Customerinfo>  
    <Name>Twelve</Name>  
    <city>Mumbai</city>  
    <Address>Sion, Mumbai</Address>  
 </Customerinfo>    
</Customer>  

Solution 3:

i think its help you

ds.Tables[0].Select("ID=1 AND ID2=3");

Post a Comment for "How To View 2nd Page In Paging On Click Numbers In Bottom"