Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 86,257 VB.NET Programmers. There are 2,049 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a VB.NET Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

data grid with buttons

 
Reply to this topicStart new topic

data grid with buttons

RudyVB.net
post 8 May, 2008 - 09:53 AM
Post #1


New D.I.C Head

*
Joined: 3 May, 2008
Posts: 12



Hello all!

I have a data grid with buttons. Each button will have a diffrent value. So column ROOMS, would have a button 1, then below that a button 2, 3 and so on. Now my rooms do have an index field as well. How can I have it so when I click on button 2, that value "2" will show up, lets say in msgbox. Not using a msgbox, but if I can take a value to a msgbox, I can take it anywhere. So if I click on button marked 3, my message box will say "This is 3" 2 would be "this is 2"

I know it would be something like, msgbox("this is" + " " + datagrid1.row.index..... Or something like that.

Thanks for the help!!!

Rudy
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


fyrestorm
post 8 May, 2008 - 10:16 AM
Post #2


D.I.C Lover

Group Icon
Joined: 4 Apr, 2002
Posts: 3,078

are each of your buttons in a different datagrid row?

Because if so, you can do something like

CODE
DG.Rows(e.RowIndex).Cells(x).Value


where DG is the name of your DataGrid and in Cells(x) is, you need to put the column that the index is in.

Also, for string concatenation in VB.NET you need to be using the ampersand "&"

That should get you started.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

RudyVB.net
post 8 May, 2008 - 11:00 AM
Post #3


New D.I.C Head

*
Joined: 3 May, 2008
Posts: 12

QUOTE(fyrestorm @ 8 May, 2008 - 10:16 AM) *

are each of your buttons in a different datagrid row?

Because if so, you can do something like

CODE
DG.Rows(e.RowIndex).Cells(x).Value


where DG is the name of your DataGrid and in Cells(x) is, you need to put the column that the index is in.

Also, for string concatenation in VB.NET you need to be using the ampersand "&"

That should get you started.


Hi fyrestorm!
Yes, each of my buttons are in a datagrid row. I think this might get me going in the right direction. I'l let you know how it goes!

Thanks!

Rudy
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

RudyVB.net
post 8 May, 2008 - 11:10 AM
Post #4


New D.I.C Head

*
Joined: 3 May, 2008
Posts: 12

Perfect!!

Thanks mate!!!

Rudy
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/16/08 09:43AM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month