This is a migrated thread and some comments may be shown as answers.
Not able to find Radbutton from codebehind using c#
1 Answer 13 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
PRITESH
Top achievements
Rank 1
PRITESH asked on 15 Nov 2014, 05:47 AM
Hello, Everyone

aspx code

  <telerik:RadButton ID="rdlTypeoffilter_1" runat="server" ToggleType="Radio" ButtonType="StandardButton"  Width="340px"
            GroupName="rdlTypeoffilter" AutoPostBack="false" Skin="MetroTouch" Checked="true">
            <ToggleStates>
                <telerik:RadButtonToggleState Selected="true" Text="All" Value="1" PrimaryIconCssClass="rbToggleRadioChecked">
                </telerik:RadButtonToggleState>
                <telerik:RadButtonToggleState Text="All" Value="0" PrimaryIconCssClass="rbToggleRadio">
                </telerik:RadButtonToggleState>
            </ToggleStates>
        </telerik:RadButton>
        <br />
        <telerik:RadButton ID="rdlTypeoffilter_2" runat="server" ToggleType="Radio" ButtonType="StandardButton"  Width="340px"
            GroupName="rdlTypeoffilter" AutoPostBack="false" Skin="MetroTouch">
            <ToggleStates>
                <telerik:RadButtonToggleState Text="Districtwise" Value="2"
                    PrimaryIconCssClass="rbToggleRadioChecked"></telerik:RadButtonToggleState>
                <telerik:RadButtonToggleState Text="Districtwise" Value="0"
                    PrimaryIconCssClass="rbToggleRadio"></telerik:RadButtonToggleState>
            </ToggleStates>
        </telerik:RadButton>

           <br />
        <telerik:RadButton ID="rdlTypeoffilter_3" runat="server" ToggleType="Radio" ButtonType="StandardButton"  Width="340px"
            GroupName="rdlTypeoffilter" AutoPostBack="false" Skin="MetroTouch">
            <ToggleStates>
                <telerik:RadButtonToggleState Text="Zonewise" Value="3"
                    PrimaryIconCssClass="rbToggleRadioChecked"></telerik:RadButtonToggleState>
                <telerik:RadButtonToggleState Text="Zonewise" Value="0"
                    PrimaryIconCssClass="rbToggleRadio"></telerik:RadButtonToggleState>
            </ToggleStates>
        </telerik:RadButton>



c# code


 string typeofdashboardval = "";
         
                for (int i = 0; i <= 3; i++)
                {               
                    typeofdashboardval = ((RadButton)Page.FindControl("rdltypeofdashboard_" + i.ToString())).SelectedToggleState.Value;
                }

Please help

Thanks and Regards,

Pritesh

1 Answer, 1 is accepted

Sort by
0
PRITESH
Top achievements
Rank 1
answered on 15 Nov 2014, 08:14 AM
I found the solution.

everything works fine.

Thanks

Pritesh
Tags
General Discussions
Asked by
PRITESH
Top achievements
Rank 1
Answers by
PRITESH
Top achievements
Rank 1
Share this question
or