Hi
i am new to telerik controls but enjoying working on these controls.
during the development i stuck at a point, where i need to set default dropdown values in edit form. Here is the sample code
I have added Priority attribute in custom names collection like : CustomAttributeNames="Priority"
Whenever i write
it gives me "True" string but when i convert it to Boolean value It always give me false. please help me to sort out this problem.
Regards
Manmeet Singh
i am new to telerik controls but enjoying working on these controls.
during the development i stuck at a point, where i need to set default dropdown values in edit form. Here is the sample code
<label for='<%= PriorityDropDown.ClientID %>'> Priority:</label><%-- Leaving a newline here will affect the layout, so we use a comment instead. --%> <telerik:RadComboBox runat="server" ID="PriorityDropDown" Skin='<%# Owner.Skin %>' Width="100px" AutoPostBack="true"> <Items> <telerik:RadComboBoxItem Text="Low" Value="Low" Selected='<%# Convert.ToBoolean((Convert.ToString(Eval("Priority")) == "Low")) %> ' /> <telerik:RadComboBoxItem Text="Medium" Value="Medium" Selected='<%# Convert.ToBoolean((Convert.ToString(Eval("Priority")) == "Medium")) %> ' /> <telerik:RadComboBoxItem Text="High" Value="High" Selected='<%# Convert.ToBoolean((Convert.ToString(Eval("Priority")) == "High")) %> ' /> </Items> </telerik:RadComboBox>I have added Priority attribute in custom names collection like : CustomAttributeNames="Priority"
Whenever i write
<%(Convert.ToString(Eval("Priority")) == "Low") %>it gives me "True" string but when i convert it to Boolean value It always give me false. please help me to sort out this problem.
Regards
Manmeet Singh