Click here to Skip to main content
15,749,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
List<Newss> _objNwslst = new List<Newss>();
               List<Industry> _objIndstry = new List<Industry>();
               while (sDr.Read())
                   _objIndstry.Add(new Industry()
                       ParentID = sDr.GetInt32(sDr.GetOrdinal("Industry")),
                       IndstryName = sDr.GetString(sDr.GetOrdinal("IndstryName")),
                   _objState.CountryID = sDr.GetInt32(sDr.GetOrdinal("CountryID"));
                       objIndstry = _objIndstry,
               return _objNwslst;

What I have tried:

I am not able to bind Gridview Itemtemplate

<%#DataBinder.Eval(Container.DataItem, "objIndstry.IndstryName")%>
Updated 11-Jun-16 4:23am
Vincent Maverick Durano 11-Jun-16 12:45pm    
Are you doing a master-detail data binding? Keep in mind that a Data Representation control like GridView can only handle one datasource at a time. If you want to display data in gridview based from different tables then you would need to construct a custom DataTable/List that would hold the columns from your other tables and then use the final table as your GridView datasource.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900