Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Note it is windows application.

Design Screen as follows

Faculty Code combo box
Course Code Combo box

One Check box is there.

when i select the faculty code in combo box and click the check box that particular selected faculty code details should be shown in datagridview.

when i did not select the faculty code combo box and click the check box all faculty code details should be shown in datagridiview.

for that how can i do using csharp.

in form load in datagridivew all the faculty and course code details shown in datagridview.

for that i written the code in form load.
C#
private void Frmfacultyapproved_Load(object sender, EventArgs e)
{
   LoadFacultyApproval();
}

private void LoadFacultyApproval()
{
       GFun.BindAccessConn();
    sql = "select SNo,Faculty_Code,Cmn_Minor_Code from Tb_Faculty_Approval  where Active = 'A' Order by Faculty_Code,Cmn_Minor_Code";
    OleDbDataAdapter da = new OleDbDataAdapter(sql, GFun.OleDbCon);
    DataTable dt = new DataTable();
    da.Fill(dt);
    Dgv_Fac_Approval.DataSource = dt;
}
Posted
Updated 4-Mar-13 18:24pm
v2
Comments
Karthik Harve 5-Mar-13 0:24am    
[Edit] pre tags added.
Karthik Harve 5-Mar-13 0:55am    
What is the problem here ? where are you handling check box changed event or dropdownlist changed event ?

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