You technically *could* get the selected list box item, but it wouldn't be
very easy. If you choose to try it, count on at least a few hours of work to
get it right
.
1. In the OnAfterChange event, load the XSL (i.e. view1.xsl) into a DOM.
2. Run an xpath on the XSL looking for the listbox. You'll need some
selection criteria. Best thing to use might be the xd:binding and the fact
that it will be an xhtml:select element.
3. Select all children nodes of the xhtml:select. These are the items in the
list.
4. Find the item whose value (not display name) is the same as the DOM's
value for the listbox's bound node.
5. (Trivial) determine the count of the item you found by looking at the
number of previous siblings.
One thing I did in the past (that was kinda fun) was to determine
programmatically which view had a validation error. I had to walk all .xsl
view files in the solution to determine which one mapped out to a specific
error. Lots of fun
--Hagen
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to
http://www.microsoft.com/info/cpyright.htm
Hagen,