Telerik Forums
UI for WinForms Forum
2 answers
288 views

Hello,

Is there a way to have RadDataEntry controls read only? I know I can set Enabled =False for the whole RadDataEntry control but i"d like to limit it for some users while allow others to make changes. Also, users with read only access should be able to copy RadDataEntry controls values which is not the case for Enabled=False scenario.

Any clue is appreciated.

Thanks

Wojciech

Dimitar
Telerik team
 answered on 09 Oct 2017
1 answer
209 views

Hello, 

how can I change the "GridViewPdfExport.PageSize Property" from Default 210 x 297 mm to Din A 4 Landscape 297 x 210 mm?

Namespace "Telerik.WinControls.Export" is imported.

Using PdftoExport is not an option because I need the header feature. 

I am using VB.Net.

Thanks in advance,

F. Schulze

Dimitar
Telerik team
 answered on 09 Oct 2017
4 answers
334 views

hi ,

I want my binding data source to update or refresh after adding a new record to the database.When I add one it won't update till closing and re-opening the form.

Sina
Top achievements
Rank 1
 answered on 07 Oct 2017
1 answer
174 views

I would like the Ribbonbar to always appear collapsed even when I select some of the tabs on it.  I want to be able to expand it only when certian criteria are met.

So far I have been unable to get the ribbonbar to start off Collapsed, nor can I get it to remain collapsed.

 

Please Advise

 

Thanks

 

Jason

Dimitar
Telerik team
 answered on 06 Oct 2017
4 answers
167 views

I have a RadSplitbutton with 6 subitems.    When I click on the arrow, I expect the dropdown menu to be displayed, instead it is first firing the click event of the button, then displaying the menu.  This is not what I wan to happen!

How to I prevent this from happening when trying to select the Arrow?

 

Thanks

 

Jason

 

 

Dimitar
Telerik team
 answered on 06 Oct 2017
1 answer
217 views

Grid is cleared and then Loaded with data. User selects "new row" and the system puts them on a specific cell. User enters a value and TABS or ENTERS. Then does other tasks. User returns to the grid which is again cleared and then Loaded with data. The user selects "new row" and the system puts them on a specific cell, which is prepopulated with the previous value entered. 

>>> Would like not to have the new row cell pre-populated 

 

Steps:

1. Add a value to a cell (a) on a new grid row and commit it.

2. Perform other tasks on the form

3. Return to the Grid in (1) and open a new row. 

> The value from (1) is set as the default for the cell (a)

Although I clear the grid before repopulating, I haven't been able to remove this default (previous) value. 

 

Just before I Load the grid:  

dgvItems.Rows.Clear()

 

 

Any ideas how to prevent it from pre-populating? 

 

 

 

 

 

 

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Oct 2017
1 answer
115 views

Hi,

I'm working on a project where I need to display data in Telerik RadGridView.

One of the column is going to display icons (can be multiple, displayed horizontally). These icons will be provided from .resx file of the project.

I was exploring custom column, tried creating custom column with RadPanelElement assuming that I'll be able to add picturebox windows control to the RadPanelElement object like

