Telerik Forums
UI for WinForms Forum
1 answer
372 views
RadTextbox  by Default text should be highlight or selected
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Mar 2022
1 answer
1.2K+ views

Hi

After fetching information from the database and performing calculations, I want to add the information to the data grade view.
I have already made the columns based on the data type
I get this error when running the program:

"Rows can not be add programmatically added to the rad radgridview's  Rows collection when the control is data-bound"

This error does not always occur and it happens by accident

Whatever I searched for, I did not find the reason

Maybe my solution to this is wrong

Thank you in advance for your support

 

This code snippet is inside a loop and may run hundreds of times :

var item = new GridViewDataRowInfo(dailyGridView.MasterView);

                        if (dailyGridView.Columns.Any(c => c.Name == "Code"))
                            item.Cells["Code"].Value = personelInfo.First().Code;
                        if (dailyGridView.Columns.Any(c => c.Name == "FirstName"))
                            item.Cells["FirstName"].Value = personelInfo.First().FirstName;
                        if (dailyGridView.Columns.Any(c => c.Name == "LastName"))
                            item.Cells["LastName"].Value = personelInfo.First().LastName;
                        if (dailyGridView.Columns.Any(c => c.Name == "Date"))
                            item.Cells["Date"].Value = PersianDateTime.FromDateTime(report.Date).ToShortDateString();
                        if (dailyGridView.Columns.Any(c => c.Name == "DayName"))
                            item.Cells["DayName"].Value = PersianDateTime.FromDateTime(report.Date).DayName;
And more line ...


dailyGridView.Rows.Add(item);

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Mar 2022
1 answer
141 views

I'm using the RadSpreadProcessing library to import Excel files, process them, and export back out.

I come across an issue when cells have complex formulas.

These complex formulas have dependencies on other cell values which those values get set (SetValue(...) method) while processing the worksheet after its been imported.

When I try to get the cell value of the complex formula using this call:

cellSelection.GetValue().Value.GetResultValueAsString(cellSelection.GetFormat().Value)

it returns me a value of #NAME?.

When I try to get the value of the complex formula using this call:

cellSelection.GetValue().Value

I noticed a ResultValueType of Error.

But when the workbook is exported back out the cells do not contain #NAME? in them. They contain the correctly auto-calculated values.

In the attached ComplexFormulaIssue.PNG, Row 1 column A value gets set while processing the worksheet using the SetValue(...) method (set it from NX: 12 to 12 for example).

Row 1 Column B formula depends on Row 1 column A value (which works fine since it's an easier formula I guess. No issue here).

Row 1 Column C and D are normal text values.

Row 1 Column E has a complex formula that has dependencies to all the other cell values (this is the one that gives me issues).

I attached 2 other PNGs as examples of formulas I used in Row 1 Columns B and E.

Vladislav
Telerik team
 answered on 09 Mar 2022
1 answer
122 views

In our application, we were using the standard windows CheckBox.

We have an Overrides onkeypress to trap the ENTER key and send a TAB (so enter moves to the next field on the form). This works great, and for the user to toggle a checked/non-checked state, the space bar is hit.

When using the RadCheckBox, the space bar still changes the checked state, but also when i hit ENTER, it changes the checked state and moves to the next field. 

I do not want it to change the checked state on the ENTER, i only want it to move to the next field.

Thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Mar 2022
1 answer
268 views

Hi

I need floating labels in RadTextBox and RadDropDownList using telerik winforms.

Telerik has this feature implemented in their Floating Labels in kendo.react library for various controls.

However I'm using Telerik UI for Winforms R2 2020 which does not support this. In R2 2021 Telerik has added support only for floating labels Floating Labels in RadTextBox/RadTextBoxControl but not for RadDropDownList. I can't upgrade to R2 2021.

I need some customization tips to implement floating labels in both RadTextBox and RadDropDown using Telerik Winforms

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Mar 2022
1 answer
111 views

Hi!


I think we have a problem with Telerik RadGridView.



We are using RadGridView with several columns (GridViewTextBoxColumn and GridViewDecimalColumn).

Every column has a concrete header text which is localized.
Every time we have tried adding a new column somewhere in the middle of the collection, Telerik RadGridView shifts all the columns that follow the inserted column by one place. It means that we have to change the translation for those shifted columns after each addition, and it is very frustrating and sometimes our translation was messed up. The same situation is with removing columns.


Do you have any knowledge about the described behavior?
Do you know how can I avoid shifting columns, and thus changing the translation?


Thank you for the answer in advance!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Mar 2022
1 answer
183 views

Using VS2019 and 2022.1.228.40 of Telerik.  How do I change both the Hover color and Selected color of the expand button from yellow/dark yellow to colors of my choice?

I found this post that looks like what I want.  But when I try the code in the ViewCellFormatting event, I get an error that SignStyle is not a member of GridGroupExpanderCellElement.

 

Thanks for your help.

R.D. Henry and Co.
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 03 Mar 2022
1 answer
426 views

We use Telerik UI for Winforms extensively in our Windows application.  We have migrated almost all of our UI to use Telerik UI for Winforms but we were using a 2014 release of Telerik.  Last month we updated to the latest (Q1 2022) Telerik UI for Winforms and began converting the last 3 major tree controls in our UI to use the RadTreeView.  The biggest of these tree controls can have a lot of nodes.  Some of our customers will exceed 750000 nodes in their installations.

We have found that when sorting is enabled, especially our custom sort which is necessary for our implementation, the tree control takes a VERY long time to load and also a very long time to repopulate when a leaf node with its children is removed and then re-added.  Of note when we remove/re-add a leaf node is that if I put a breakpoint into our NodeComparer implementation I see that many nodes from all over the tree are being compared.  The comparisons include nodes that are at the root of the tree and were not affected since the node(s) removed were 4 or 5 levels down and restricted in scope to just one sub-collection.  I am very surprised that the RadTreeView re-sorts ALL of the tree nodes rather than just the nodes in the affected collection?

Are there ways to restrict sorting to just the collection affected by the addition/removal of a node?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Mar 2022
1 answer
665 views

Hello, 

My question is: How can I hide the on hover highlighting and also when the user clicks on an item highlighting? I just want a flat color with no highlighting on hover and on clicking? I have tried the .ListViewElement.ViewElement.HighlightColor but that doesn't seem to work. 

Thank you for helping. 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Mar 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?