DataGridView and Row

M

Meelis

Hi


Im using on my form standard DataGridView
I need special properties for DataGridViewRow and so i created class that
inherits DataGridViewRow.
Created my own properties for example FieldID

Now i define new row, set property value and add this new row to grid

Dim oRow as New clsRow
clsRow.FieldID=100
theGrid.Rows.Add(oRow)


But when i want to get selected rows property value its alwys 0!!

Dim oRow as clsRow
oRow=theGrid.CurrentRow
MsgBox(oRow.FieldID)

value is alwys 0!

when i make same thing with ListView and ListViewItem, then all works fine!

Any ideas?

Best regards;
Meelis
 
M

Meelis

hmmm

if i call oRow.CreateCells(theGrid)
and set oRow.Cells(0).Value="" then all works

whats going on?

Meelis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top