3 Replies - 1133 Views - Last Post: 08 May 2008 - 11:10 AM Rate Topic: -----

#1 RudyVB.net  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 64
  • Joined: 03-May 08

data grid with buttons

Post icon  Posted 08 May 2008 - 09:53 AM

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

Is This A Good Question/Topic? 0
  • +

Replies To: data grid with buttons

#2 fyrestorm  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 10
  • View blog
  • Posts: 3,113
  • Joined: 04-April 02

Re: data grid with buttons

Posted 08 May 2008 - 10:16 AM

are each of your buttons in a different datagrid row?

Because if so, you can do something like

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.
Was This Post Helpful? 0
  • +
  • -

#3 RudyVB.net  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 64
  • Joined: 03-May 08

Re: data grid with buttons

Posted 08 May 2008 - 11:00 AM

View Postfyrestorm, on 8 May, 2008 - 10:16 AM, said:

are each of your buttons in a different datagrid row?

Because if so, you can do something like

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
Was This Post Helpful? 0
  • +
  • -

#4 RudyVB.net  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 64
  • Joined: 03-May 08

Re: data grid with buttons

Posted 08 May 2008 - 11:10 AM

Perfect!!

Thanks mate!!!

Rudy
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1