select row in datagrid....need help

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Mar 2006
Posts: 121
Reputation: manal is an unknown quantity at this point 
Solved Threads: 17
manal's Avatar
manal manal is offline Offline
Junior Poster

select row in datagrid....need help

 
0
  #1
Apr 17th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5
Reputation: Ammar Gaffar is an unknown quantity at this point 
Solved Threads: 1
Ammar Gaffar Ammar Gaffar is offline Offline
Newbie Poster

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

 
0
  #2
Apr 19th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 233
Reputation: Lord Soth is an unknown quantity at this point 
Solved Threads: 4
Lord Soth's Avatar
Lord Soth Lord Soth is offline Offline
Posting Whiz in Training

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

 
0
  #3
Apr 19th, 2006
Hi,

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

Loren Soth
Best regards,
Loren Soth

Crimson K. Software _________________________________________________________________ Crimson K. Blog
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 1
Reputation: ramzan is an unknown quantity at this point 
Solved Threads: 1
ramzan ramzan is offline Offline
Newbie Poster

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

 
0
  #4
Jan 6th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 1
Reputation: suryarajin is an unknown quantity at this point 
Solved Threads: 1
suryarajin suryarajin is offline Offline
Newbie Poster

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

 
0
  #5
Mar 4th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 13
Reputation: tmani_85 is an unknown quantity at this point 
Solved Threads: 2
tmani_85 tmani_85 is offline Offline
Newbie Poster

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

 
0
  #6
Mar 4th, 2009
Originally Posted by suryarajin View Post
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...
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 13
Reputation: tmani_85 is an unknown quantity at this point 
Solved Threads: 2
tmani_85 tmani_85 is offline Offline
Newbie Poster

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

 
0
  #7
Mar 4th, 2009
Originally Posted by ramzan View Post
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....
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 121
Reputation: manal is an unknown quantity at this point 
Solved Threads: 17
manal's Avatar
manal manal is offline Offline
Junior Poster

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

 
0
  #8
Mar 4th, 2009
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
"give only what u willing to receive "
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC