Telerik Forums
UI for WinForms Forum
2 answers
101 views

Hello,
In RadGridView, I set the column to GridViewDateTimeColumn.
I want to change the date display format to short.
Code below.

Public Class RadForm5
    Private Sub RadForm5_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim listTest As New List(Of TestDate)
        listTest.Add(New TestDate With {.Name = "John", .DateStart = New Date(2022, 5, 1)})
        listTest.Add(New TestDate With {.Name = "Arya", .DateStart = New Date(2022, 5, 2)})
        listTest.Add(New TestDate With {.Name = "Brandon", .DateStart = New Date(2022, 5, 3)})
        listTest.Add(New TestDate With {.Name = "Catelyn", .DateStart = New Date(2022, 5, 4)})

        For Each col In RadGridView1.Columns
            If col.Name = "colDate" Then
                col.FieldName = "DateStart"
                Dim colDate As GridViewDateTimeColumn = TryCast(col, GridViewDateTimeColumn)
                colDate.Format = DateTimePickerFormat.Short
            End If
        Next

        RadGridView1.DataSource = listTest
    End Sub
End Class

Public Class TestDate
    Public Property Name As String
    Public Property DateStart As Date
    Public Sub New()

    End Sub
End Class


Unfortunately, setting the display format does not work properly.
I have to add more fields in object every time

   Public ReadOnly Property DateStartStr As String
        Get
            Return DateStart.ToShortDateString
        End Get
    End Property

And

col.FieldName = "DateStartStr"

Is there another way to do this?

 

Regards

Jack

Jacek
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 29 Sep 2022
1 answer
148 views

Hello all.

Does anyone know how to fix this?  Please see image #1

That's just a small section of the Toolbox - every Telerik Control has multiple entries.

Each duplicate points to the same Library.

Each tool has the identical Version as its Duplicate.

I have uninstalled, reinstalled a few times.  Does not fix it.

Telerik Toolbox Configurator does not fix it.

Help/Advice would be appreciated!

 

Thanks all :)

-c

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 29 Sep 2022
1 answer
194 views

So, this is weird and I'm sure my fault, but I'm having a problem.

This is an unbound grid.

I have 26 rows that should be added to the grid.  So I iterate through all of the rows to add them to the grid, all appears well.  Checking the row count, there are 26 rows. But when viewing the grid, there are only 24 rows displayed.  The last two rows that should be there, do not appear.

However, if I enable the default row filtering and filter on one of the missing rows, I can find them and they are displayed as expected.

Pagination is disabled (I enabled it just to see if they were appearing on the next page, they are not).

There are no filters applied to this grid (except as the above test with the default filter row displayed)

I have no idea what I'm doing wrong, so any help to point me in the right direction would be great.

Again, to be clear, its not a data problem, the rows are there in the grid.  Its a display problem.

Thanks for any suggestions!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Sep 2022
1 answer
171 views

Hi. 

 

I have images on the screen for the DB and when I select one, I need the app to simulate a "Next" Click

 

code:

            txt_db.Text = "MSSQL";

            frm_generator_database_connection_step02_mssql frm = new frm_generator_database_connection_step02_mssql() { Dock = DockStyle.Fill, TopLevel = false, TopMost = true };
            frm.FormBorderStyle = (FormBorderStyle);
            pContainer.Controls.Clear();
            pContainer.Controls.Add(frm);
            frm.Show();

 

 

Regards

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Sep 2022
1 answer
445 views

Hello,

I am trying to develop an option to work with employees and their shifts. Locations and their opening times indicate the possible working hours. In an overview I pass the location in a ComboBox, in the individual, the employee as a parameter. It would be beneficial to have a possibility to add a location to the appointment dialog to be able to dynamically query with EF. Has anyone here already gained experience?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Sep 2022
1 answer
177 views

Sir,

I am trying to export radgridview to PDF....But from Second columns its alignment is to Center alignment...How can i change the Alignment in PDF.

i am attaching the Code that i am using....Please help to solve the issue

Dinko | Tech Support Engineer
Telerik team
 answered on 26 Sep 2022
1 answer
124 views
Can I add charts to a ListControl ?
Maria
Telerik team
 answered on 23 Sep 2022
