Solved

Need to convert boolean value into radiobutton in gridview

Posted on 2008-10-28
5
495 Views
Last Modified: 2012-05-05
I have gridview. My gridview is bound to List<t> where T is my business object. My t contains a boolean property. I need to bound my gridview to this boolean property with radio button.

How can i do that.

Thanks,
0
Comment
Question by:dj_user4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22821139
have a look at this
the following sample show hwo to show radio buttons in the grid view
http://www.codeproject.com/KB/webforms/GridViewRadiobuttons.aspx
0
 

Author Comment

by:dj_user4
ID: 22821158
i already saw this article. Problem is
<input type="radio" name="radNormalCompany" value='<%# Eval("isNotGeneralNewsCompany")%>' />

this property is populated with default value true but then also, my radio button comes as not selected.
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22821198
try using asp:radiobutton instead of input type
<asp:RadioButton ID="radNormalCompany" runat="server" Checked='<%# Eval("isNotGeneralNewsCompany")%>'/>
0
 

Author Comment

by:dj_user4
ID: 22821267
Hmm. asp:radiobutton works.

Now i need to group my radiobutton per row. I have two radio button column in my gridview.
0
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 500 total points
ID: 22821329
you will have to figure it out urself as i have never worked with the radiobuttonlist in a gridview sorry
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question