Telerik Forums
UI for WinForms Forum
1 answer
29 views

I have for with a radspreadsheet on. ( Telerik.WinControls.UI.RadSpreadsheet )

Which event do I need to use to capture a change in a cell?

For example, if I change cell A2 from value "ABC" to "EFG", how can I get the value "EFG" ?

If I check the documentation: then the CellPropertyChanged event exists, but I cannot find this in my IDE.

Why are the events that I have in my radSpreadSheet different then the documentation? 

Nadya | Tech Support Engineer
Telerik team
 answered on 08 Oct 2024
1 answer
26 views

Hi, anyone can help me with the issue below?

I have a customized theme applied in my application. However, a customized editor doesn't apply the theme. I am not able to override the theme here.

    Private Sub RadGridView3_EditorRequired(sender As Object, e As EditorRequiredEventArgs) Handles RadGridView3.EditorRequired
        If RadGridView3.CurrentColumn.HeaderText = "Section" Then
            e.Editor = New MyAutoCompleteEditor
        End If
    End Sub

 

Class MyAutoCompleteEditor
    Inherits RadTextBoxControlEditor

    Protected Overrides Function CreateEditorElement() As Telerik.WinControls.RadElement
        Dim element As New RadAutoCompleteBoxElement With {
            .AutoCompleteMode = AutoCompleteMode.Suggest
        }

        Return element
    End Function

    Public Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)
        Dim element As RadAutoCompleteBoxElement = TryCast(Me.EditorElement, RadAutoCompleteBoxElement)

        If element.TextLength >= 40 Then
            e.SuppressKeyPress = True
        End If

        RemoveHandler element.KeyPress, AddressOf RadAutoCompleteBox_KeyPress
        AddHandler element.KeyPress, AddressOf RadAutoCompleteBox_KeyPress
        RemoveHandler element.TextChanging, AddressOf RadAutoCompleteBox_TextChanging
        AddHandler element.TextChanging, AddressOf RadAutoCompleteBox_TextChanging

        If element.IsAutoCompleteDropDownOpen Then
            Return
        End If

        MyBase.OnKeyDown(e)
    End Sub

    Private Sub RadAutoCompleteBox_KeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs)
        Dim element As RadAutoCompleteBoxElement = TryCast(sender, RadAutoCompleteBoxElement)

        If element.Items.Count > 0 Then
            e.Handled = True
        End If

    End Sub

    Private Sub RadAutoCompleteBox_TextChanging(ByVal sender As Object, ByVal e As Telerik.WinControls.TextChangingEventArgs)
        If e.NewValue = "" Then
            Return
        End If

        Dim el As RadAutoCompleteBoxElement = TryCast(sender, RadAutoCompleteBoxElement)

        If el.Items.Count > 0 Then
            e.Cancel = True
        End If
    End Sub

End Class

Text column


In the custom column, control is running on the Visual Studio 2022 theme.
Nadya | Tech Support Engineer
Telerik team
 answered on 08 Oct 2024
1 answer
33 views

I have a RadGridView that has its first column(named "Visible") as a CheckBox cell in every row.

I have another CheckBox that toggles all the CheckBoxes in the GridView. In this CheckBox's ToggleStateChanged handler, I am trying to get the checkbox element in the GridView row and toggle its state.

This is what I am trying at the moment:

foreach(var myGridRow in curveGridView.Rows)
{
    ((GridViewCheckBoxColumn)myGridRow.Cells["Visible"].ColumnInfo).Checked = Telerik.WinControls.Enumerations.ToggleState.On;
}

However, I am unable to get the RadCheckBox element in the GridView Row and I cannot toggle the checkbox in the row.

Any help would be greatly appreciated.

Nadya | Tech Support Engineer
Telerik team
 answered on 07 Oct 2024
1 answer
27 views

Hello,

i am trying to show content of excel file in RadSpreadSheet. For first attempt its working fine, but if i decide to change something in excel file i can't do it, because RadSpreadSheet keep the excel file open. How can I lost connection to my excel, edit it, and reopen edited file again? I have tried everytime when i need to open excel create new instance OF RadSpreadSheet, but it doesn't work. Please look at the code below.


