Telerik Forums
UI for WinForms Forum
1 answer
120 views

I m using MultiColumn ComboBox in my application, the problem is I cannot change its default theme.

I tried this,

ThemeResolutionService.ApplicationThemeName = "Aqua";

and also tried,

MyColumnComboBox.ThemeName = "Aqua";

but still I can see the default theme. why it is overriding with the default theme. Please help me.

Hristo
Telerik team
 answered on 25 May 2016
2 answers
75 views

Hello,

 

if I print cells with HTMLRendering the text aligns to the top left of the cell and something equivalent to padding 0;0;0;0 is used. How do you fix that?

 

private void BestFitRadGridView_PrintCellFormatting(object sender, PrintCellFormattingEventArgs e)
       {
           e.PrintCell.Font = new Font(e.PrintCell.Font.FontFamily, 7F);
           e.PrintCell.EnableHtmlTextRendering = !e.Column.DisableHTMLRendering;
           e.PrintCell.TextPadding = new Padding(5);
         
       }

If i set EnableHtmlTextRendering = false the padding (set in the printstyle or on cell-level) is used as expected.

 

 

Kind regards,

Andreas

Andreas Haeusler
Top achievements
Rank 2
 answered on 25 May 2016
1 answer
66 views

//GanttView PreviewDragStart

private void DragDropService_PreviewDragStart(object sender, PreviewDragStartEventArgs e)
{

if (e.DragInstance is GanttViewTaskElement)
      {
        e.CanStart = true;  

//want to get start and end datetime
      }

}

From above event how can i get Start and End datetime from e.DragInstance

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 May 2016
4 answers
305 views
I'm trying to display a struct in a RadPropertyGrid (similar to the "Padding" item in the "First Look" example), but for some reason items in the struct is not displayed as an expandable item like in the "First Look" example. Instead, the value of my PropertyStoreItem is just set to a string containing namespace of my struct (see the attached screenshot). Here is the struct I'm trying to use:

namespace DSI.WorkFlow
{
    struct SearchItem
    {
        string fromField;
        string toField;
 
        [Description("Search value.")]
        [Category("Search Fields")]
        [DefaultValue(null)]
        [Browsable(true)]
        public string FromField
        {
            get
            {
                return this.fromField;
            }
            set
            {
                this.fromField = value;
            }
        }
 
        [Description("Search value.")]
        [Category("Search Fields")]
        [DefaultValue(null)]
        [Browsable(true)]
        public string ToField
        {
            get
            {
                return this.toField;
            }
            set
            {
                this.toField = value;
            }
        }
    }
}


Do you have any idea what I'm missing?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 May 2016
1 answer
117 views

I use the following code in print, but logo is not displayed:

RadPrintDocument document = new RadPrintDocument();
document.Logo = pictureBox1.Image;
document.RightHeader = "Right header";
document.AssociatedObject = grid;
RadPrintPreviewDialog preview = new RadPrintPreviewDialog(document);
preview.Show();

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 May 2016
3 answers
114 views

Dear Telerik,

I have RadPivotGrid and a RadChartView,

on formload, I have

           this.radChartView2.DataSource = this.radPivotGrid1;

and everything works fine.

However, I want the chart to appear on chartview automatically when the  form loads instead of having to select the data on the PivotGrid manualy using mouse.

I was trying to prgramatically use a method like selectall to force the chart to appear on the chartview but aparently there is no selectAll method in RadPivotGrid.

Your help is highly appreciated.

Thanks.

 

 

Stefan
Telerik team
 answered on 25 May 2016
1 answer
109 views

Hello.

I'm using VirtualGrid as a calendar with months as columns and days as rows. The default selection mode is row-wise. I'd like to change it column-wise.

Let's say I select a range in the grid from 1st of feb (rowindex 0, columnindex 1) to 2nd of march (row 1, col 2). The selected cells are (0,1) (0,2) (1,1) (1,2). In my grid the selected cells should be (0,1) to (0,28) (1,1) (1,2).

