If a user sees a grid that looks like Excel, they expect it to function the same as Excel. I'm not very familiar with Telerik grids, but the OOTB copy/paste functionality doesnt seem to work the identical to Excel.
Our users need to be able to select a single cell and paste a single cell. This seems to work.
They also need to be able to select a single cell and paste its value in many cells. This only seems to paste the value in the last selected cell, not all selected cells.
Before:
After
Select multiple continuous cells from a row and paste to a single cell, and have all copied cells pasted starting at the selected paste location. This seems to work
Select multiple continuous cells from a row and paste to a selection of continuous rows and have all copied cells pasted. This seems to only work on the last row
Before
After
Here are my current grid settings:
DataRadGrid.AllowAddNewRow = false;
DataRadGrid.AllowColumnChooser = false;
DataRadGrid.AllowColumnReorder = false;
DataRadGrid.AllowDeleteRow = false;
DataRadGrid.AllowEditRow = true;
DataRadGrid.AllowMultiColumnSorting = true;
DataRadGrid.AllowRowReorder = false;
DataRadGrid.AllowRowResize = false;
DataRadGrid.BeginEditMode = RadGridViewBeginEditMode.BeginEditOnKeystroke;
DataRadGrid.EnableAlternatingRowColor = true;
DataRadGrid.EnableCustomDrawing = true;
DataRadGrid.EnableFiltering = true;
DataRadGrid.EnableGrouping = false;
DataRadGrid.EnableHotTracking = false;
DataRadGrid.HorizontalScrollState = ScrollState.AlwaysShow;
DataRadGrid.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None;
DataRadGrid.MasterTemplate.ShowFilteringRow = false;
DataRadGrid.MasterTemplate.ShowHeaderCellButtons = true;
DataRadGrid.MasterView.TableSearchRow.ShowClearButton = true;
DataRadGrid.MultiSelect = true;
DataRadGrid.SelectionMode = GridViewSelectionMode.CellSelect;
DataRadGrid.ShowColumnHeaders = true;
DataRadGrid.VerticalScrollState = ScrollState.AlwaysShow;
DataRadGrid.EnterKeyMode = RadGridViewEnterKeyMode.EnterMovesToNextRow;Are there settings I can use to mimic Excel, if not, is there boilerplate code to achieve this?
Thanks,
matt


Hi,
Using SaveFileDialog (not RadSaveFileDialog) in Telerik apps is broken.
I'm using the [STAThread] attribute on my Program.cs.
When running my app in Debug mode , I get the following exception when ShowDialog is called :
à System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner)
   à System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)
   à NDC.WinUI.Helpers.WinDbFileHelper.<ExportDB>d__4.MoveNext()
When trying the same in Release mode, my app simply freezes and does nothing.
Here is my code :
public static async Task<bool> ExportDB(string dbPath)
{
    try
    {
        if(File.Exists(dbPath))
        {
            List<DriveInfo> usbDrives = DriveInfo.GetDrives().Where(drive => drive.DriveType == DriveType.Removable && drive.IsReady).ToList();
            using(SaveFileDialog sfd = new SaveFileDialog()
            {
                DefaultExt = NdcConstants.SqLiteExtension.ExtensionFilter,
                InitialDirectory = usbDrives.Count != 0 ? usbDrives[0].RootDirectory.FullName : Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
                Filter = NdcConstants.SqLiteExtension.FriendlyName,
                FileName = Path.GetFileName(dbPath),
                RestoreDirectory = true
            })
            {
                if(sfd.ShowDialog() == DialogResult.OK)
                {
                    if(File.Exists(sfd.FileName))
                    {
                        File.Delete(sfd.FileName);
                    }
                    await SqlFileBackup.ProcessOnlineBackup(dbPath, sfd.FileName);
                    return true;
                }
            }
        }
        return false;
    }
    catch(Exception ex)
    {
        Interaction.Error(ex);
        return false;
    }
}Which is call like this : await WinDbFileHelper.ExportDB(settings.LocalDatabaseFullPath)
Base .Net SDK Dialog class should be able to work even if called inside a Telerik app/form.

