944,175 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 55537
  • VB.NET RSS
Apr 17th, 2006
0

select row in datagrid....need help

Expand Post »
hi every one .
does any one know how to insert checkbox in datagrid so user can select row and how to know which rows selected
Reputation Points: 37
Solved Threads: 17
Junior Poster
manal is offline Offline
122 posts
since Mar 2006
Apr 19th, 2006
0

Re: select row in datagrid....need help

hi every one .
does any one know how to insert checkbox in datagrid so user can select row and how to know which rows selected

Hi,
I can give you some guides

About how to insert checkbox , I think you have to work with Table Styles property.

About how to know which row selected here you have to take the current data grid index by
DataGrid1.CurrentRowIndex

then you can access any values in the selected row by
DataGrid1.Item(.CurrentRowIndex, 0)

0 is for the first column and 1 for the second ....

Good Luck
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Ammar Gaffar is offline Offline
5 posts
since Apr 2006
Apr 19th, 2006
0

Re: select row in datagrid....need help

Hi,

To insert a checkbox to every row you must add a template column to your data grid.

Loren Soth
Reputation Points: 28
Solved Threads: 4
Posting Whiz in Training
Lord Soth is offline Offline
233 posts
since Mar 2006
Jan 6th, 2007
0

Re: select row in datagrid....need help

i have a problem using datagrid in vb.net.

i want to bound it with database and want to change column length

please tell me about it
Reputation Points: 10
Solved Threads: 1
Newbie Poster
ramzan is offline Offline
1 posts
since Nov 2006
Mar 4th, 2009
0

Re: select row in datagrid....need help

i have the same problem, i have check box and when checked i want the complete row to read of checked one.. can anyone help me plzzzzz
Reputation Points: 10
Solved Threads: 1
Newbie Poster
suryarajin is offline Offline
1 posts
since Mar 2009
Mar 4th, 2009
0

Re: select row in datagrid....need help

Click to Expand / Collapse  Quote originally posted by suryarajin ...
i have the same problem, i have check box and when checked i want the complete row to read of checked one.. can anyone help me plzzzzz
you can read by using the datagridview.currentrow.cells[0] ,
datagridview.currentrow.cells[1].value , datagridview.currentrow.cells[2] .value ....

like wise u can read the values of all the columns in the datagridview...
Reputation Points: 10
Solved Threads: 2
Newbie Poster
tmani_85 is offline Offline
14 posts
since Feb 2009
Mar 4th, 2009
0

Re: select row in datagrid....need help

Click to Expand / Collapse  Quote originally posted by ramzan ...
i have a problem using datagrid in vb.net.

i want to bound it with database and want to change column length

please tell me about it
Use the datasource property of the datagridview to bind the database with the datagridview....

You can change the column length by

datagridview.columns(0).width = length

eg.

datagridview1.columns(0).width = 200

Likewise you can change the width of the datagridview....

You can also use the datagridview autoresizecolumns method to resize the columns automatically...

Thanks....
Reputation Points: 10
Solved Threads: 2
Newbie Poster
tmani_85 is offline Offline
14 posts
since Feb 2009
Mar 4th, 2009
0

Re: select row in datagrid....need help

Apr 17th, 2006 > this thread brings memory when I was doing my project

however, it is better to open new thread with title that describe your problem
Reputation Points: 37
Solved Threads: 17
Junior Poster
manal is offline Offline
122 posts
since Mar 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: How to edit parts of a line
Next Thread in VB.NET Forum Timeline: How to get the current user





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC