Telerik Forums
UI for WinForms Forum
1 answer
257 views

Is there any easy way to convert RadDataFilter.Expression to FilterDescriptorCollection, so ill be able add it do CompositeFilterDescriptor of the RadGridView.FilterDescriptors.

RadGridView.FilterDescriptors.Add(new CompositeFilterDescriptor() { FilterDescriptors = RadDataFilter.Expression? });

Dimitar
Telerik team
 answered on 28 Jan 2019
3 answers
458 views

Hello,

So I've come across this weird (possible) bug whereupon if you bing a datatable as datasource in a multicolumn combobox and then try to change the SelectedIndex before the combobox has been drawn to the UI, you get an Index out of range exception even though the index is perfectly fine.

If you wait for it to be drawn, then it works fine.

 

I've created a reproducible example where I have a form with a PageView control; there's an "Employee" class whose "NewPage(AvoidBug As Boolean)" function returns a PageViewPage which has a MultiColumn cb inside with a datatable as its DataSource.

The 1st button on the main form will add the PageViewPage control that the NewPage(False) function returned to the PageView and the mccb.SelectedIndex will be changed inside the NewPage() function (so before it's drawn to the UI)

The 2nd button will do the same, only calling the NewPage(True) will result in a Public Variable inside the Class being set to the Index we want the mccb.SelectedIndex to be changed to, but the mccb.SelectedIndex will NOT change. After the control is added on the main form, the mccb.SelectedIndex now changes, and no exception is produced.

 

*So does that mean the the DataSource indexing on a mbcb occurs only after the control is drawn/visible to the user?

*Another thing I noticed, even when the second button is pushed, the bug avoidance only works once. If you push it again (to add a second PageViewPage) then exception occurs again

*However, if you delete the first PageViewPage before pushing the second button a second time, essentially adding a first PageViewPage again, then the exception doesn't occur

 

Things will become much clearer by using the reproducible code: https://www.dropbox.com/s/4ccjr37n60mavt4/TelerikWinFormsApp1%20%282%29.rar?dl=1

 

Best regards,

Ioannis Mamalikidis

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Jan 2019
1 answer
714 views

Hi.

I have a problem.

How can print a picture from a picturebox?

How can put correct object in Associateobjet to print it?

Hristo
Telerik team
 answered on 28 Jan 2019
4 answers
228 views
Hi everyone,

I use a RadTrackBar in my WinForm application and when the user move the trackbar, I change a value in a RasSpinEditor. My problem is that i do so at the ValueChanged event of my RadTrackBar wich is fired only when i release the mouse button. This doesn't correspond to what we are looking for. Is there another event which allow to change my RadSpinEditor value during the move of the radTrackBar ? I need to know the value of the TrackBar, that's why i use the ValueChanged event for know, but the value change only when I release the mouse button, can we change that comportment ?

Thanks,

[Nean]
Hristo
Telerik team
 answered on 28 Jan 2019
0 answers
108 views

hi

is possible set scroll bar for one cell?

asghar
Top achievements
Rank 1
 asked on 26 Jan 2019
2 answers
267 views

Hi!

I have a tri-state RadCheckBox and tried to change its intermediate state background color with the "SetThemeValueOverride", but nothing happens.

The code is the following:

checkBox.ButtonElement.CheckMarkPrimitive.CheckElement.GradientStyle = GradientStyles.Solid;

checkBox.ButtonElement.CheckMarkPrimitive.SetThemeValueOverride(FillPrimitive.BackColorProperty, Color.Black, "ToggleState=Intermediate", typeof(FillPrimitive));

 

What do I wrong?

 

Thank you,

Sandor

Sandor
Top achievements
Rank 1
 answered on 25 Jan 2019
1 answer
84 views

Hello there. 

This code returns negative MaxSize on 100% dpi, since it overflows int.

var dpiScaleFactor = radLabel1.RootElement.DpiScaleFactor;
var r1 = new Size(150, int.MaxValue);
var r2 = TelerikDpiHelper.ScaleSize(r1, new SizeF(1f / dpiScaleFactor.Width, 1f / dpiScaleFactor.Height));

I use that code to descale some sizes on runtime per suggestion on the forum, also I have seen similar code in Telerik sources. When control receives negative max size it becomes invisible. You may want to investigate this cases. 

I use Telerik 2018.3.1016.20 with .Net 3.5 on Server 2008 R2 SP1.

Best regards.

Dimitar
Telerik team
 answered on 25 Jan 2019
1 answer
311 views

Hello,

I am trying to streamline a process using radGridView that allows users to tab through only the necessary controls on a form. When they hit the radGridView control, they're currently tabbing through all existing cells. This is desired - but when they leave the last cell of an existing cell, we want to disable the ability to add a new row. We don't want to them to have to add a new row unless they click on "Click here to add new row". 

I've attached a screenshot of the behavior that I do not want. The yellow cells is from my conditional formatting. I'm not entirely sure what this row is because it doesn't have the default values that I've set when you click on "Click here to add new row".

How can I disable this behavior?

Thank you!

 

Dimitar
Telerik team
 answered on 25 Jan 2019
5 answers
98 views

Hello All,

I have customized InsertHyperlinkDialog to insert hyperlink onto my RadRichTextEditor. My custom dialog insert the hyperlink and also create list of all links saved into a database table.

Now I wonder, can I detect and event when a link is deleted from my document to make me clear out this link from my list ? As long as I get the event, I have put a tag to make sure I can identify which link must be deleted from my list correctly.

Thanks 

 

 

 

Tanya
Telerik team
 answered on 25 Jan 2019
4 answers
545 views

I can't seem to make filtering and sorting work with my RadVirtualGrid. The control itself does the job mostly fine - lightning fast loading of 2000+ rows of data.

I've reduced it to a simple example: a single form with a single RadVirtualGrid, which uses all the code form the online example, 

Only different between my simple example and the documented one is that I don't get the objects from a DB - just make them.

The grid populates fine - it's just the filter/sort which does nothing.

I can get the more advanced filter/sort option events to fire OK, but I only need the simple stuff - single column sorts and single column filtering

There's obviously something really simple I've missed -any suggestions ?

 

Code is:

Imports Telerik.WinControls.UI

Public Class RadForm1
    Private columnNames As String() = New String() {"CompanyName", "ContactName", "ContactTitle", "Address", "PostalCode"}
    ' Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
    "..\..\DataSources\Nwind.mdb;Persist Security Info=True"   - NOT USED
    Private data As New List(Of Customer)()
    Private Sub VirtualGridPopulatingWithData_Load(sender As Object, e As EventArgs) Handles Me.Load
        AddHandler Me.RadVirtualGrid1.CellValueNeeded, AddressOf radVirtualGrid1_CellValueNeeded
        Me.RadVirtualGrid1.ColumnCount = columnNames.Length
        SelectData()
    End Sub
    Private Sub radVirtualGrid1_CellValueNeeded(sender As Object, e As VirtualGridCellValueNeededEventArgs)
        If e.ColumnIndex < 0 Then
            Return
        End If
        If e.RowIndex = RadVirtualGrid.HeaderRowIndex Then
            e.Value = columnNames(e.ColumnIndex)
        End If
        If e.RowIndex < 0 Then
            e.FieldName = columnNames(e.ColumnIndex)
        End If
        If e.RowIndex >= 0 AndAlso e.RowIndex < data.Count Then
            e.Value = data(e.RowIndex)(e.ColumnIndex)
        End If
    End Sub
    Private Sub SelectData()

        data = Customer.makeData

        Me.RadVirtualGrid1.RowCount = data.Count
    End Sub
End Class
Public Class Customer

    Public Shared Function makeData() As List(Of Customer)
        Dim someCustomers As New List(Of Customer)
        someCustomers.Add(New Customer("1", "Company1", "Fred", "Mr", "addr1", "np7"))
        someCustomers.Add(New Customer("2", "Company2", "Bill", "Mr", "addr2", "np8"))
        someCustomers.Add(New Customer("3", "Company3", "Andi", "Mrs", "addr0", "np3"))

        Return someCustomers
    End Function

    Public Sub New(customerId As String, companyName As String, contactName As String,
    contactTitle As String, address As String, postalCode As String)
        Me.CustomerId = customerId
        Me.CompanyName = companyName
        Me.ContactName = contactName
        Me.ContactTitle = contactTitle
        Me.Address = address
        Me.PostalCode = postalCode
    End Sub

    Public Property CustomerId() As String
        Get
            Return m_CustomerId
        End Get
        Set(value As String)
            m_CustomerId = value
        End Set
    End Property
    Private m_CustomerId As String
    Public Property CompanyName() As String
        Get
            Return m_CompanyName
        End Get
        Set(value As String)
            m_CompanyName = value
        End Set
    End Property
    Private m_CompanyName As String
    Public Property ContactName() As String
        Get
            Return m_ContactName
        End Get
        Set(value As String)
            m_ContactName = value
        End Set
    End Property
    Private m_ContactName As String
    Public Property ContactTitle() As String
        Get
            Return m_ContactTitle
        End Get
        Set(value As String)
            m_ContactTitle = value
        End Set
    End Property
    Private m_ContactTitle As String
    Public Property Address() As String
        Get
            Return m_Address
        End Get
        Set(value As String)
            m_Address = value
        End Set
    End Property
    Private m_Address As String
    Public Property PostalCode() As String
        Get
            Return m_PostalCode
        End Get
        Set(value As String)
            m_PostalCode = value
        End Set
    End Property
    Private m_PostalCode As String

    Default Public ReadOnly Property Item(i As Integer) As String
        Get
            Select Case i
                Case 0
                    Return CompanyName
                Case 1
                    Return ContactName
                Case 2
                    Return ContactTitle
                Case 3
                    Return Address
                Case 4
                    Return PostalCode
                Case Else
                    Return [String].Empty
            End Select
        End Get
    End Property
End Class

Ian
Top achievements
Rank 2
Bronze
Bronze
Iron
 answered on 25 Jan 2019
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
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?