Hello,
I'm having quite an annoying problem with Radcombobox.
Here's the scenario, very simple:
ASPX
Code Behind
I've already tried everything but I can't still get the SelectedIndexChanges event to fire when I select the first item.
Of course the problem is that the SelectedIndex at the begin is set to 0, that's the first item, but how can I change this behaviour.
Or still better, how can I get the above example to work..?
Thank you
Regards,
Paolo
I'm having quite an annoying problem with Radcombobox.
Here's the scenario, very simple:
ASPX
| <telerik:RadComboBox ID="RadComboBox1" runat="server" Width="300px" Skin="Web20" |
| EmptyMessage="Choose layout..." AutoPostBack="true" HighlightTemplatedItems="True" |
| OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged" |
| AllowCustomText="true" > |
| <ItemTemplate> |
| <img src='<%# DataBinder.Eval(Container, "Attributes['ImagePath']") %>' alt=""/> |
| </ItemTemplate> |
| <Items> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout1.png" Value="Layout1"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout2.png" Value="Layout2"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout3.png" Value="Layout3"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout4.png" Value="Layout4"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout5.png" Value="Layout5"></telerik:RadComboBoxItem> |
| <telerik:RadComboBoxItem ImagePath="../Grafica/Layout6.png" Value="Layout6"></telerik:RadComboBoxItem> |
| </Items> |
| </telerik:RadComboBox> |
Code Behind
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!Page.IsPostBack) |
| { |
| for (int i = 0; i < RadComboBox1.Items.Count; i++) |
| { |
| RadComboBox1.Items[i].DataBind(); |
| } |
| } |
| } |
| protected void RadComboBox1_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) |
| { |
| string strSelectedValue = RadComboBox1.SelectedValue; |
| // other stuff |
| } |
I've already tried everything but I can't still get the SelectedIndexChanges event to fire when I select the first item.
Of course the problem is that the SelectedIndex at the begin is set to 0, that's the first item, but how can I change this behaviour.
Or still better, how can I get the above example to work..?
Thank you
Regards,
Paolo