Solved

How to make the datagridview in vb.net windows form as non editable and with hyperlink.

Posted on 2012-04-02
3
236 Views
Last Modified: 2012-04-09
1.How to make Datagridview as non editable.
2.I am getting the output as select id,name,location from emp into datagridview.
3.How can i make the id as link or button or something. Which can be clicked and
loads editform
The editform
contains 3 textboxes id, name and location.
where name and location is assigned automatically.
0
Comment
Question by:searchsanjaysharma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 37795265
1) Set its ReadOnly property to true
2) ok
3) You can use double click to edit the row. If you want button then
    http://vb.net-informations.com/datagridview/vb.net_datagridview_button.htm
0
 
LVL 5

Expert Comment

by:hafeezmca
ID: 37795469
Hi,
In case if you dont want to do any sort of coding then follow this way.

Create a table with the following structure in your sql server:

id (int) Primary key with Indentity specification to true, name nvarchar2(100) and location nvarchar2(100)

Drag a GridView and configure the Datasource and let the grid populate itself.
By default you will have all the fields in read only mode.

Goto Gridview properties and add the select Edit,Update,Cancel Command.
Once done you will be able to edit the record. Note that the Id is automatically in read only mode.
In case if you want the name to be in ReadOnly mode then go to Gridview properties and select the Name field, make it Readonly property to True.
Hope this is what you are trying to achieve.
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 37822544
ok
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question