Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid label events

Status
Not open for further replies.

TomTT

Programmer
Jun 3, 2002
55
US
I have worked on this for a few days but just can't find a good approach.

I have a datagrid with a template item label. I want to be able to click on the label and open a new window that would show some detail regarding the selected record.

I though about using a click event, but that is client side and I need to access some server side controls.

What I think I need is a way to access a server side sub on the click event, then gather the needed control information and include it in a querystring when doing a response.redirect to the new page.

I've sort of gotten lost in thinking about this and would appreciate any suggested approaches that might work.

Thanks
Tom T
 
You'll probably be better off using LinkButtons instead of labels and using the OnItemCommand event of a data grid.
 
Thanks for the suggestion.

I had thought about link buttons, but hadn't actually tried it. I did try setting different datagrid columns visible property to true or false to get a custom view of the data (order information, address information, billing information) depending on what the user was doing at the moment. This appears to work well and is a clean look.

The only trick was on editing and updating. If a column is not visible, you can't grab the value of it's textbox (it is nothing).

Thanks again
TT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top