Telerik Forums
UI for WinForms Forum
4 answers
794 views
How can I change page margins before radGridView.PrintPreview()?
Hristo
Telerik team
 answered on 12 Dec 2016
7 answers
236 views

Hello ,

I am trying to use a radCheckedDropDown list in a winforms application (C#).  The list is working the way I want it to except for 1 thing.

When I click the dropdown list it shows (which is correct) however while it is open if I start to type in the text area the text popup shows in front of the dropdown popup, and as a result you can click through to the drop down list.  What I would like is to close the dropdown portion when typing, and vice versa when using the drop down list. 

If I use a standard combobox I can accomplish this by  hooking the preview and the droppeddown events, however the radcheckeddropdownlist does not have the droppeddown event.

private void comboBox_DropDown(object sender, EventArgs e)

{

ComboBox cbo = (ComboBox)sender; cbo.PreviewKeyDown += new PreviewKeyDownEventHandler(comboBox_PreviewKeyDown);  

}

private void comboBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)

{

ComboBox cbo = (ComboBox)sender;

cbo.PreviewKeyDown -= comboBox_PreviewKeyDown;

if (cbo.DroppedDown) cbo.Focus();

}

 

Thanks,

Jeff

Dimitar
Telerik team
 answered on 12 Dec 2016
1 answer
236 views

I am trying to use the html code generated by the RichTextEditor to embed it in a webpage and I have a problem with the style that the RichtTextEditor generates.

For example an simple "Hello World" creates the html code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >
<html xmlns=>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled</title>
<style type="text/css">
p { margin-top: 0px;margin-bottom: 0px;line-height: 1.15; }
body { font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px; }
.Normal { telerik-style-type: paragraph;telerik-style-name: Normal;border-collapse: collapse; }
.TableNormal { telerik-style-type: table;telerik-style-name: TableNormal;border-collapse: collapse; }
</style>
</head>
<body>
<p class="Normal ">Hello World</p>
</body>
</html>

 

This html code can not be embedded on any web since it is generating styles for <body> and <p> tags. This causes the style sheet itself to change from the original page.I need a simpler code, I would need you to not create any style for the general tags of a web. And just create styles for your own classes as you already do by putting some of the text in bold:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ><html xmlns=>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled</title>
<style type="text/css">
p { margin-top: 0px;margin-bottom: 0px;line-height: 1.15; }
body { font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px; }
.Normal { telerik-style-type: paragraph;telerik-style-name: Normal;border-collapse: collapse; }
.TableNormal { telerik-style-type: table;telerik-style-name: TableNormal;border-collapse: collapse; }
.s_6C8EFA9D { telerik-style-type: local;font-weight: bold; }
 </style>
</head>
<body>
<p class="Normal ">Hello <span class="s_6C8EFA9D">World</span></p>
</body>
</html>

 

Is there any way to do it?

Regards.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Dec 2016
9 answers
173 views
Hello,

I've upgraded today to version 2011.3.11.1116 and I'm experiencing a problem with treeview in existing projects.

I have this code to fill a treeview (for example, depending on the project choose by user):

Private Sub FillTree(Optional selPJerarquiaID As SqlHierarchyId = Nothing)
     treeEstructura.Enabled = False
     treeEstructura.DataSource = Nothing
     treeEstructura.Nodes.Clear()
     treeEstructura.DataSource = oProjects.Estructura.Items
     treeEstructura.Enabled = True
     treeEstructura.ExpandAll()
      
     If Not selPJerarquiaID.IsNull Then
         SelectNode(treeEstructura.Nodes(0).Nodes, selPJerarquiaID)
     Else
         treeEstructura.SelectedNode = treeEstructura.Nodes.First
     End If
 
 End Sub

The first time works fine. The user choose a project and the treeview shows all tasks assigned to this project. But it doesn't work for  second time and it crashed in the sentence treeEstructura.Nodes.Clear raising the next error:

"Object reference not set to an instance of an object"


If I ignored this clear sentence, the treeview is not rebound with the right content, and continues to show the content that belong to the first project.


Thank you in advance

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Dec 2016
3 answers
234 views

Hello,

My company needs filter row to look like the attached image. Instead of the filter textbox to appear when user clicks on the filter cell, they want it always visible and also no filter icon visible. Is there way to achieve this in VirtualGrid ? Your assistance is greatly appreaciated.

Thank you,

Saji.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Dec 2016
3 answers
117 views

I'm not sure exactly which forum/discussion to ask this in. If I'm in the wrong place, I'm sorry.

I've built a WinForms app that I want to display some reports using the ReportViewer. What I want to do is set the palette for these reports using a custom palette class I've added to the WinForms project.

