I am probably doing this wrong BUT
I put a form together with the following:
Datagrid - all read-only and most of the cells hidden for a reason
3 textboxes from the same datasource as the datagrid
Now
when I select a record from the datagrid, the textboxes change accordingly to match the record that was selected in the datagrid, I can change a value in the textbox and update the datasource and it changes(everythings fine)
but when I change the visible property to false, I run into a little snag.
I cannot reference the textboxes content.
I change change it back and its fine.
How can you hide the textbox
I changed the color of the box and text to the background color and you can still see the text.
I also tried changing the fonts color to invisible, but with the same detail.
Is there another way to do this
Davids Learning

? Textbox
RainmanRam
From something someone else had commented on - the textbox bindings do not work when the textbox is hidden but as soon as the control becomes visible again the binding works and the contents are visible.
The way I would do it is to refer to the data source records directly and not to the control text property. The data source values are reflected whether the control is visible on not. So if you change the datagridview contents and the textbox is hidden - if your refering to the bindingsource record then you should see the contents reflected. If you looking at the databound textbox text property then you would only see the correctly bound contents when the control becomes visible.
dsfffffffffffffffffffffffff
David, Please keep related questions confined to a single thread:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=572019&SiteID=1
Locking down and deleting duplicate thread
worldhello
It depends on what selectiontype your using.
There are selectedcells, selectedrows and selectedcolumns collections. Which you can iterate over and it depends on whether you allow multi selects as to whether there will be one item or more than one item in these collections.
DanMeyers
got bumped offline for a while, I'll try this again
How do you refer to a field in the current record selected in a datagrid
Davids Learning