Solved

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

Posted on 2012-04-02
3
229 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
Comment Utility
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
Comment Utility
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
Comment Utility
ok
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

10 Experts available now in Live!

Get 1:1 Help Now