Click here to Skip to main content
16,003,243 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
I have a datagridview, and my date in from acces database

C#
void AfisareProduseContract()
        {
            Program.Connection.CommandText = "select * from ContractItems WHERE ContractId=@ContractId";
            Program.Connection.AddParameter("@ContractId", Convert.ToInt32(IdContractEditare));
            DataTable Table = new DataTable();
            Program.Connection.FillDataTable(Table, true);
            for (int i = 0; i < Table.Rows.Count; i++)
            {
                if (String.IsNullOrWhiteSpace(Table.Rows[i]["DeletedId"].ToString()))
                {
                    dataProduseContract.Rows.Add(Table.Rows[i]["Name"].ToString(), Table.Rows[i]["Quantity"].ToString() + " " + Table.Rows[i]["QuantityUnit"].ToString(), Table.Rows[i]["Payment"].ToString(), Table.Rows[i]["Description"].ToString());
                }
            }
        }


I whant to have a checkbox for every cell if the ROW, and if that row in the database is empty the checkbox to be clickable, if is not empty the row in datagridview to be inactive.
Posted
Comments
Sergey Alexandrovich Kryukov 19-Jun-11 13:26pm    
"I want to have" does not explain a problem. Have it. What's a problem?
--SA

1 solution

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