P
Paul W
Hi,
I have a datagrid that I build using data returned from a SP. But I
populate the datagrid using a dataview. In this dataview, I populate one of
the columns with a string that is basically an html link. The display text
is always numeric. For instance, the column will display 7, but the value
is something like "<a href='myData.aspx?id=" + reader["MyNumber"].ToString()
+ "'>" + reader["IMyNumber"].ToString() + "</a>";
The problem I am having is that I want to sort the column like it is
numeric. But it is sorting it like a string (which makes sense, but it is
not what I want). So if I have numbers like 1, 2, 3, 11....it will display
as 1, 11, 2, 3 for the sort. I want it to display 1, 2, 3, 11. Is this
even possible? If so, can someone guide me (or give me code) in the right
direction? Thanks
Paul
I have a datagrid that I build using data returned from a SP. But I
populate the datagrid using a dataview. In this dataview, I populate one of
the columns with a string that is basically an html link. The display text
is always numeric. For instance, the column will display 7, but the value
is something like "<a href='myData.aspx?id=" + reader["MyNumber"].ToString()
+ "'>" + reader["IMyNumber"].ToString() + "</a>";
The problem I am having is that I want to sort the column like it is
numeric. But it is sorting it like a string (which makes sense, but it is
not what I want). So if I have numbers like 1, 2, 3, 11....it will display
as 1, 11, 2, 3 for the sort. I want it to display 1, 2, 3, 11. Is this
even possible? If so, can someone guide me (or give me code) in the right
direction? Thanks
Paul