Context Menu on datagrid.

  • Thread starter Luis Esteban Valencia
  • Start date
L

Luis Esteban Valencia

I need to make a right click menu on a datagrid, because each row of the
datagrid has many options. Its very easy to use button columns but its not
beatiful for the user because it would be like 8 buttons. so the best way I
think is to make a contextual menu with 8 different options for each row.
Each option of the contextual menu will show me details on another page for
example.

Thanks
 
A

Alvin Bruney [MVP]

for each cell that you need a menu, build out the menu in javascript and
insert it into the datagrid cell in the itemdatabound event handler. it
would be the same idea as inserting a messagebox or a control in a datagrid
cell, except that it would be javascript responding to a mouseover event
 
L

Luis Esteban Valencia

Please show me the code. I am not MVP :). Each item of the menu must be
executed on the server.

Alvin Bruney said:
for each cell that you need a menu, build out the menu in javascript and
insert it into the datagrid cell in the itemdatabound event handler. it
would be the same idea as inserting a messagebox or a control in a datagrid
cell, except that it would be javascript responding to a mouseover event

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Luis Esteban Valencia said:
I need to make a right click menu on a datagrid, because each row of the
datagrid has many options. Its very easy to use button columns but its not
beatiful for the user because it would be like 8 buttons. so the best way
I
think is to make a contextual menu with 8 different options for each row.
Each option of the contextual menu will show me details on another page
for
example.

Thanks
 
A

Alvin Bruney [MVP]

use this as a starting point in the itemdatabound event handler
e.Item.Cells[1].Attributes.Add("onmouseout","Menu();");

Menu() is your clientside javascript function which you will need to build
to show a menu


--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Luis Esteban Valencia said:
Please show me the code. I am not MVP :). Each item of the menu must be
executed on the server.

"Alvin Bruney [MVP]" <vapor at steaming post office> escribió en el
mensaje
for each cell that you need a menu, build out the menu in javascript and
insert it into the datagrid cell in the itemdatabound event handler. it
would be the same idea as inserting a messagebox or a control in a datagrid
cell, except that it would be javascript responding to a mouseover event

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Luis Esteban Valencia said:
I need to make a right click menu on a datagrid, because each row of the
datagrid has many options. Its very easy to use button columns but its not
beatiful for the user because it would be like 8 buttons. so the best way
I
think is to make a contextual menu with 8 different options for each row.
Each option of the contextual menu will show me details on another page
for
example.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top