I have the reports in their own project so that if users decide they want a web app I can easily reuse the reports (hopefully).

I don't know how to set the palette on the report and i can't find anything online about how to do this. I know I can go into each report and set the colors individually but that is not efficient or scalable.

My code in the Winforms app to set the report in the ReportViewer is like this...

var reportSource = new ReportsLibrary.MyReport();
reportSource.ReportParameters["MyParam"].Value = value;
myReportViewer.ReportSource = reportSource;
myReportViewer.RefreshReport();

 

I figured out how to use the custom palette with charts within the winforms app like this...

myChart.Area.View.Palette = new CustomPalette();

 

I want to be able to do something similar in the Winforms app. I don't want to have to copy my CustomPalette class over to my ReportsLibrary project.

Is this possible?

I want to be able to do something like...

reportSource.Palette = new CustomPalette();

 

VS2013

Version R3 2016 (2016.3.914.1)

Christine
Top achievements
Rank 1
 answered on 09 Dec 2016
2 answers
130 views

Hi Telerik,

I noticed that, there is no "VirtualGridCheckBoxEditor" class. Not sure why. So I decided to create a check box editor by following Telerik's documented approach. See the code below which is my checkbox editor. However, the checkbox, when the cell is in edit stage, is not rendered at the center of the cell element (see attachment checkboxeditornotcenter.png).

Please assist.

Thank you,

Saj.

 

------------------------Code--------------------------------------------------------------

    public class CoreVirtualGridCheckBoxEditor : BaseVirtualGridEditor
    {
        protected override Telerik.WinControls.RadElement CreateEditorElement()
        {
            var elmnt = new RadCheckBoxElement();
            return elmnt;
        }
        public override void Initialize(object owner, object value)
        {
            base.Initialize(owner, value);
        }
        public override void BeginEdit()
        {
            base.BeginEdit();
        }
        public override Type DataType
        {
            get
            {
                return typeof(bool);
            }
        }
        public override object Value
        {
            get
            {
                RadCheckBoxElement editor = this.EditorElement as RadCheckBoxElement;
                if (editor.CheckState== System.Windows.Forms.CheckState.Checked)
                {
                    return true;
                }
                return false;
            }
            set
            {
                RadCheckBoxElement editor = this.EditorElement as RadCheckBoxElement;
                if (value == null || value.GetType() != typeof(bool))
                {
                    editor.CheckState = System.Windows.Forms.CheckState.Unchecked;
                    return;
                }
                bool val = (bool)value;
                editor.CheckState = val ? System.Windows.Forms.CheckState.Checked : System.Windows.Forms.CheckState.Unchecked;
            }
        }
    }

Saji
Top achievements
Rank 1
 answered on 09 Dec 2016
1 answer
94 views

How can i get Page Up and Page Down functionality in MultiColumnComboBox popup Grid? Its not working right now Down Cursor is working

 

Regards

MSA

Hristo
Telerik team
 answered on 08 Dec 2016
2 answers
68 views

Hello,

i am using the grid view in virtual mode. The columns are populated with data in the CellValueNeeded Event. This works very well.

Now i was trying to add an additional column to the grid that shall be polpulated by the user with data generated by the build in Expression Editor.

The Expression Editor is shown for the column, but i am not sure what to write into the CellValueNeeded Event for this column with the Expression Editor(or if this is even possible)

 

Thank You for Your help.

Regards

Ingo Müller

LIMA Factory
Top achievements
Rank 1
 answered on 08 Dec 2016
4 answers
122 views

Hello, We are licensed customer of Telerik. I am using telerik winforms library version 2016.3.1024.20. I am faced with a problem, as described below.

In the Virtualgrid's EditorRequired event, for a particular cell, I changed the default editor to a new editor like below.

        private void Grid_EditorRequired(object sender, VirtualGridEditorRequiredEventArgs e)
        {
            switch (e.ColumnIndex)
            {
                case 0:
                    {

                        VirtualGridTextBoxControlEditor editor = new VirtualGridTextBoxControlEditor();
                        editor.CharacterCasing = CharacterCasing.Upper;
                        e.Editor = editor;
                    }
                    break;
          }

     }

What happens now is, when I click on the cell, the cell becomes editable, and I can type in it, but I cannot backspace on the cell to delete the characters entered. In addition to that I don't even get the CellValidating event. Besides, the KeyUp event on editor's element (RadTextBoxControlElement) is also not fired.

Could you please help me out? This is urgent because I am running into a pre-Christmas release.

Thank you,

Saji Antony

Dimitar
Telerik team
 answered on 08 Dec 2016
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
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
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?