C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Making the datagrid non editable


Posted Date: 06 Mar 2004    Resource Type: Articles    Category: .NET Framework
Author: MUNIKUMAR RMember Level: Silver    
Rating: Points: 7



Each column in the datagrid is derived from(made of) System.Windows.Forms.TextBox.
Since it is made of TextBox it is editable(i.e it can be changed). we can modify the contents of datagrid that is displayed because of this textbox.

If datagrid contains 5 columns it will consist of 5 textbox.In addition to that it consists of HScrollBar and VScrollBar.

The datagrid can be made non editable by the following method:

Here I used method to remove all this controls by the statement

dataGrid1.Controls.Clear();


Now datagrid will become readonly




Responses

Author: Irfan Patel    18 Jun 2004Member Level: Silver   Points : 0
Please try to be more descriptive


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Runtime Type Identification ( R T T I )
Previous Resource: Creating the datatable and binding it to datagrid
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use