Hi,
I've added a RadComboBox in the FilterTemplate of a RadGrid.
This RadCombobox is bound to a <asp:SqlDataSource ID="dbNationalities" runat="server" />.
Everything works fine but I want to translate the items of the RadCombobox.
I'm using OnItemCreated:
But this doesn't work. Can I change the text of the items if this is bind to a datasource?
Thanks!
I've added a RadComboBox in the FilterTemplate of a RadGrid.
<FilterTemplate> | |
<telerik:RadComboBox | |
ID="filterNationalities" | |
DataSourceID="dbNationalities" | |
DataValueField="ID" | |
DataTextField="description" | |
AutoPostBack="false" | |
runat="server" | |
AppendDataBoundItems="true" | |
SelectedValue='<%#((GridItem)Container).OwnerTableView.GetColumn("NationalityID").CurrentFilterValue %>' | |
OnClientSelectedIndexChanged="FilterByNationality" | |
OnItemCreated="TranslateNationalities" | |
Width="75" | |
ZIndex="10000000"> | |
<Items> | |
<telerik:RadComboBoxItem /> | |
</Items> | |
</telerik:RadComboBox> | |
|
|
<telerik:RadScriptBlock ID="scriptFilterNationality" runat="server"> | |
<script type="text/javascript"> | |
function FilterByNationality(sender, args) { | |
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); | |
tableView.filter("NationalityID", args.get_item().get_value(), "EqualTo"); | |
} | |
</script> | |
</telerik:RadScriptBlock> | |
</FilterTemplate> | |
This RadCombobox is bound to a <asp:SqlDataSource ID="dbNationalities" runat="server" />.
Everything works fine but I want to translate the items of the RadCombobox.
I'm using OnItemCreated:
protected void TranslateNationalities( object sender, RadComboBoxItemEventArgs e ) { |
RadComboBoxItem dataItem = e.Item; |
dataItem.Text = "translate text"; |
} |
But this doesn't work. Can I change the text of the items if this is bind to a datasource?
Thanks!