The code is basicly managed as: When i show UserControl  (Visible = true), i want to create new instance of RadSpreadSheet for losing existing connection and have option load the file what i edited. Please understand as cycle:  Open excel file in RadSpreadSheet, than i need to have options: edit / delete or recreate excel file and open the edited excel file again in RadSpreadSheet. But it doesn't work because new intance of RadSpreadSheet is empty and there is not loaded file or it throw exception: "The process cannot access the file "xxxx" because it is being used by another process".  Via code is it: User create excel file than this file is loaded to RadSpreadSheet (everything okay) and than has option to print this excel or go back and edit excel file again (when it eddited, the program drop with exception thats this file is used in another process) Personally i think when i load file and it is showing in RadSpreadSheet, and after that i want to edit file, the RadSpreadSheet has still connection to this file. The new instances of RadSpreadSheet is not solution of losing connection.

Last and not least i am sorry for my mistakes in English
Thank you for any response and your time. 


Nadya | Tech Support Engineer
Telerik team
 answered on 02 Oct 2024
2 answers
23 views

Hi,

I am trying to show data in a postgres DB in a RadVirtualGrid.  Data is big and continuously flows and changes, so I decided to use RadVirtualGrid, first I started witf RadGridView with VirtualMode on but decided to use RadVirtualGrid, hope thats the correct decision?

I can show the data correctly and get updates via LISTEN/NOTIFY mechanism of Postgres.(sometimes it stops updating but I think it is a postgres side problem) . I couldnt make the filtering work.

With regards to code I attached, Is it really possible to use the FilteringColumn which is shown when RadVirtualGrid.AllowFiltering==true.

When I enter a value to filter it doesnt work and filter textbox dissapears:

Here I hit 'APPLY FILTERS' button or pres enter key it show like below:

My reqs are:

* Display data with minimum delay

* Filter with column values. Some columns are decimal but some are enums so instead of writing the enum value in the filter having a dropbox (excel style) would be good.

* Filtering will work on all data not just on the visible rows in the grid. Also filtered grid should be updated when new data arrives.

*  Sorting (optional)

* Export data to XML (all data not only the visible rows)

 

Thanks in advance !

 

Bilgehan
Top achievements
Rank 1
Iron
 answered on 01 Oct 2024
1 answer
29 views

Hello

I have a hierarchical RadGridview with a GridViewCheckBoxColumn in the secondary template.

The column has EnableHeaderCheckBox = true so that it shows if all rows are checked and can be used to check them all.

If there are exactly two rows and I manually check the first of them the 'all checked' header checkbox gets checked - although the second row is not checked.

As soon as the second row is checked the error doesnt occur anymore

Nadya | Tech Support Engineer
Telerik team
 answered on 30 Sep 2024
1 answer
18 views

Hi,

i have a problem concerning (Telerik.wincontrol.dll 2012.3.1017.20)
Sometimes, but not everytime, when i start entering a value into one of my radtextboxes the following error will be thrown.

Please help me find the result of error ,  When will this issue be triggeredUrgently hoping for a reply。


