This is a migrated thread and some comments may be shown as answers.

How to select resource header value and de-select others

1 Answer 98 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jay Dutta
Top achievements
Rank 1
Jay Dutta asked on 26 Jan 2012, 11:10 PM
Hello! i have a rad-scheduler with resource header. I have checkbox with the resource header to allow me to identify the resource that has been selected. But when there is a resource selected (checkbox is checked) and i go ahead and select another one i would like to auto un-check the initial selection. I am unable to do so - suffering from brain freeze.

Here is my code for the resource selector and the on-check code

<

ResourceHeaderTemplate>

 

<asp:CheckBox runat="server" ID="ResourceCheckBox" Text='<%# Eval("Text") %>' OnCheckedChanged="ResourceCheckBox_CheckChanged" AutoPostBack="true" />

 </ResourceHeaderTemplate>
 

Protected Sub ResourceCheckBox_CheckChanged(ByVal sender As Object, ByVal e As EventArgs)

    Dim bindingContainer As Control = (DirectCast(sender, Control)).BindingContainer

    Dim dataItemContainer As IDataItemContainer = DirectCast(bindingContainer, IDataItemContainer)

    Dim resource As Resource = TryCast(dataItemContainer.DataItem, Resource)

End Sub

thanks,
Jay

 

1 Answer, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 01 Feb 2012, 05:04 AM
Hi Jay,

By using the asp:CheckBox is nearly impossible to achieve a scenario like that. You could, however, use Telerik RadButton control with its UniqueGroupName overridden and ToggleType set to Radio.
You could download the attached sample project and give it a try locally.

I hope it will help.

Regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Scheduler
Asked by
Jay Dutta
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Share this question
or