protected override void SetContentCore(object value)
        {
            if (this.Value != null && this.Value != DBNull.Value)
            {
                //this.radProgressBarElement.Value1 = Convert.ToInt16(this.Value);
                //this.radImageList
                foreach(string strImgIndex in this.Value.ToString().Split(','))
                {
                    PictureBox pbIcon = new PictureBox();
                    switch (int.Parse(strImgIndex))
                    {
                        case 0:
                            pbIcon.Image = WindowsFormsApplication1.Properties.Resources.binoculars;
                            break;

                        case 1:
                            pbIcon.Image = WindowsFormsApplication1.Properties.Resources.open;
                            break;

                        case 2:
                            pbIcon.Image = WindowsFormsApplication1.Properties.Resources.printer;
                            break;
                    }

                    //this.radImageList.Controls.Add (NOT ABLE TO ADD CONTROLS DYNAMICALLY)
                    //pbIcon.Image = Image.
                }
            }

It didn't work as not able to add controls to RadPanelElement. Please provide a way out to achieve the required custom column.

Thanks & Regards

Brajendra Singh

 

Lance | Senior Manager Technical Support
Telerik team
 answered on 05 Oct 2017
5 answers
458 views

Hello,

I have a grid view with a cell containing either a TextBox which is ReanOnly or a ComboBox for which the user has to select a value.

The arrow button of ComboBox cell is only visible when user clicks on cell to edit it. Thus, the user does not know if he has to select or not a value

I'd like that the arrow button of ComboBox cell is always visible to indicate to user that a value has to be selected.

I've tried to set the visibility of arrow button in EditorRequired event but it has no effect.

        void QualityControlsEntryGridView_EditorRequired(object sender, EditorRequiredEventArgs e)
        {
            if (QualityControlsEntryGridView.Columns["Result"].IsCurrent)
            {
                if (QualityControlsEntryGridView.CurrentRow.Cells["ReferenceValueToType"].Value.ToString() != "")
                {
                    e.Editor = new RadTextBoxEditor();
                    e.EditorType = typeof(RadTextBoxEditor);
                }
                else
                {
                    e.Editor = new RadDropDownListEditor();
                    e.EditorType = typeof(RadDropDownListEditor);
                    RadDropDownListEditorElement editorElement = (RadDropDownListEditorElement)((RadDropDownListEditor)e.Editor).EditorElement;
                    editorElement.ArrowButton.Visibility = ElementVisibility.Visible;
                }
            }
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Oct 2017
17 answers
644 views
I have a Grid that is editable by the user and I've got almost everything working. The problem I've run into is that I have this grid on a form that the user can click a button on and close the form. If the user clicks on a textbox column and edits the value, then clicks directly on the "Ok" button to close the form, the data is not validated via the RowValidating event.

Both the CellFormatting event is called, but apparently the RowValidating event isn't and neither is the CellEndEdit event. However, the DataTable that the grid is bound to is updated properly. For the time being, what I'm doing is rebinding the DataTable to the grid. This works in some cases, but I end up doing my validation after the data has been saved into the DataTable, and by that point it's too late and messes up my data.

Is there a way for me to manually fire the Validation code? I don't see an easy way to force it to be called in a way that is going to intercept something like this because it seems to bypass all of my validation code.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Oct 2017
3 answers
133 views

Hi all,

some time ago starting from some code I found here, I wrote a method to add a button in a dropdownlist (I have used a label with an image instead of a button), it seems to work fine but if I use it with a dropdownlist that is contained in a RadWizard or RadTreeView page, the button is shown only if that page is the selected page when the form is loaded, but is not shown when I click on a Tab move to the page that contains the dropdownlist.

I usually add call the method in the Load event of the form, but I've tried tu use other events with effects.

 

This is the method :

 

        public static void ButtonizeDropDown(RadDropDownList ddlistControl, EventHandler OnClick, out RadLabelElement btnElement) {
            btnElement = null;
            EventHandler onLabelElementClicked = (object s, EventArgs ea) => { ddlistControl.SelectedIndex = -1; };
            if (OnClick != null) onLabelElementClicked = (object s, EventArgs ea) => { OnClick(ddlistControl,ea); };
            ddlistControl.BeginInit();
            RadLabelElement lbl = new RadLabelElement();
            btnElement = lbl;
            lbl.Click += onLabelElementClicked;
            lbl.Margin = new Padding(0, 0, 0, 0);
            lbl.AutoSize = false;
            lbl.Text = "";
            lbl.Tag = ddlistControl;
            lbl.Image = new Bitmap(global::K2O.UI.Properties.Resources.Delete_Thin_BW_UltraLight_12);
            lbl.ImageAlignment = ContentAlignment.MiddleCenter;
            lbl.TextAlignment = ContentAlignment.MiddleCenter;
            lbl.TextImageRelation = TextImageRelation.Overlay;
            lbl.Alignment = ContentAlignment.MiddleCenter;
            ddlistControl.DropDownListElement.EditableElement.ShouldPaint = false;
            RadDropDownTextBoxElement textBoxElement = ddlistControl.DropDownListElement.EditableElement.TextBox;
            RadTextBoxItem textboxitem = textBoxElement.TextBoxItem;
            ddlistControl.DropDownListElement.EditableElement.TextBox.Children.Remove(textboxitem);
           
            lbl.Size = new System.Drawing.Size(textBoxElement.Size.Height, textBoxElement.Size.Height);
            StackLayoutElement stackPanel = new StackLayoutElement();
            stackPanel.Orientation = Orientation.Horizontal;
            stackPanel.Margin = new Padding(0, 0, 0, 0);
            stackPanel.Size = lbl.Size;
            stackPanel.Children.Add(lbl);
            DockLayoutPanel dockPanel = new DockLayoutPanel();
            dockPanel.Size = lbl.Size;
            dockPanel.Children.Add(stackPanel);
            dockPanel.Children.Add(textboxitem);
            DockLayoutPanel.SetDock(textboxitem, Dock.Right);
            DockLayoutPanel.SetDock(stackPanel, Dock.Left);
            ddlistControl.DropDownListElement.EditableElement.TextBox.Children.Add(dockPanel);
            if (ddlistControl.DropDownStyle == RadDropDownStyle.DropDownList) {
                textboxitem.ReadOnly = true;
                ddlistControl.DropDownListElement.EditableElement.TextBox.Visibility = ElementVisibility.Visible;
                ddlistControl.DropDownListElement.EditableElement.TextBox.Enabled = true;
                lbl.Enabled = true;
                lbl.Visibility = ElementVisibility.Visible;
            }
            //Per fare in modo che tutti gli elementi del controllo acquistino lo stesso stato (Enabled/Disabled) del controllo stesso;
            ddlistControl.Enabled = !ddlistControl.Enabled;
            ddlistControl.Invalidate();
            ddlistControl.Enabled = !ddlistControl.Enabled;
            ddlistControl.EndInit();
        }

 

can you please tell me what I must change to have it work in every page of a RadPageView or RadWizard ?

 

Thanks

 

 

Dimitar
Telerik team
 answered on 05 Oct 2017
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?