Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cell of a paticular row in a datagrid as readonly 1

Status
Not open for further replies.

nikhilparchure

Programmer
Oct 6, 2001
121
AU
How can I make a cell of a paticular row in a datagrid as readonly....????

I have come acroos that we need to overide the Edit implementation of the DataGridTextBoxColumn for the same.
But I have no clues as how should I go about it.

I am using Winforms

Any Help would be appreciated

Parchure Nikhil
 
You can use DataGridTextBoxColumn's ReadOnly property.

So it would be

Code:
Dim firstColStyle As DataGridTextBoxColumn = New DataGridTextBoxColumn

firstColStyle.ReadOnly = True

This will set the Column to readonly.

-Kris
 
Thanks Buddy
But my problem is bit different.
I do not want to set the whole Column as readonly.
But individual (rows,column) combination needs to be set a readonly.
i.e A DataGridCell should be made readonly and not the entire column to which the cell belongs.

The above solution would make the entire column as readonly.

Any Help would be appreciated


Regards
Parchure Nikhil
 
If there is a way to do this on a datagrid, I don't know it.
We use Infragistics UltraWin Grid. It runs rings around M$'s DataGrid.

Hope this helps...
 
I have created an FAQ on this, follow the link and let me know if that works for you.

faq796-4968

-Kris
 
Thanks Kris ,
That did work...thanks guys for the help..
The edit method of the datagrid has to be overridden

Regards
Parchure Nikhil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top