Hi
I have data in Ilist using Nhibernate
how can i bind that " Ilist " with UltraWebGrid " with autogenerate column is false
if i bind it using " gv.datasource " nothing is showed up in grid
Here is My Code
IList lstCustomer = new List<Customer>();
string MyHql = "SELECT cust.CustomerName as CustomerName,cust.CustomerAddress,ct.Cityname,case when cust.Gender = 1 then 'Male' else 'Female' end as Gender,cust.CustomerId FROM City as ct,Customers as cust where ct.Cityid=cust.Cityid";
IQuery oIquery = I_session.CreateQuery(MyHql);
lstCustomer = oIquery.List();
gvInfra.DataSource = lstCustomer ; gvInfra.DataBind();
Hello qasimidl,
If you still need assistance with the matter, please do not hesitate to ask.
Hi qasimidl,
In case you don't use auto-generated columns, you should add them manually in the markup. For example:
<Bands>
<igtbl:UltraGridBand>
<Columns>
<igtbl:UltraGridColumn BaseColumnName="Name" Key="Name">
<Header Caption="Name">
</Header>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="ID" Key="ID">
<Header Caption="ID">
</Columns>
</igtbl:UltraGridBand>
</Bands>
Please let me know if this helps.