Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Load the RadGrid when fetching a huge data from the Table of the database using Nhibernate
    primarykey
    data
    text
    <p>I like to reduce the loading time when running the Default.aspx in the browser because it is fetching a huge data from the Table in the database.</p> <p>When I use criteria.SetMaxResults(200) the grid load only 200 datas but I should load all the data's in the RadGrid from the table in the database .When I use criteria.SetFetchSize(200) it takes also a huge time to Load can anyone help me to find a solution for this.</p> <p>Here is the code</p> <pre><code> ICriteria criteria = session.CreateCriteria(typeof(Ttable1)); criteria.SetMaxResults(200); IList result = criteria.List(); if (result.Count &gt; 0) { grid1.DataSource = result; grid1.DataBind(); } else { grid1.DataSource = new string[] { }; grid1.DataBind(); } </code></pre> <p>Here the Mapping is </p> <pre><code> &lt;class name="Ttable1" table="Ttable1" lazy="false" mutable="true"&gt; &lt;cache usage="read-only"/&gt; &lt;id name="ID" column="ID" &gt; &lt;/id&gt; &lt;property name="CustNumber" column="CustNumber" type="String" /&gt; &lt;property name="CustName" column="CustName" type="String"/&gt; &lt;property name="PNo" column="PNor" type="String"/&gt; &lt;property name="ONo" column="ONo" type="String"/&gt; &lt;property name="Ln" column="Lns" type="String"/&gt; &lt;property name="Comments" column="Comments" type="String"/&gt; &lt;property name="size" column="size" type="String"/&gt; &lt;property name="Qty" column="Qty" type="String"/&gt; &lt;/class&gt; &lt;/hibernate-mapping&gt; </code></pre> <p>Here is the class using System; using System.Collections.Generic; using System.Linq; using System.Text;</p> <pre><code> namespace Business.entities { public class Ttable1 { public virtual string displayobj { get; set; } public virtual Ttable1 TLQDataObj { get; set; } public virtual int? ID { get; set; } public virtual string CustNumber { get; set; } public virtual string CustName { get; set; } public virtual string PNo { get; set; } public virtual string ONo { get; set; } public virtual string Ln { get; set; } public virtual string Comments { get; set; } public virtual string size { get; set; } public virtual string Qty { get; set; } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload