ASP.NET 1.0 and 1.1 BasicsASP.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
If you make it a command button, then the event argument is of type DataGridCommandEventArgs. One of the properties is the data grid item that was selected, so you could track down the ID of the datagrid by:
e.item.cells(<id index>).text
If the ID is in a template column control, you do:
Are you referring to determining the button on the client side? What do you intend to do with this information in the client side script? (Your answer may determine our answer(s)).
I have either a bound datagrid or a table that has
repeated fields. This displays a few columns of short
text data. Howver one column, on the end, needs to display
a large text field (like an additional notes field).
I dont want to let it display automatically because it
sizes the whole height of each row really big just to
accomodate the one text field. I thought I could put a command
button in this 'memo' column so that if the reader wishes to
view the additional notes - they can simply click on
the button - the memo text then being popped up and
display in a alert dialog. I would like to make this
a client side event as I thought it would be 'slicker' than
pulling down a whole new page from the server just to
display a pop up?
I can do the client-side button pop up. The last step is
to somehow get the right text into it. I could hold the memo
text in an invisible field within my table. Then if I know
which button fired - I can then pick up the right row's
memo field.
My lack of knowledge is how to pick up table data client-side.
I dont want to keep pestering on about this and appreciate
all your help. Can anyone point to some code examples
that might do anything like the above?