Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CheckBox In DataGridView - AGAIN
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
CheckBox In DataGridView - AGAIN
Divers
Thread ID:
01441152
Message ID:
01441152
Vues:
100
Ok everyone, I'm REALLY peeved at this point. I have no clue why this isn't working. I have spent anothr day Googling for answers and found nothing. This CAN'T be that hard to do. So what am I doing wrong????

Here's my method. It adds a new row to the data data. If the table does not exist, it is first created. Notice that there is a bool column. It shows up in the DataGridView control as a checkbox - it just doesn't check. HELP!!
private void _AddRow()
{
    if (dsGrid.Tables.Count == 0)
    {
        DataTable table = new DataTable();
        table.Columns.Add("ColumnId", typeof(int));
        table.Columns.Add("QueryId", typeof(int));
        table.Columns.Add("TableId", typeof(int));
        table.Columns.Add("TableName", typeof(string));
        table.Columns.Add("ApexColumnName", typeof(string));
        table.Columns.Add("Expression", typeof(string));
        table.Columns.Add("GroupBy", typeof(bool));         // The checkbox column

        dsGrid.Tables.Add(table);

        grdData.DataMember = dsGrid.Tables[0].TableName;
        grdData.DataSource = dsGrid.Tables[0];
    }

    DataRow NewRow = dsGrid.Tables[0].NewRow();
    NewRow["QueryId"] = _QueryId;
    dsGrid.Tables[0].Rows.Add(NewRow);
}
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform