Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hello,



                                    I want to translate the popup menu from GridControl, TextEdit,... But my problem is I have not found the localizables from Copy, Cut & Paste. Where I can find them?



                                    ------ EDITED ------


                                    Another localizable I want to translate is the validate tooltip from grid "Input string was not in a correct format".

                                    ----------------------


                                    Thanks

                                Popup.jpg
                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                Hi Cristian,

                                Thank you for your inquiry.

                                In fact, our editors use the standard TextBox control to show data. Thus, this context menu is a standard context menu of the TextBox control. You can translate it using general .NET facilities as shown in the following threads:
                                - .NET Framework Developer Center;
                                - Textbox ContextMenu localization.

                                As for the second issue, this error is created by the .Net Framework. Thus, the exception text cannot be localized at our control level. However, you can customize an editor's template by overriding the BaseEdit.ErrorToolTipContentTemplate data template.

                                If you have additional questions, feel free to reactivate this thread.

                                Thanks

                                Show all comments
                                • Cristian Sánchez 09.07.2012

                                  Hi Ivan,

                                  There is any solution to disable the context menu?

                                • Cristian Sánchez 09.07.2012

                                  I have found the kind to disable this control. For each control I put the context menu visibility to Hidden, and its work for me, but on dataGrid control I don't know how to hidden this. Any solution?

                                • Hi Cristian,

                                  Please define an implicit style for the TextEdit control within the grid's Resources section as follows:

                                  <dxg:GridControl.Resources>
                                      <Style TargetType="dxe:TextEdit">
                                          <Setter Property="ContextMenu">
                                              <Setter.Value>
                                                  <ContextMenu Visibility="Collapsed"/>
                                              </Setter.Value>
                                          </Setter>
                                      </Style> 
                                  </dxg:GridControl.Resources>
                                  

                                  If editors of different types are used in your grid, you can add several different implicit styles or handle a TableView's ShownEditor event as follows:

                                  private void view_ShownEditor(object sender, DevExpress.Xpf.Grid.EditorEventArgs e) {
                                      ((BaseEdit)e.Editor).ContextMenu = new ContextMenu() { Visibility = Collapsed };
                                  }
                                  
                                • Cristian Sánchez 09.10.2012

                                  Hi Dmitry,

                                  I create the following class to appliy your solution, but this is not working for me.

                                  public class SITecTableViewDE : TableView
                                      {
                                          public SITecTableViewDE()
                                          {
                                          }
                                          protected override void OnShowEditor(CellEditorBase editor)
                                          {
                                              base.OnShowEditor(editor);

                                              editor.ContextMenu = new System.Windows.Controls.ContextMenu();
                                              editor.ContextMenu.Visibility = System.Windows.Visibility.Collapsed;
                                          }
                                      }

                                • Thank you for your response and providing the sample code.

                                  The problem is that the editor is not yet completely initialized when the OnShowEditor method is called. It is better to override the RaiseShownEditor method for this purpose. Change the code as follows:

                                  	public class MyTableView: TableView
                                  	{
                                  		protected override void RaiseShownEditor(EditorEventArgs e)
                                  		{
                                  			base.RaiseShownEditor(e);
                                  			BaseEdit editor = e.Editor as BaseEdit;
                                  			editor.ContextMenu = new ContextMenu();
                                  			editor.ContextMenu.Visibility = System.Windows.Visibility.Collapsed;
                                  		}
                                  	}
                                  

                                  This should fix the problem.

                                • Cristian Sánchez 09.12.2012

                                  Thanks, it's working fine.

                                • You are welcome!

                                You must  log in  or  register  to leave comments
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Your Privacy - Legal Statements

                                Copyright © 1998-2013 Developer Express Inc.
                                ALL RIGHTS RESERVED
                                All trademarks or registered trademarks
                                are property of their respective owners