Telerik Forums
UI for WinForms Forum
1 answer
331 views

When Adding a Label in a GridLayout


var element = new RadLabelElement()
 element.SetValue(GridLayout.ColSpanProperty, colspan);
            element.SetValue(GridLayout.RowIndexProperty, row);
            element.SetValue(GridLayout.ColumnIndexProperty, column);
How do I achieve to right align, or center the label, especially when it spans multiple columns.

(If I could get the label to fill the entire cell, I could use the TextAlignment proproperty, but with Autosize enabled, it will never fill the entire cell.)

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 13 Apr 2022
1 answer
132 views

Hello, 

I am having difficulty auto sizing my columns. I want fill the whole grid view but have the the columns with the 3 abbreviations (BSA, GIS, ETC) to be small always. When set to  .AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill and .MasterTemplate.BestFitColumns() it is stretching out the WEB column. Is there a way to only allow the stretching to occur evenly on the first 4 columns but have the last 7 columns be small?  Thanks!

lin
Top achievements
Rank 1
Iron
 answered on 13 Apr 2022
1 answer
99 views
Greetings, how can I tell the RadTreeView to ignore accent when applying Filter.

the content of my RadTreeView there are nodes that have accents in the text, for example Balance Calculation, and if I search without an accent it does not search for me

How do I tell the TreeView Filter to ignore accents?

Use:
Visual Studio 2022
.Net Framework 4.8
Telerik WinForms 22.1.222.0
Dinko | Tech Support Engineer
Telerik team
 answered on 12 Apr 2022
0 answers
172 views

Hello, I am trying to use the gridview to try to display data...this is kind of a work in progress as I don't know what best approach is that I should be taking to display the data or if I am even using the right control.  I am trying to piece things together from some of the examples I can find. My questions are:

1. In the column named "img" is it possible to just hide that header and place the image next to the text? 

2. Can those expanded columns be auto sized instead of manual sized?

3. Is there an example of a dropdown box in one of these expanded row?  

 

Here is my rough code  creating the expanded rows: 

    'create out custom datasource containing all the apps 
        Dim BusinessAppsDT As New DataTable("Apps")
        With BusinessAppsDT
            .Columns.Add("id", GetType(Guid))
            .Columns.Add("img", GetType(Byte()))
            .Columns.Add("name", GetType(String))
        End With

        For Each row As DataRow In dt.Rows
            For Each itm As MyPortalObjects.Objects.ListItem In DeSerializeListview(Of MyPortalObjects.Objects.ListItem)(row("User_Needed_BusinessApps"))
                 BusinessAppsDT.Rows.Add(row("id"), itm.IconByteArray, itm.Name)
            Next
        Next

        'gridview templates are the tabs?
        Dim BusinessAppsTemplate As New GridViewTemplate
        BusinessAppsTemplate.Caption = "Apps"
        BusinessAppsTemplate.DataSource = BusinessAppsDT
        gvQueue.Templates.Add(BusinessAppsTemplate)

        Dim BusinessAppsRelation As New GridViewRelation(gvQueue.MasterTemplate)
        With BusinessAppsRelation
            .ChildTemplate = BusinessAppsTemplate
            .ParentColumnNames.Add("id")
            .ChildColumnNames.Add("id")
        End With
        gvQueue.Relations.Add(BusinessAppsRelation)

        Dim BusinessAppsView As New HtmlViewDefinition()
        With BusinessAppsView
            .RowTemplate.Rows.Add(New RowDefinition())
            .RowTemplate.Rows(0).Cells.Add(New CellDefinition("img", 3, 1, 3))
            .RowTemplate.Rows(0).Cells.Add(New CellDefinition("name", 10, 1, 3))

        End With
        BusinessAppsTemplate.ViewDefinition = BusinessAppsView
Willy
Top achievements
Rank 2
Iron
Iron
 asked on 08 Apr 2022
1 answer
140 views

Hello!

I've got a grid that has multiple, overlapping rows of data.  The purpose of this grid is to build an exportable Excel spreadsheet. 

Here would be a very simple example of how I need the spreadsheet to look in Excel

A                B                C                D                E

Name         DOB          Status       Amount 

John Q       12/12/20    Active       $100.00

 

As you can see - the Excel Columns are the standard, default A..E. 

Row 0 holds the "Headers" for the data directly beneath. 

