Posts

Showing posts with the label listview

Fill List view from database

Image
Hi to all. In this post we make code for populate list view from database. first we take one list view and name them listdata. and set in form with require height and width. listview now make one function FillList() to populate listview.         private void FillList()         {             try             {                 //use dbhelper class to fill datatable from database.                 DbHelper Db = new DbHelper();                 //make query string .                 string sQry = "Select * from Employee";                 //call function for fill datatable.                 DataTable Dt = Db.FillDataTable(sQry);     ...