CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Alphabetic filtering in .NET

Print topic Send  topic

Author Message
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'
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.