Row 1 holds the actual data - but when I export this to Excel, I want to be able to tell it "This cell is text" or "This cell is a Date/Time" etc.

Is this possible? 

 

Thanks for the great products!

Curtis. 

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Apr 2022
1 answer
843 views

Hi,

I have a multi-column combobox that is data-bound to a binding source control.

Then in the form code I have the following lines:

Me.RadMultiColumnComboBox1.DropDownStyle = RadDropDownStyle.DropDownList
Me.RadMultiColumnComboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
Me.RadMultiColumnComboBox1.SelectedIndex = -1

The last line, in particular, is important in our case because we want to prevent the selection of the first record by default. Everything works fine except when there's only one record in the list.

When that happens, the textbox element picks up the display member of the lone item as soon as the user clicks the drop-down arrow. The text remains after the pop-up closes even if the user does not explicitly select the solo record.  This gives the user the false impression that a value has been set, but in reality the underlying value is still null.

We then found out that the second line of code above is what is causing this unwanted behavior. When commented out, an MCCB with a single record does not exhibit the problem.

We would like to keep the SuggestAppend feature working (i.e., in the case of multiple records), so is there a way to resolve this issue without having to resort to checking the number of records in the list?

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Apr 2022
2 answers
165 views

I thought there was a way on a radgridview that the user could hit B and be taken to the first entry where the B is. I thought i saw that the gridview was able to do that, but it doesn't seem to be working for me. It might be that i need to setup a custom keydown, not sure.

Thanks in advance.

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Apr 2022
2 answers
1.0K+ views

Hello,

The feature is to Change the part of rows background-color based on a cell

I want to set the BackColor of a row to a specific color based on information from a field.

The structure is different from classic Winform.

Can you help me please ?

Jana
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 08 Apr 2022
1 answer
230 views

Hello Team,
We are using the Telerik control RadSpinEditor in our windows application. we have set the Maximum Property as 1000 & Minimum Property as -100 for the SpinEditor.

Property ScreenShot : https://prnt.sc/5djfulRc2gGM

So when i click the Upper arrow & Down arrow the values are set correctly.

My Issue : When i trying to type the value on spineditor its allow to type more number of values. but it should allow only 1000. Please help us to resolve this issue. Video link added for your reference.

Video link : https://suganya-gmail.tinytake.com/df/1267028/thumbnail?type=attachments&version_no=0&file_version_no=0&thumbnail_size=preview

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Apr 2022
1 answer
107 views

Hello, when my application adds items to the auto complete box pragmatically I turn them red. I wish to hide the X button so the user cannot remove them. Is this possible? I noticed there is a ShowRemoveButton property on the control but that seems like it is for all tokens?  Here is some of my code. Thank you for the assistance. 

Private Sub AddToken(ByVal ac As RadAutoCompleteBox, ByVal email As String)

        Dim result As EmailTokenObject = AllEmails.Find(Function(o) o.Email.ToLower = email.ToLower)
        If result IsNot Nothing Then
            Dim flag = False 'search for pre-existing items to make sure we don't add them double 

            For Each item As RadTokenizedTextItem In ac.Items
                If item.Value.ToString.ToLower = email.ToLower Then
                    flag = True
                End If
                Exit For
            Next
            If flag = False Then
                'this has to be called BEFORE we add the item to the textbox 
                PrePopulatedEmails.Add(result.Email) 'add to the prepopulated emails so we can color it in red and remove the ability to remove the item 
                'add the item 
                ac.AppendText(result.Name & ";")
            End If
        End If
    End Sub

    Private Sub acWatchlist_TokenValidating(sender As Object, e As TokenValidatingEventArgs) Handles acWatchlist.TokenValidating
        If acWatchlist.Text.Contains(e.Text) Then
            e.IsValidToken = False
        End If
    End Sub

    Private Sub acWatchlist_TextBlockFormatting(sender As Object, e As TextBlockFormattingEventArgs) Handles acWatchlist.TextBlockFormatting
        Dim token As TokenizedTextBlockElement = TryCast(e.TextBlock, TokenizedTextBlockElement)
        If token IsNot Nothing AndAlso PrePopulatedEmails.Contains(token.Item.Value, StringComparer.OrdinalIgnoreCase) Then
            token.GradientStyle = GradientStyles.Solid
            token.BackColor = Color.Red
        End If
    End Sub
Dinko | Tech Support Engineer
Telerik team
 answered on 05 Apr 2022
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)
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
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
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
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?