I tried to implement the SelectionChanging event but I didn't got it working. Neither the actual selection is canceled nor the new selection is executed.

    Private Sub RadVirtualGrid1_SelectionChanging(sender As Object, e As VirtualGridSelectionChangingEventArgs) Handles RadVirtualGrid1.SelectionChanging

        If e.SelectionAction = VirtualGridSelectionAction.ExtendSelection Then
            If RadVirtualGrid1.Selection.SelectedRegion.Left <> RadVirtualGrid1.Selection.SelectedRegion.Right Then
                e.Cancel = True
                Dim first_top As Integer = RadVirtualGrid1.Selection.SelectedRegion.Top
                Dim last_bottom As Integer = RadVirtualGrid1.Selection.SelectedRegion.Bottom

                Dim curr_top As Integer = first_top
                Dim curr_bottom = ROW_OFFSET + 31
                For col As Integer = RadVirtualGrid1.Selection.SelectedRegion.Left To RadVirtualGrid1.Selection.SelectedRegion.Right
                    RadVirtualGrid1.Selection.BeginSelection(curr_top, col, RadVirtualGrid1.Selection.SelectedRegion.ViewInfo, True)
                    RadVirtualGrid1.Selection.ExtendCurrentRegion(curr_bottom, col)

                    curr_top = ROW_OFFSET
                    If col = RadVirtualGrid1.Selection.SelectedRegion.Right - 1 Then
                        curr_bottom = last_bottom
                    End If
                Next

            End If
        End If

    End Sub

Best regards,

Ronald

Dimitar
Telerik team
 answered on 25 May 2016
1 answer
154 views

using the Drag Drop Service i cant get the e.HitTarget to return true no matter what propertygrid reference i use must be missing something here.

basically i just want to recreate the propertygrid items when a GridDataRowElement is dragged onto a propertygrid.

 

private void svc_PreviewDragOver(object sender, RadDragOverEventArgs e)
{

if (e.DragInstance is GridDataRowElement)
{
e.CanDrop = e.HitTarget is PropertyGridElement;
}
}

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 May 2016
1 answer
556 views

I use the following code to display a tooltip. My problem is that I cannot set the tooltip maximum width. How can I do this?

GridDataCellElement cell = sender as GridDataCellElement;
if (cell != null && cell.ColumnInfo.Name == "MessageText")
{
    e.ToolTip.OwnerDraw = true;
    e.ToolTip.Draw += ToolTip_Draw;
    e.ToolTip.AutoPopDelay = int.MaxValue; // 24.86 days
                 
    e.ToolTipText = cell.Value.ToString();
}
 
void ToolTip_Draw(object sender, DrawToolTipEventArgs e)
{
    e.Graphics.FillRectangle(SystemBrushes.Info, e.Bounds);
    e.DrawBorder();
    e.DrawText(TextFormatFlags.RightToLeft | TextFormatFlags.Right);
}

GridDataCellElement cell = sender as GridDataCellElement;
if (cell != null && cell.ColumnInfo.Name == "MessageText")
{
    e.ToolTip.OwnerDraw = true;
    e.ToolTip.Draw += ToolTip_Draw;
    e.ToolTip.AutoPopDelay = int.MaxValue; // 24.86 days
                
    e.ToolTipText = cell.Value.ToString();
}
void ToolTip_Draw(object sender, DrawToolTipEventArgs e)
{
    e.Graphics.FillRectangle(SystemBrushes.Info, e.Bounds);
    e.DrawBorder();
    e.DrawText(TextFormatFlags.RightToLeft | TextFormatFlags.Right);
}
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 May 2016
1 answer
113 views
Best Regard


I need to know if a radgridview can be detected when the rows or columns are hidden when user do scroll. Something like a TopLeftChange Event


Thanks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 May 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
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
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
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?