在 Telerik.WinControls.Keyboard.ChordMessageFilter.FindChordPattern(IList`1 list)
   åœ¨ Telerik.WinControls.Keyboard.ChordMessageFilter.FindChordPattern()
   åœ¨ Telerik.WinControls.Keyboard.ChordMessageFilter.ProccessChord()
   åœ¨ Telerik.WinControls.Keyboard.ChordMessageFilter.System.Windows.Forms.IMessageFilter.PreFilterMessage(Message& msg)
   åœ¨ System.Windows.Forms.Application.ThreadContext.ProcessFilters(MSG& msg, Boolean& modified)
   åœ¨ System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
   åœ¨ System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
   åœ¨ System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   åœ¨ System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   åœ¨ System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   åœ¨ System.Windows.Forms.Application.RunDialog(Form form)
   åœ¨ System.Windows.Forms.Form.ShowDialog(IWin32Window owner)


Nadya | Tech Support Engineer
Telerik team
 answered on 30 Sep 2024
4 answers
43 views

Hello, 

I'm using the RadGanttView component and I'm trying to manage multiple coloring on some tasks. 

I've followed the example given in your documentation: 

https://docs.telerik.com/devtools/winforms/controls/ganttview/custom-items/task-elements

I need to be able to condition the coloring of tasks and ensure that vertical scrolling does not affect rendering. 

Do you have any ideas on how to do this?

You'll find a sample project with the case described.

All you have to do is scroll vertically through the tasks, the task coloring will follow the scroll.

Thanks,

Rémi

Fabrice
Top achievements
Rank 2
Iron
Iron
 answered on 26 Sep 2024
1 answer
23 views

Good morning
in a RadGridView in the event of a button I delete a row from the database and I would like to reposition and select the row after the deleted one. The problem is that I can't figure out how to get the id of the row after the deleted one. To complicate things I add that the rows are filtered by the filtering row of the RadGridView. I attach code to make it clearer.

I think the problem is that to delete the row I take the index from the first cell of the row. But I don't understand how to take the index of the row of the radgridview

Fabrizio


    Private Sub btnEliminaLotto_Click(sender As Object, e As EventArgs) Handles btnEliminaLotto.Click

        'Trova id selezionato con ChildRows
        propIdLottoMateriale = gridLottoMateriale.ChildRows(gridLottoMateriale.CurrentRow.Index).Cells(0).Value

        Dim result As DialogResult

        If Not (propIdLottoMateriale = Nothing) Then
            If gridLottoMateriale.SelectedRows.Count > 0 Then
                result = MessageBox.Show(" Sei sicuro di voler eliminare il Test Report N° : " & propIdLottoMateriale & " ? ", "Elimina test Report in Database", MessageBoxButtons.OKCancel)
                If result = DialogResult.Cancel Then
                    Exit Sub
                End If

                If result = Windows.Forms.DialogResult.OK Then
                    EliminaLottoMateriale(propIdLottoMateriale)

                    'Controllo se il filtro esiste ancora
                    If (gridLottoMateriale.IsInEditMode) Then
                        gridLottoMateriale.EndEdit()
                    End If

                    'Toglie il filtro
                    gridLottoMateriale.FilterDescriptors.Clear()

                    'PopolaGridLotto()
                    'Aggiorna il dataset binding con la grid
                    TblNumeroLottoMaterialeTableAdapter.Fill(DsNumeroLottoMateriale1.tblNumeroLottoMateriale)

                    'Riposiziona la griglia sulla riga dopo quella eliminata
                    gridLottoMateriale.CurrentRow = gridLottoMateriale.ChildRows(indexRigaPerAggiorna + 1)
                    gridLottoMateriale.CurrentRow.IsSelected = True

                Else
                        Exit Sub
                End If
            Else
                MessageBox.Show("Seleziona una riga !!")
            End If

        Else

        End If

    End Sub



    Public Function EliminaLottoMateriale(ByVal id As Integer)
        Dim deleteCommand As DbCommand = Nothing
        Dim rowsAffected As Integer
        Try
            deleteCommand = _db.GetStoredProcCommand("spDeleteQueryLotto")
            _db.AddInParameter(deleteCommand, "id", DbType.Int32, id)
            rowsAffected = _db.ExecuteNonQuery(deleteCommand)
        Catch ex As Exception
            MessageBox.Show("Errore EliminaLottoMateriale : " & ex.Message)
        End Try
        Return rowsAffected
    End Function

Nadya | Tech Support Engineer
Telerik team
 answered on 26 Sep 2024
1 answer
54 views

Hi,

I have just updated to the latest version of UI WinForms, and can no longer compiler. RbgColor and RbgColors can no longer be used and ZipArchive.Read no longer exists.

No issues were reported when upgrading my application.

Have I done something wrong?

Kind regards

Toby

Toby
Top achievements
Rank 3
Iron
Iron
Iron
 updated answer on 26 Sep 2024
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
n
Top achievements
Rank 1
Iron
Iron
Arifullah
Top achievements
Rank 2
Iron
Iron
Marat
Top achievements
Rank 1
Richard
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 2
Iron
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
n
Top achievements
Rank 1
Iron
Iron
Arifullah
Top achievements
Rank 2
Iron
Iron
Marat
Top achievements
Rank 1
Richard
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 2
Iron
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?