message error: La référence d objet n'est pas définie à une instance d'un objet.
Hello,
In my Frame, I use a RadDock with documentContainer and two toolwindows.
I would like the toolWindowFamily to dock automatically when I select it, rather than having to press the “pin” image.
On the “stabstripItem_click”, I put: oToolwindow:DockState= Telerik.WinControls.UI.Docking.DockState:Docked.
Here is my code:
METHOD PRIVATE VOID TabStripItem_Click( INPUT sender AS System.Object, INPUT e AS System.EventArgs ):
        DEFINE VARIABLE oTabStripItem AS Telerik.WinControls.UI.TabStripItem       NO-UNDO.
        DEFINE VARIABLE oToolwindow   AS Telerik.WinControls.UI.Docking.ToolWindow NO-UNDO.
        DEFINE VARIABLE cValeur       AS CHARACTER                                 NO-UNDO.        
        oTabStripItem = CAST(sender, Telerik.WinControls.UI.TabStripItem) NO-ERROR.
        IF oTabStripItem NE ? THEN 
        DO:
            oToolwindow = CAST(oTabStripItem:TabPanel, Telerik.WinControls.UI.Docking.ToolWindow) NO-ERROR.
            IF VALID-OBJECT(oToolwindow) THEN DO:
                IF oToolwindow NE ? THEN 
                DO:
                    IF THIS-OBJECT:DockPrincipal:ActiveWindow NE oToolwindow THEN 
                    DO:                     
                        oActiveWindow = THIS-OBJECT:DockPrincipal:ActiveWindow.
                        cValeur = THIS-OBJECT:oongFamilleListe:GetToolwindowFurtifValeur( oToolwindow:NAME ).
                        InitialiseToolWindow( oToolwindow:NAME ).
                        CASE oToolwindow:Name:                        
                            WHEN gcToolWindowNomAide[1] THEN DO:
                                IF cValeur NE "?" AND cValeur NE 'OFF'
                                    THEN THIS-OBJECT:oongCodeAnalytiqueAide:Initialisation(cValeur).                                
                                    ELSE THIS-OBJECT:oongCodeAnalytiqueAide:Initialisation("").
                                oToolwindow:Enabled = ( cValeur NE "?" AND cValeur NE 'OFF').        
                            END.
                            WHEN gcToolWindowNomFiltre[1] THEN DO:   
                               glDockParCode= YES.            
                               oToolwindow:DockState=  Telerik.WinControls.UI.Docking.DockState:Docked.
                               glDockParCode= NO.
                                oToolwindow:Enabled = YES.      
                                gcNoeudCourant = 'C000'.
                                glFiltreVisibleFamille = YES.  
                                oongFamilleArborescence:SelectionNoeud(gcNoeudCourant).
                                IF glRafraichir THEN DO:
                                    SetEtatObjet("BtnSupprimer", NO).                                    
                                    //SetEtatObjet("BtnCopier", NO).
                                    //SetEtatObjet("BtnColler", NO).
                                    //SetEtatObjet("BtnCollerInserer", NO).
                                    oongFamilleListe:SetParamFiltreFamille ( glFiltreVisibleFamille ,gcNoeudCourant ).  
                                    oongFamilleListe:Rafraichir( ).
                                END.
                            END.                                               
                        END CASE.
                        THIS-OBJECT:DockPrincipal:ActiveWindow = oToolwindow.
                    END.
                    ELSE 
                    DO:
                        THIS-OBJECT:DockPrincipal:CloseAutoHidePopup().
                        oToolwindow:AutoHideTab:Click:UnSubscribe(THIS-OBJECT:TabStripItem_Click) NO-ERROR.
                        oToolwindow:AutoHideTab:Click:Subscribe(THIS-OBJECT:TabStripItem_Click) NO-ERROR.
                        IF THIS-OBJECT:DockPrincipal:ActiveWindow NE oActiveWindow THEN
                            THIS-OBJECT:DockPrincipal:ActiveWindow = oActiveWindow.
                    END.
                END.
            END.
            ELSE DO:
                MESSAGE 'ERR - TabStripItem_Click '
                VIEW-AS ALERT-BOX.
                RETURN.
            END. 
        END.             
      /*                   
      IF lFlgDocked THEN DO:                      
          //oToolwindow:AutoHideTab:Click:UnSubscribe(THIS-OBJECT:TabStripItem_Click) NO-ERROR.
                           glDockParCode = YES.
                           oToolwindow:DockState=  Telerik.WinControls.UI.Docking.DockState:Docked NO-ERROR.  
                           oToolwindow:Tag = "ON".
                           glDockParCode = NO.
                       //    oToolwindow:AutoHideTab:Click:Subscribe(THIS-OBJECT:TabStripItem_Click) NO-ERROR.
      END.  
      */              
        RETURN.
    END METHOD.

Hi;
I have a problem that I don't know how to solve.
I have a grid with several columns and rows containing different data types (text, numbers, images, etc.). Some of the cells are formatted using the RowFormatting event.
The grid also allows filtering by column.
I noticed that when my grid has many rows and is filtered, scrolling becomes very slow. If it's not filtered, it works perfectly with the same number of rows.
After investigating further, I realized that the FilterChanged event is being triggered multiple times when scrolling.
Furthermore, the value of MasterView.Rows.Count is different each time the event is executed. Sometimes it shows the filtered count, and other times it shows the unfiltered count.
This, in addition to the slowness, is a serious problem. For example, if I have a thread running that performs an action on filtered rows, I encounter issues with indexing and incorrect row selection.
I've attached a sample project. If you filter by a column and then scroll, the number of rows in the MasterView will be displayed in the text box.
Could you help me to solve this problem?
Thank you so much.
Regards

Hi,
What is the best approach to adding a simple button to some cells (not all) in a grid view text box column? My column is read only and contains html text. I should also add that the button should overlay any text that might appear underneath it... So cell cannot contain stacked or docked sub elements.
I simply want to be able to show and handle a button at the top right hand corner of the cell. This cell is only added based on a some other algorithm in my code.
I thought aboutusing ButtonRenderer in a CellPaint but the text and button outline appear in 2 different places, so it seems that ButtonRenderer does not consider e.Graphics suplied to cell paint!
Any ideas?
Cheers
Toby

I want to use RadLabel _lblPreview as an information display control. When the text display width is less than the width of the Panel, I hope the content is displayed in the middle of the Panel.
_lblPreview.Height = 100;
_lblPreview.Font = new Font(fontName, size, FontStyle.Regular);
lblPreview.TextAlignment = ContentAlignment.MiddleCenter;
_lblPreview.Text = "样本文本 abc123.,";
_lblPreview.Dock = DockStyle.Top;
_lblPreview.AutoSize = true,
When gradually increasing the font size, the display is correct. However, when AutoSize is set to false, after the font size reaches 46, the displayed content gets truncated, and when it reaches 52, there is no display at all. What is the reason?


Using the current AI coding assistant, the responses consistently hallucinate methods.
I found this to be a problem when using regular ChatGPT v4, but this went away when i moved to v5.
If you are not using it already, I suggest moving your AI model to V5. I realize it is more expensive, but it at least useful!

