Telerik Forums
UI for WinForms Forum
3 answers
128 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
139 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
98 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
72 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
133 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
2 answers
544 views

I really like the waiting bar indicator on Virtual Grid as seen here http://docs.telerik.com/devtools/winforms/virtualgrid/busy-indicators

But, I can't seem to find this funtionality on a regular RadGridView. Is that possible?

Pavel
Top achievements
Rank 1
 answered on 07 Dec 2016
3 answers
207 views

Hello.

I need to extend RadTextBoxControl element by inheritance. Basically I need to add IsRequired property (this is simple).

Next I need to be able to see the control in Visual Style Builder and define how it will look when this IsRequired property is set to true.

 

I could not get this information from documentation.

Thank you!

Dimitar
Telerik team
 answered on 07 Dec 2016
2 answers
182 views
I downloaded the VirtualRadGridView example from here and am setting the VirtualDataSource to a DynamicList class I created that provides records via Load-On-Demand. The DynamicList is a generic list. The VirtualRadGridView is auto generating columns based on properties from the generic type of the DynamicList, even if I set AutoGenerateColumns = false. In the constructor for the RadForm, I'm creating the VirtualRadGridView, clearing the columns, and adding one column. But when the RadForm displays the Grid, it shows the auto-generated columns without the column I added. I found that when the VirtualRadGridView is Initialized, the method InitializeColumns() is called which enumerates all the ItemsSource.BoundProperties and replaces columns starting at index 0. I'm assuming I should insert an if statement to check if AutoGenerateColumns = false and return if so in the InitializeColumns(), but am unsure and wondering if there was a reason the method was designed the way it is or if this was just a simple overlook.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Dec 2016
6 answers
331 views
How changing text "Grand Total"?
Dimitar
Telerik team
 answered on 06 Dec 2016
2 answers
696 views

Hello,

i use a DateTimePicker for my application to select a day. The selection is inside a very narrow time Intervall (1 - 3 Days). So i set the MinDate and MaxDate of the DateTimePicker accourdingly. When the Intervall is lager than 1 day the DateTimePicker works correctly. When the MinDate and the MaxDate is equal (only one day available, date cannot be changed) the display of the DateTimePicker is not correct:

Only the days before the actual date are grayed out.

It is possible to switch to different month / years (after teh actual date) with the build in functions.

Nevertheless is it not possible to select another day (which is good), but the user might get confused that his selection does not change the date.

Please confirm this behaviour and please provide a workaround for this behaviour.

Thank You.

Kind Regads

Ingo Müller

LIMA Factory
Top achievements
Rank 1
 answered on 06 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)
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?