create a windows form appication in c#.net RRS feed

  • General discussion

  • Write a Windows forms application to accomplish the following:
    1.       When you run the application, it should load Employee data from TblEmployeeDetails table to a grid.
    2.       Grid should have proper title for all header columns.
    3.       We should be able to filter data for each column on the table.
    4.       We should be able to filter data currently displayed on the grid
    5.       When you double click on a row on the grid, a new screen should be show for editing data and update the same.
    6.       Option should be given to Add new employee details.
    7.       Proper exception handling should be in place.
    8.       Option should be given to delete the data.
    9.       Before deleting the data, there should be a confirmation displayed.
    10.   While adding the new data or updating existing, if OnlineID already exists, then you should not allow the data to be added or updated and a warning message should be displayed.
    11.   After adding or updating data, data should be reflected on the grid.
    Sunday, June 3, 2012 4:40 AM

All replies

  • What you want to do is to bind a database to a DatGridview.  I did a web search for "dataGridview binding to database" and found plenty of articles on the subject.  Follow the tutorial for implimenting the DataGridview on the webpage below.  Get the basic functionality working first and then add any enhancements you need later.  The Datagridview has many event handlers that are used to add feaures.  A number of your requirements are just implimenting additional features to the DataGridview.  first get the basic features working which is to bind the datagridview to your database and display the columns from the database table.  Then add features one at a time to make it easier to troubleshoot any problems.



    Sunday, June 3, 2012 5:20 AM
  • where i have loaded a table data to a grid but i am unable filter data for each column on the table and filter data currently displayed on the grid could u please give me the idea

    Tuesday, June 5, 2012 2:36 AM
  • You couild make the header row of the datagridview a combobox.  Then put the unique items in the column into the combobox so the datagridview looks like an excel worksheet with autofiltes turned on.  The other choice is to use SQL statements to do the filtering.  Maybe have tow datagridviews. One with all the data and a 2nd that is filtered using SQL.   another choice would be to pit the data into a generic list  (List<List<string>>) and display only the filtered results.  I have datagridview where I store my unedited datagridview in a List<List<string>>.  then when the editing is finished I compare the datagridview with the List and then store only the cells that are different.  This speed up the storage process where I'm storing the results in a device that is very slow.


    Tuesday, June 5, 2012 8:46 AM
  • Hi Gagan,

    Your application should use DataView control,I think the following websites are helpful for you.

     the use of DataView in MSDN http://msdn.microsoft.com/en-us/library/e0ywh3cz.aspx 




    Tuesday, June 5, 2012 9:04 AM