471,326 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,326 software developers and data experts.

Formatting issue with PropertyInfo.GetValue

I am using Reflection to get values of some of the controls in a
datagrid. One of the control is a DropDownbox, but I cannot get to see
the EXCACT "selectedItem" property value using this.

It works, but the only thing is wont seem to keep the ACTUAL format.

For Ex: ViewSource has the value HTML like this
<option selected="selected" value="1.0">1.0</option>
So, I was expecting GetValue.ToString() to return EXCAT "1.0", but
unfortunately it return only "1" which is not what I want. Somehoe, its
converting anf formatting it as a integer.

If the HTML is like , <option selected="selected"
value="1.1">1.1</option>, GetValue.ToString() will give EXACT "1.1" as
desired.

If the HTML is like , <option selected="selected"
value="ALL">"ALL"</option>, GetValue.ToString() will give EXACT "ALL"
as desired.

The dropdown can contain either numeric (1.0 or 1.9 etc) or string
(ALL) data.

Anythoughts on how to get a "1.0" while that is the seelcted item ?

Dec 2 '05 #1
1 1637
Can someone help on this please.....

Dec 5 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Oskar Lundgren | last post: by
reply views Thread by Paul | last post: by
6 posts views Thread by ECathell | last post: by
reply views Thread by SyZLaB | last post: by
1 post views Thread by samueltilden | last post: by
1 post views Thread by damiensawyer | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.