Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
.net VBA word safemode 1 39
Tabcontrol Caption? 1 31
Vb.Net Date Formatting Assistance 4 35
Crystal reports vb.net 2 20
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now