Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CheckBox In DataGridView - AGAIN
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
CheckBox In DataGridView - AGAIN
Miscellaneous
Thread ID:
01441152
Message ID:
01441152
Views:
101
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
Next
Reply
Map
View

Click here to load this message in the networking platform