I use the following code to group and format the group name.
Private Sub grdURLs2_GroupSummaryEvaluate(sender As Object, e As GroupSummaryEvaluationEventArgs) Handles grdURLs2.GroupSummaryEvaluate
Try
Dim groupRow As GridViewGroupRowInfo = TryCast(e.Context, GridViewGroupRowInfo)
If e.SummaryItem.Name = "col1" Then
If groupRow IsNot Nothing Then
If e.Value IsNot Nothing Then
e.FormatString = e.Value
Else
e.FormatString = ""
End If
End If
End If
Catch ex As Exception
txtError.Text = ex.Message & " - " & Format(Now, "HH:mm:ss")
End Try
End Sub
Everything works fine until I leave the group field empty. This code works fine with an empty field, but after restarting the program, it adds records with empty fields not to the same group, but creates a new one. After restarting the program, all fields are in the same group. What am I doing wrong and how can I do it right? Thank you!
P.S.: I figured out why this happens.
Then another question arises. How to check cells for empty values when adding a record and not add records with empty cells (continue editing)? Or replace empty values in cells with significant ones and add?
I am trying to programmatically set the width of the dropdown list when the user clicks the DropDownButton, but my items are getting cut off because I can't seem to find the width of the CheckBox on the list so I can pad the width. How can I get to that information?
TIA.
Mark
Hi there!
Recently i encountered the following error: 'You are trying to use a multi-threaded .NET object in a way that is not supported. The ABL cannot be called on a thread other than the main thread.'. I've known for a while that the language used in my company doesn't support multi-tread, that's why we usually used the version '20' of the dll's but sometimes the "40" were also usable even being multi-thread. Check the following link for context.
However, after updating the 2020 dll's to the 2023, we've been encountering several problems with the "RadPivotGrid" object. We get constant errors and warnings (like the one i shared). So, I've been trying unsuccessfully to find the '20' version so i can force my company's application to run with a single thread, and i can't find it anywhere.
Can anyone help me find it? Preferably DLL's from the year 2023 and forward.
Thank you.
JP
Hello,
I would like to have combo box column in GridView editable by user, so user can select from dropdown list or type it manually. I have two possible scenarios, one with column mapped to other table, so it should be really only some value from dropdown, but I want to have it editable because of more values, and second with just string value, but I want to offer a dropdown for selecting most common values. It doesn't work in any case. Selecting from dropdown list is ok, but when I type an option manually, it reverts back to original value:
I have found very similar question here, but it's older and I don't know, how he solved it, it doesn't work for me, or more precisely, I don't know what's the difference, I don't see any important point I have missed.
https://www.telerik.com/forums/editable-gridviewcomboboxcolumn
https://docs.telerik.com/devtools/winforms/controls/gridview/features/editing/editors/how-to/allow-end-users-to-add-items-to-dropdownlisteditor
I have column defined like this:
dc = new DbDataContext();
var col = rgv.Columns["colProjID"] as GridViewComboBoxColumn;
col.DataSource = dc.Proj2s.OrderBy(o => o.Code);
col.FieldName = "ProjID";
col.DisplayMember = "Code";
col.ValueMember = "ID";
col.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;
If the solution isn't obvious, I can prepare test project, but I have it bound to database now, so it would take some time.
I have a grid with 60,000 records and I have the filter line at the top of the grid. When a user writes to the filter line, it takes a few minutes for the grid to be filtered.
Telerik version is 2021.2.511.40.
Are there any performance improvements in newer versions? Is there a guarantee that if we update the Telerik version this problem will be resolved?
Hello!
1. How to correctly implement adding unique groups to the list and deleting non-existent ones?
The GroupSummaryEvaluate event does not occur when deleting the last entry in a group (deleting this group). That is, it is necessary for the ListBox to display the same groups as in the Grid.
lbGroups.DataSource = lstGroups.ToList
Public Class Form1 Dim lstGroups As New SortedSet(Of String) Private Sub grdURLs2_GroupSummaryEvaluate(sender As Object, e As GroupSummaryEvaluationEventArgs) Handles grdURLs2.GroupSummaryEvaluate If lstGroups.Add(e.Value) Then ' code End If End Sub End Class
2. How to remove the Close button from the Search Bar?
For Each row In grdURLs2.TableElement.VisualRows
If TypeOf row Is GridSearchRowElement Then
Dim searchRow = TryCast(row, GridSearchRowElement)
searchRow.SearchCellElement.CloseButton.Visibility = False
Exit For
End If
Next
Thank you!
Hello,
RadRibbonBar avec le thème Fluent (RadRibbonBar with Fluent theme)
En ajoutant la commande pour faire disparaitre le menu, l'onglet se positionne au début.
(By adding the command to make the menu disappear, the tab is positioned at the beginning.)
CAST(THIS-OBJECT:RadRibbonBar:GetChildAt(0):GetChildAt(5), Telerik.WinControls.UI.RadApplicationMenuButtonElement):Visibility = Telerik.WinControls.ElementVisibility:Hidden.
Si je change de thème (Desert) l'onglet se positionne pas au début (comme sur le thème Fluent).
(If I change the theme (Desert), the tab is not positioned at the beginning (as on the Fluent theme).)
Best regards
I have this code, and I just want to export all pages or a specific page from the loaded PDF in the RadPdfViewer, without saving the file to the computer.
The function RadPdfViewer.ExportPage returns a Bitmap, but when I assign the result of this function to a new variable of type Bitmap, an error occurs.
'1º Option - Work
For i As Integer = 1 To RadPdfViewer1.Document.Pages.Count
Dim guid As Guid = Guid.NewGuid
RadPdfViewer1.ExportPage(i, "C:\temp\" & guid.ToString() & ".pdf", 1, True, ImageFormat.Png)
Dim bitmap As Bitmap = New Bitmap("C:\temp\" & guid.ToString() & ".pdf")
Dim reader As BarcodeReader = New BarcodeReader With {
.AutoRotate = True,
.TryInverted = True
}
Dim result As Result = reader.Decode(bitmap)
If result Is Nothing Then Continue For
Dim decoded As String = result.ToString().Trim()
If decoded Is Nothing Then Continue For
If decoded <> TextBox1.Text Then TextBox1.Text = TextBox1.Text & vbNewLine & vbNewLine & decoded
bitmap.Dispose()
My.Computer.FileSystem.DeleteFile("C:\temp\" & guid.ToString() & ".pdf")
Next
'2 Option - Dont Work
Dim bitmap As Bitmap = RadPdfViewer1.ExportPage(1, 1, False, ImageFormat.Png)
'3º Option - Dont Work
For Each bitmap As Bitmap In RadPdfViewer1.ExportPages(1, False, ImageFormat.Bmp)
Dim reader As BarcodeReader = New BarcodeReader With {
.AutoRotate = True,
.TryInverted = True
}
Dim result As Result = reader.Decode(bitmap)
If result Is Nothing Then Continue For
Dim decoded As String = result.ToString().Trim()
If decoded Is Nothing Then Continue For
If decoded <> TextBox1.Text Then TextBox1.Text = TextBox1.Text & vbNewLine & vbNewLine & decoded
Next