8 Answers, 1 is accepted
0
Hello Markus,
Indeed, in such a situation the control will not be visible, since it is nested in another control. You will need to dynamically get a reference to it and assign the event handler as needed.
Greetings,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Indeed, in such a situation the control will not be visible, since it is nested in another control. You will need to dynamically get a reference to it and assign the event handler as needed.
Greetings,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 08 Jan 2008, 12:08 PM
Thanks for Information, but how can I do that? Is there an example available?
0
Hi Markus,
Basically, if the combo is nested in a template of the grid, you can directly add the event handler. This is demonstrated in the code sample below:
.aspx
Dynamically assigning the handler may be something like this:
.cs
Since you mentioned, however, that you will need to use the ItemsRequested event handler, please keep in mind that if RadComboBox is not initially visible on your ASPX page, you may need to use streamers (the ExternallCallBackPage property) For additional information on this aspect, please, read our online documentation on this problem for details
http://www.telerik.com/help/radcombobox/v2%5FNET2/combo_externalcallbackpage.html
I hope this information helps.
Regards,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Basically, if the combo is nested in a template of the grid, you can directly add the event handler. This is demonstrated in the code sample below:
.aspx
<EditItemTemplate> |
<rad:RadComboBox AutoPostBack="true" |
ID="RadComboBox1" runat="server" |
DataSourceID="AccessDataSource1" DataTextField="ProductName" |
DataValueField="ProductName" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"> |
</rad:RadComboBox> |
</EditItemTemplate> |
Dynamically assigning the handler may be something like this:
.cs
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridDataItem && e.Item.IsInEditMode) |
{ |
GridDataItem dataItem = (GridDataItem)e.Item; |
RadComboBox combo = (RadComboBox)(dataItem["ProductName"].FindControl("RadComboBox1")); |
combo.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(RadComboBox1_ItemsRequested); |
} |
} |
Since you mentioned, however, that you will need to use the ItemsRequested event handler, please keep in mind that if RadComboBox is not initially visible on your ASPX page, you may need to use streamers (the ExternallCallBackPage property) For additional information on this aspect, please, read our online documentation on this problem for details
http://www.telerik.com/help/radcombobox/v2%5FNET2/combo_externalcallbackpage.html
I hope this information helps.
Regards,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 10 Jan 2008, 08:49 AM
On the page you mention for "ExternallCallBackPage " is a link to a demo available but on this demo (Combo with Grid) the ExternallCallBackPage -Property is not used. Is there an example somewhere available?
0
Hi Markus,
I believe you will find the following example useful. I hope this information helps.
All the best,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I believe you will find the following example useful. I hope this information helps.
All the best,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 14 Jan 2008, 01:36 PM
Thanks for inforamtion but the example uses the normal ASP.NET controls. I use the prometheus controls and in the combobox I can't find an ExternallCallBackPage-property. I need the "TextChanged" property also to be fired and also for radTextBox (Prometheus) and radDateTimePicker (Prometheus) in a EditFormTemplate. As far as I can see, this currently not supported neither for radCombbox not for other controls. Am I correct?
0
Hi Markus,
The TextChanged event is avaiable for the radTextBox (Prometheus) and radDateTimePicker (Prometheus). This however is a server side event and it will only be fired on a postback. You can also take a dvantage of the client side API of the controls, and for example use the onvaluechanged event handler, as in the code snippet below:
.aspx
As for RadComboBox - the ExternalCallBackPage property has been removed from the Prometheus version. You can use a WebService to populate the combobox. An example can be seen at:
Populate from WebService
Also, RadComboBox Prometheus provides a TextChanged event. For more details, please check the following article:
TextChanged event
Regards,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The TextChanged event is avaiable for the radTextBox (Prometheus) and radDateTimePicker (Prometheus). This however is a server side event and it will only be fired on a postback. You can also take a dvantage of the client side API of the controls, and for example use the onvaluechanged event handler, as in the code snippet below:
.aspx
<telerik:RadTextBox ID="RadTextBox1" runat="server"> |
<ClientEvents OnValueChanged="ValueChanged" /> |
</telerik:RadTextBox> |
As for RadComboBox - the ExternalCallBackPage property has been removed from the Prometheus version. You can use a WebService to populate the combobox. An example can be seen at:
Populate from WebService
Also, RadComboBox Prometheus provides a TextChanged event. For more details, please check the following article:
TextChanged event
Regards,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 17 Jan 2008, 12:38 PM
Thanks for information, but I will not use the feature it's to complicate for implementation. I use third pary controls to make my live easier and and not to make it more difficult.