1 answer
122 views

How do I remove the symbol (up arrow) to Collapse/Expand a Group in a GridView

I want the groups to always show and always be expanded to show all items.

Thanks for any help provided!

Dinko | Tech Support Engineer
Telerik team
 answered on 23 Sep 2022
1 answer
146 views
I am working on a project with "UI for WinForms R2 2022 SP1 (version 2022.2.622)" and I am facing an issue on all my RadLebels!!! If I use HTML-Like text they look like this...



Any idea why is this happening?

Thank you for your time!!!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Sep 2022
1 answer
191 views

Hi,

Let me describe my use case in these following steps:

  • created a RadRichTextEditor 
  • set the RadRichTextEditor text to "This is a sample"
  • set the cursor before the letter "s" from the word "sample"
  • created a readonly span and set the fore color to Yellow
  • inserted the readonly span "Inserted text" before the word "sample"

Please see the output from the attachment: InsertTextOnCurrentCaretPosition_UI_1.0.PNG

Code below, is the method of insertion of readonly span

public void InsertTextOnCurrentCaretPosition()
{
	// Creating and setting span
	Span readOnlyContent = new Span("Inserted text");
	readOnlyContent.ForeColor = Color.FromRgb(255, 255, 0);     // Yellow

	// Get the position of the current caret
	DocumentPosition caretPosition = new DocumentPosition(radRichTextEditor.Document.CaretPosition);
	caretPosition.AnchorToCurrentBoxIndex();

	// Insert the span
	radRichTextEditor.Document.Selection.Clear();
	radRichTextEditor.InsertInline(readOnlyContent);

	// Get the position of the current caret after inserting the span
	caretPosition.RestorePositionFromBoxIndex();
	DocumentPosition endCitation = radRichTextEditor.Document.CaretPosition;

	// Select the span by caret positions and insert as read only
	radRichTextEditor.Document.Selection.AddSelectionStart(caretPosition);
	radRichTextEditor.Document.Selection.AddSelectionEnd(endCitation);
	radRichTextEditor.InsertReadOnlyRange();

	radRichTextEditor.Focus();
}


After the insertion of the readonly span, I key-in 3 letter "a" and expected the fore color would be Black, but it seems it retained the color (Yellow) of the readonly span. As you can see on this attachment: InsertTextOnCurrentCaretPosition_UI_1.1.PNG

Is there a way to set/reset the fore color to Black after the readonly span? so that the key-in values would be in color Black

Code below, I tried setting the fore color to Black right after the InsertReadOnlyRange, but it changes the fore color of the 2nd word "text" of the readonly span as you can see on this attachment: InsertTextOnCurrentCaretPosition_UI_2.0.PNG

public void InsertTextOnCurrentCaretPosition()
{
	// Creating and setting span
	Span readOnlyContent = new Span("Inserted text");
	readOnlyContent.ForeColor = Color.FromRgb(255, 255, 0);     // Yellow

	// Get the position of the current caret
	DocumentPosition caretPosition = new DocumentPosition(radRichTextEditor.Document.CaretPosition);
	caretPosition.AnchorToCurrentBoxIndex();

	// Insert the span
	radRichTextEditor.Document.Selection.Clear();
	radRichTextEditor.InsertInline(readOnlyContent);

	// Get the position of the current caret after inserting the span
	caretPosition.RestorePositionFromBoxIndex();
	DocumentPosition endCitation = radRichTextEditor.Document.CaretPosition;

	// Select the span by caret positions and insert as read only
	radRichTextEditor.Document.Selection.AddSelectionStart(caretPosition);
	radRichTextEditor.Document.Selection.AddSelectionEnd(endCitation);
	radRichTextEditor.InsertReadOnlyRange();

	// Change the color of the editor back to black
	radRichTextEditor.Document.Selection.Clear();
	radRichTextEditor.ChangeTextForeColor(Color.FromRgb(0, 0, 0));   // Black
	radRichTextEditor.DocumentInheritsDefaultStyleSettings = true;
	radRichTextEditor.Focus();
}

Dimitar
Telerik team
 answered on 22 Sep 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)
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
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
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
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?