Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Changing ReadOnly of DataGridColumnStyle on the fly?
 

Changing ReadOnly of DataGridColumnStyle on the fly?

Hi,

I need to make some of my DataGrid columns read only. I use a button for that and this code is in a handler:

DataGridTableStyle tsDetails = dgDetails.TableStyles[0];
DataGridColumnStyle cs = tsDetails.GridColumnStyles["SomeName"];
cs.ReadOnly = false;

But this doesn't change anything. What else should I do?

Thank you
MigrationUser 1  Tuesday, December 14, 2004 9:48 AM
Sorry, my fault :) Too much programming!
MigrationUser 1  Tuesday, December 14, 2004 10:09 AM

You can use google to search for other answers

Custom Search

More Threads

• Remove Rows in DataTable and how to print distinct field name?
• DataGridView Scrolling
• dataGridView: nested obj., masked input
• Disallow new row in Datagrid
• How to display data in textbox with 'TextMode' = 'password'?
• DataGridViewComboBoxCell
• Keypress
• custom formatting for (too) long text
• How to populate a object from multiple result of the query to grid
• Data Objects for Bulk Insert