dragoon
Posts: 173
|
| Posted: 01/30/2006, 3:25 PM |
|
I just finished an editable grid with users. A lot of them.
I needed to filter them based on the first letter of their names.
In the grid, on top of the sorters, I have added a new row:
<tr class="Caption">
<th colspan="11" style="padding:0 0 0 0">
<table cellpadding="0" cellspacing="0" border="0">
<tr>{Alphabet}</tr>
</table>
</th>
</tr>
BeforeShow event of the label:
usersAlphabet.Text = String.Empty;
for (int i = 65; i <= 90; i++)
usersAlphabet.Text = usersAlphabet.Text + "<th><a href=\"?letter=" + Convert.ToChar(i) + "\">" + Convert.ToChar(i) + "</a></th>";
usersAlphabet.Text = usersAlphabet.Text + "<th><a href=\"AdminUsers.aspx\">All</a></th>";
For VB.NET instead Convert.ToChar use Chr, replace\" with "", eliminate colons, use for i=65 to 90 and don't forget next before the line with 'All'
|