Telerik Forums
UI for WinForms Forum
1 answer
202 views

Lets say I added a row, and a required field is missing, so I alert the user, I want to keep the values the same, but after the alert values disappear. Here is the code, how i tried to return values

 

01.if (!String.IsNullOrEmpty(newItem.stCountryName))
02.                dr.Cells["column1"].Value = newItem.stCountryName;
03.                //((CountryTable)dr.DataBoundItem).stCountryName = newItem.stCountryName;
04.            if (!String.IsNullOrEmpty(newItem.stCountryCode))
05.                ((CountryTable)dr.DataBoundItem).stCountryCode = newItem.stCountryCode;
06.            if (newItem.nCodeLen != null)
07.                ((CountryTable)dr.DataBoundItem).nCodeLen = newItem.nCodeLen;
08.            if (newItem.nRegionID != null)
09.                ((CountryTable)dr.DataBoundItem).nRegionID = newItem.nRegionID;
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Jun 2019
1 answer
273 views

Hi,

I am using the RadMenu and my menu is dynamically created using a database.  The user can select a default start up form and I need to search though the menuitems with recursion to find that startup item and then perform the click event on that menu item.

In the windows menu I was able to do this this.mainMenu.Items.Find(reportID, true).  How can I do this on the menu items?

Thanks,

Tim

Nadya | Tech Support Engineer
Telerik team
 answered on 14 Jun 2019
2 answers
96 views

hi

in  my grid i have a column decimal but I want to remove zero after float . 750.000 -> 750

when i use FormatString = {G} or {N0}  occur exception

moj
Top achievements
Rank 1
 answered on 14 Jun 2019
10 answers
159 views
I'm having problems printing the scheduler with all resources on it.  I have a day view scheduler with 6 resources.  you can see 4 on the screen and then have to scroll right to see the other 2.  
when i print the scheduler i have 2 issues. 
1.  only the visible page of the first 4 resources show on the printout.  I need all 6
2.  how do i get the actual resource columns to show on the printout?  right now i only see the appointments.

Thanks!
Hristo
Telerik team
 answered on 13 Jun 2019
1 answer
118 views

There are three elements that are grouped.
The customer demanded that, when pressed again, the selection was removed.
Hung on the event items Click and wrote

but the selection does not disappear. How to fix?

if(radiobutton)
    radiobutton.isChecked = false
else
    radiobutton.isChecked = true
Вадим
Top achievements
Rank 1
Iron
Iron
 answered on 13 Jun 2019
8 answers
489 views

What is the proper way to insert text with specified font in any place in measured document? I have tried with the following code but it does not set the font if just right of the caret is space, and it changes the font of the whole word if the caret is in the middle of the word.

var editor = new RadDocumentEditor(radRichTextEditor1.Document);
editor.ChangeFontFamily(new Telerik.WinControls.RichTextEditor.UI.FontFamily("Times New Roman"));
editor.Insert("ABC");

 

 

Tanya
Telerik team
 answered on 12 Jun 2019
1 answer
182 views

Hi,

1) I have a custom grid column/cell based on the examples

protected override void CreateChildElements()
{
    base.CreateChildElements();
 
    this._stackElement = new StackLayoutElement();
    this._stackElement.StretchHorizontally = true;
    this._stackElement.StretchVertically = true;
 
    this._textElement = new LightVisualElement();
    this._textElement.StretchHorizontally = true;
    this._textElement.StretchVertically = true;
    //this._textElement.Padding = new Padding(0, 0, 5, 0);
 
    this._imageElement = new LightVisualElement();
    this._imageElement.ImageAlignment = System.Drawing.ContentAlignment.MiddleRight;
    this._imageElement.ImageLayout = ImageLayout.Center;
    this._imageElement.Size =
    this._imageElement.MaxSize = new System.Drawing.Size(20, 20);
    this._imageElement.StretchHorizontally = false;
    this._imageElement.StretchVertically = true;
    this._imageElement.Click += (o, e) =>
    {
        if (this.Enabled)
            ...
    };          
 
    _stackElement.Children.Add(_textElement);
    _stackElement.Children.Add(_imageElement);
 
    this.Children.Add(_stackElement);
}

 

Now the problem is, the sender in the grid OnToolTipTextNeeded is the LightVisualElement from the textElement/imageElement and not the cell it self (compared to the other "normal" columns)

I know that I get the cell over the Parent.Parent from the LightVisualElement but is there a simpler / more generic way? 

 

2) Also is with the StackLayoutElement, is there any way that the image element would be the last to hide if the column width is to small (see attached images) 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Jun 2019
0 answers
87 views

Hi, Dess | Tech Support Engineer, Sr.

    I am using spreadsheet, I don't want someone else to edit the cell when I import  the xlsx.

One idea I've come up with is to protect worksheets,  but it would pop up and it didn't seem to release the mouse event.

 you can look  the attachment file,I don't want to use "protect", what should i do?

 

jiang
Top achievements
Rank 1
 asked on 12 Jun 2019
8 answers
1.0K+ views

Two questions:

1] How to make a column cells look like and act like buttons?

2] How to then capture when the user clicks on the button in the cell?

 

In my old code I would have something like:

.Columns("Do It").Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button

Looking for the equivilent to that and then how to capture the click event.

 

Thanks

Deasun.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Jun 2019
1 answer
255 views

Hi,

I am trying to create a notification badge on my menu items to show when there is something new that needs the users attention.  I have used the examples  found here but I can't seem to get it to work right.  https://www.telerik.com/support/kb/winforms/buttons/details/notification-button

Can you please supply some sample code to get this to work.

Thanks,

Tim Larson

Nadya | Tech Support Engineer
Telerik team
 answered on 12 Jun 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)
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
CheckedDropDownList
ProgressBar
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
NavigationView
VirtualKeyboard
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?