Hello,
You can use the following workaround:
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
public RadForm1()
{
RadGridLocalizationProvider.CurrentProvider = new MyRadGridLocalizationProvider();
InitializeComponent();
this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
this.radGridView1.EnableFiltering = true;
this.radGridView1.MasterTemplate.ShowFilteringRow = true;
this.radGridView1.FilterExpressionChanged += this.RadGridView1_FilterExpressionChanged;
this.radGridView1.ContextMenuOpening += this.RadGridView1_ContextMenuOpening;
}
private void RadGridView1_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
if (e.ContextMenu.Items[0] is RadFilterOperationMenuItem)
{
foreach (RadMenuItemBase menuItem in e.ContextMenu.Items)
{
if (string.Equals("Starts with", menuItem.Text))
{
menuItem.Text = "Does not starts with";
}
}
}
}
private void RadGridView1_FilterExpressionChanged(object sender, FilterExpressionChangedEventArgs e)
{
var ex = e.FilterExpression;
if (ex.Contains("LIKE") && ex.Contains("%"))
{
this.radGridView1.FilterExpressionChanged -= this.RadGridView1_FilterExpressionChanged;
e.FilterExpression = ex.Replace("LIKE", "NOT LIKE");
this.radGridView1.FilterExpressionChanged += this.RadGridView1_FilterExpressionChanged;
}
}
private void RadForm1_Load(object sender, EventArgs e)
{
this.customersTableAdapter.Fill(this.nwindDataSet.Customers);
}
}
public class MyRadGridLocalizationProvider : RadGridLocalizationProvider
{
public override string GetLocalizedString(string id)
{
switch (id)
{
case RadGridStringId.FilterOperatorStartsWith:
return "Does not starts with";
default:
return base.GetLocalizedString(id);
}
}
}
Regards,
Nadya
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Hello Chuck,
Thank you for the provided information. I found this a reasonable case and I approved it as a feature request. You can track its progress, subscribe for status changes on the following feedback item. Note, that you can add your vote for it in order to increase its priority. The more votes an item gathers the higher its priority becomes.
As a reward, I updated your Telerik Points.
Do not hesitate to contact us if you have any other questions or concerns.
Regards,
Nadya
Progress Telerik