eramgarden Posted March 25, 2004 Posted March 25, 2004 I have a RadioButtonList and I want to display firstname and lastname next to each radio button... issue is firstname and lastname are seprate fields.. My workaround was this but wondering if there's another way of doing this .. This is the HTML: <asp:radiobuttonlist id="rblDisplayContacts" style="Z-INDEX: 101; LEFT: 404px; POSITION: absolute; TOP: 226px" runat="server" DataTextField="caller_firstname" DataValueField="callerid" Width="576px"></asp:radiobuttonlist> This is my SQL to BIND to DATTEXTFIELD: select callerid,firstname + ' ' + lastname + ' --- '+ com.cmp_a as 'caller_firstname' ... Any other way of doing this?? Quote
eramgarden Posted March 25, 2004 Author Posted March 25, 2004 But ItemDataBound is for DataGrid and I'm using radiobuttonlist... can it be used in RadioButtonList?? Quote
kahlua001 Posted March 25, 2004 Posted March 25, 2004 Oh sorry, thought I saw a datagrid somewhere. You can add a New ListItem to the radiobutton list via a loop. Quote
Arch4ngel Posted March 25, 2004 Posted March 25, 2004 Or you can simly create concatenate the 2 fields into your SP and add it as an additionnal field. Used this to overcome this kind of prob. Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.