Click here to Skip to main content
16,005,241 members
Home / Discussions / C#
   

C#

 
GeneralRe: Catching the form close Pin
Giorgi Dalakishvili29-May-07 9:56
mentorGiorgi Dalakishvili29-May-07 9:56 
GeneralRe: Catching the form close Pin
Gene Arnold29-May-07 9:47
Gene Arnold29-May-07 9:47 
QuestionHow to display '0.5' as '1/2'? Pin
matthias s.29-May-07 8:04
matthias s.29-May-07 8:04 
AnswerRe: How to display '0.5' as '1/2'? Pin
PIEBALDconsult29-May-07 8:11
mvePIEBALDconsult29-May-07 8:11 
GeneralRe: How to display '0.5' as '1/2'? Pin
Dave Kreskowiak29-May-07 8:52
mveDave Kreskowiak29-May-07 8:52 
AnswerRe: How to display '0.5' as '1/2'? Pin
Giorgi Dalakishvili29-May-07 9:14
mentorGiorgi Dalakishvili29-May-07 9:14 
Questionbind treeviwe with a list Pin
merwa29-May-07 7:42
merwa29-May-07 7:42 
QuestionBindingList and DataGridView question. [modified] Pin
sharp source29-May-07 7:15
sharp source29-May-07 7:15 
<br />
public class ActiveTable<br />
{<br />
        public string omniwinRoot;<br />
        public string table;<br />
        public string tableKey;<br />
        public int tableRecords;<br />
        public int tableUniqueRecords;<br />
        public int diff;<br />
        public Queue<string> doubleKey = new Queue<string>();<br />
        public Queue<string> noNversion = new Queue<string>();<br />
        <br />
        analyzeTable()<br />
        {<br />
         // if there is a problem with the index key (eg uniqueness) the id is put in the<br />
         // doubleKey Queue.<br />
<br />
        }<br />
<br />
}<br />
<br />
<br />
public class form1<br />
{<br />
        BindingList<ActiveTable> bindingList1 = new BindingList<ActiveTable>();<br />
        dataGridView1.DataSource = bindingList1;<br />
        dataGridView1.AutoGenerateColumns = true;<br />
        ActiveTable tableToCheck = new AvtiveTable();<br />
<br />
        // tableTocheck.omniwinRoot is assigned a value from a table<br />
        // tableTocheck.table is assigned a value from a table<br />
        // tableTocheck.tableKey is assigned a value from a table<br />
        tableTocheck.analyseTable();<br />
        if (tableToCeck.doubleKey.Count() > 0)<br />
        {<br />
            bindingList1.Add(tableToCheck);<br />
            <br />
        }<br />
<br />
<br />
}<br />


My question is: why doesn't this work.
The DataGridView has a datasource and should be able to generate columns, yes?
Why doesn't my DataGridView create columns and adds rows when items are added to bindinglist?

I've tried lots of different things.
Such as defining the columns myself. With defined columns i see that there are rows added to the DataGridView but the columns remain empty.

Any suggestions?



-- modified at 13:35 Tuesday 29th May, 2007
AnswerRe: BindingList and DataGridView question. Pin
Dave Kreskowiak29-May-07 7:33
mveDave Kreskowiak29-May-07 7:33 
GeneralRe: BindingList and DataGridView question. Pin
sharp source29-May-07 7:51
sharp source29-May-07 7:51 
GeneralRe: BindingList and DataGridView question. Pin
Dave Kreskowiak29-May-07 8:50
mveDave Kreskowiak29-May-07 8:50 
GeneralRe: BindingList and DataGridView question. Pin
sharp source29-May-07 9:58
sharp source29-May-07 9:58 
GeneralRe: BindingList and DataGridView question. [modified] Pin
Dave Kreskowiak29-May-07 10:44
mveDave Kreskowiak29-May-07 10:44 
GeneralRe: BindingList and DataGridView question. Pin
sharp source29-May-07 11:05
sharp source29-May-07 11:05 
GeneralRe: BindingList and DataGridView question. Pin
Dave Kreskowiak29-May-07 13:21
mveDave Kreskowiak29-May-07 13:21 
GeneralRe: BindingList and DataGridView question. Pin
sharp source30-May-07 8:22
sharp source30-May-07 8:22 
QuestionHow to stop the comboBox from being Edited? Pin
Khoramdin29-May-07 7:14
Khoramdin29-May-07 7:14 
AnswerRe: How to stop the comboBox from being Edited? Pin
Dave Kreskowiak29-May-07 7:25
mveDave Kreskowiak29-May-07 7:25 
AnswerRe: How to stop the comboBox from being Edited? Pin
Tarakeshwar Reddy29-May-07 7:27
professionalTarakeshwar Reddy29-May-07 7:27 
QuestionSending data thru the ethernet to a device Pin
Brad Wick29-May-07 6:54
Brad Wick29-May-07 6:54 
AnswerRe: Sending data thru the ethernet to a device Pin
Dave Kreskowiak29-May-07 7:15
mveDave Kreskowiak29-May-07 7:15 
AnswerRe: Sending data thru the ethernet to a device Pin
kubben29-May-07 7:15
kubben29-May-07 7:15 
GeneralRe: Sending data thru the ethernet to a device Pin
Brad Wick30-May-07 7:46
Brad Wick30-May-07 7:46 
GeneralRe: Sending data thru the ethernet to a device Pin
kubben30-May-07 7:56
kubben30-May-07 7:56 
GeneralRe: Sending data thru the ethernet to a device Pin
Brad Wick30-May-07 11:53
Brad Wick30-May-07 11:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.