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
Solved

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

Posted on 2012-04-02
3
232 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
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 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