Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2005, 03:53 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid Column Indexing

I have a datagrid that lists a calculated field by office by type. All I need is the office value in the row and the column header when a cell is clicked.

For ex.

Office SickLv LWOP Vacation Other
Ada 0 2 8 6
Durant 1 0 2 5

If I click on the number 8 in the Vacation column for Ada I need the value Vacataion and Ada returned. I don't understand the indexing of a datagrid...Any help would be great....

 
Old May 24th, 2005, 11:08 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

You can make the columns template columns and add a link button. You can pass the value in the CommandArgument of the OnCommand event of the link button.

Regards
Ganesh
 
Old May 25th, 2005, 03:53 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I may not be getting what you are telling me but I don't need the value of the selected cell just the reference it has to the row and column so that I can get the column header text and row header text. I am new to programming in vb.net some of this is a little confusing.

 
Old May 25th, 2005, 11:10 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

you can put a link button in the column and pass those values as commandArgument or the CommandName. These values can then be retrieved from the OnCommand Event.

Please refer MSDN for TemplateColumn

Regards
Ganesh
 
Old May 26th, 2005, 07:48 AM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I created a template comlumn with a link button and will refer to MSDN. Thanks for the help:)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting column name/header of a datagrid elygp ASP.NET 1.0 and 1.1 Professional 2 June 6th, 2007 01:07 PM
editable datagrid column sarah lee ASP.NET 1.0 and 1.1 Basics 3 September 7th, 2006 02:45 PM
Datagrid column values krishnasamaga C# 2005 1 August 8th, 2006 06:54 AM
Add a Column to a DataGrid infernokodiak C# 7 January 18th, 2006 04:06 PM
Find column in datagrid Lesviper VB How-To 0 March 9th, 2005 07:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.