By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,835 Members | 1,959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,835 IT Pros & Developers. It's quick & easy.

Filter gridview by a Alphabet repeater

P: n/a
Hi, all:

I implemented an alphabet list so that when user click letter A then I
will re-bind a gridview control using SQL stored procedure. It works
fine. The problem is I populate my alphabet repeater by select the ini
of name from database. So that my alphabet does not have 26 letters, my
customer does not like it since it may spell something bad. Now I am
trying to display 26 letters, letters that exist in my database will be
linkbutton, others are just label only (so that user can not click on
it).

I am think using a helper function to decide it is linkbutton or label,
for example

<%if(myHelperFunc(Eval("letter")){%>
<asp:linkbutton />
<%}else{%>
<asp:label />
<%}%>

But I believe there are some better ways to do this, like dynamic
create linkbutton or label on the repeater create event, only I do not
know how.

Also, I would like to add # to include all those name that starts with
number, is there a way in SQL that I can group numbers, or I have to do
in my c# code?

Thanks
-rockdale

Dec 28 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.