PDA

View Full Version : [CLOSED] Highlight Checked Radio Button in Radio Button Group



rcombis
Aug 05, 2014, 10:39 PM
Hello-

I have a bunch of radio button groups for selecting some options.

I am trying to find out the easiest way to highlight the selected radio button for each group.

What is easiest way to do this?

I was thinking CSS, but need some help.

Thanks,
Rob

Daniil
Aug 06, 2014, 8:06 AM
Hi @rcombis,

CSS might OK if you are good with such highlighting.

Example

<%@ Page Language="C#" %>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Ext.NET v2 Example</title>

<style>
.my-group .x-form-cb-checked .x-form-radio {
background-color: red;
}
</style>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:RadioGroup runat="server" FieldLabel="Group 1" Cls="my-group">
<Items>
<ext:Radio runat="server" BoxLabel="Radio 1" />
<ext:Radio runat="server" BoxLabel="Radio 2" />
</Items>
</ext:RadioGroup>

<ext:RadioGroup runat="server" FieldLabel="Group 2" Cls="my-group">
<Items>
<ext:Radio runat="server" BoxLabel="Radio 1" />
<ext:Radio runat="server" BoxLabel="Radio 2" />
</Items>
</ext:RadioGroup>
</form>
</body>
</html>

rcombis
Aug 06, 2014, 8:26 PM
Thanks Daniil!

That worked great. I actually changed the CSS a bit to get the whole "cell" of the radio button


.my-group .x-form-cb-checked .x-form-cb-wrap {
background-color: yellow;
}


This was a big help to me.

Thanks again.
Rob