Telerik Forums
UI for WinForms Forum
13 answers
2.4K+ views
Hello,

How do you get and set the selected index on a RadGridView control.
There is no such thing as .SelectedIndex on the grid.

Thanks,
Stephan
Dimitar
Telerik team
 answered on 30 Oct 2019
2 answers
593 views

Hi

I have tried to rotate the text in the column text as per your instructions on the web but it doesn't work, what am I doing wrong (VB Net)

 

     RadGridView1.ViewCellFormatting += radGridView1_ViewCellFormatting()
        RadGridView1.TableElement.TableHeaderHeight = 90
        RadGridView1.Rows(0).IsSelected = True

 

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Oct 2019
5 answers
1.2K+ views

Hello

I wonder if I make the correct use of the CellFormatting Event:

I have a grid that contains only one line

In the CellFormatting event I modify the cell text as following:

        If cell.ColumnInfo.Name = "licence_type_id" Then
            Dim LicenceType As wsWSTLicence.licence_type = wsLicenceTypes.Find(Function(x) x.id.Equals(cell.Value))
            cell.Text = LicenceType.Code & " (" & LicenceType.Description & ")"
            cell.TextAlignment = ContentAlignment.MiddleCenter
        End If

It works fine, however I realized that the code within the If Statement is called 6 times (which is the number of columns in my grid ..)
Is this normal ?
I would think that if my processing was heavy this would negatively impact the performance.

 

Also what is the difference between then CellFormatting Event and the ViewCellFormatting Event

 

Thanks in advance

Pierre-Jean

pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 28 Oct 2019
2 answers
350 views

Good Morning All,

I am developing an application that has a main Ribbon Form as the base form.

I have added a CrystalDark theme to the form and applied it and everything is displaying as i would expect in the designer.  However when i run the application the control buttons at the top of the form and the ribbon change to a standard default windows buttons. 

I have included before and after images to this post.

Can anyone please assist in how i can get this not to happen and the theme ones to override and always show even at run-time.

Tanks in advanced

Frosty

Luke
Top achievements
Rank 1
Veteran
 answered on 28 Oct 2019
8 answers
468 views

How do I setup a RadTimePicker to allow the user to enter seconds (as well as hours and minutes)?

Thanks,

 -Lou
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Oct 2019
1 answer
609 views

Hello,

Is it any easy way to show enum DisplayValues from enum Description attribute?

public enum ObjectType
    {
        [Description("Textual information in the Html format")]
        TextHtml,
        [Description("Textual information in the Xaml format")]
        TextXaml,
        [Description("Binary Data")]
        Binary
    }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Oct 2019
5 answers
271 views

We're getting a Divide by Zero exception from one of the Telerik components.  We can't track it down.

We create an instance of a COM component which is an old COM dll.  Any time we try to open a form with Telerik controls on it the application crashes with a StackOverflow exception.  I've attached the stack.  This is a really high priority item for us at this point and holding up our release.  :(

Additionally, we can create an instance of the COM component in a test application without any problems whatsoever.

 

************** Exception Text **************
System.DivideByZeroException: Attempted to divide by zero.
   at Telerik.WinControls.UI.RadCommandBarItemsPanel.ArrangeOverride(SizeF arrangeSize)
   at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
   at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
   at Telerik.WinControls.UI.CommandBarStripElement.ArrangeOverride(SizeF finalSize)
   at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
   at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
   at Telerik.WinControls.UI.CommandBarRowElement.ArrangeOverride(SizeF finalSize)
   at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
   at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
   at Telerik.WinControls.Layouts.StackLayoutPanel.ArrangeOverride(SizeF arrangeSize)
   at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
   at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
   at Telerik.WinControls.UI.LightVisualElement.ArrangeOverride(SizeF finalSize)
   at Telerik.WinControls.UI.RadCommandBarElement.ArrangeOverride(SizeF finalSize)
   at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
   at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
   at Telerik.WinControls.RootRadElement.ArrangeOverride(SizeF finalSize)
   at Telerik.WinControls.RootRadElement.ArrangeCore(RectangleF finalRect)
   at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
   at Telerik.WinControls.RadElementTree.PerformInnerLayout(Boolean performMeasure, Int32 x, Int32 y, Int32 width, Int32 height)
   at Telerik.WinControls.RadControl.OnLoad(Size desiredSize)
   at Telerik.WinControls.UI.RadCommandBar.OnLoad(Size desiredSize)
   at Telerik.WinControls.RadControl.LoadElementTree(Size desiredSize)
   at Telerik.WinControls.RadControl.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at Telerik.WinControls.UI.RadFormControlBase.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Oct 2019
11 answers
1.0K+ views

Hi,

we are printing out a PDF through PdfViewer.Print() utilizing a RadPrintDocument for removing the margins (new Margins(0,0,0,0)).

Unfortunately there still seem to be (very small) margins applied during print-out, because when printing the document with an external tool (e.g. Adobe Acrobat Reader) these document borders are much smaller.

Is there anything else we have to consider when printing?

Georgi
Telerik team
 answered on 24 Oct 2019
4 answers
169 views

Hi, I was wondering if someone could help.

I want to create a layout/cardview of a single record, I tried this via layout groups but they don't really fit side by side.

Has this been done before?

Mark
Top achievements
Rank 1
 answered on 23 Oct 2019
4 answers
188 views

Can you explain why you forbid the empty char ?
As far as i can see you can set it in the exposed child element (maskEditBoxElement) and it is handled correctly if set as empty.
I need it as empty, so i'm wondering if i'll run into problems that i currently can not see.

public char PromptChar
{
  get
  {
    return this.maskEditBoxElement.PromptChar;
  }
  set
  {
    if (value == char.MinValue)
      throw new ArgumentException("Specified Character is not valid for this property!");
    this.maskEditBoxElement.PromptChar = value;
  }
}
Tomislav
Top achievements
Rank 1
 answered on 23 Oct 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
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?