Telerik Forums
UI for WinForms Forum
3 answers
243 views

I am customizing a tile being put into a Panorama.  I want some text to the lower part of the tile.  I've done this by creating a "LightVisualElement" and adding it to the tile's children... I then add a RadLabelElement to that VisualElement and set it's text.  I would like that ext to be centered to the lower middle of the tile, however nothign I can do can make this happen.

 

I am setting the VisualElement's alignment to BottomCenter, and tried the same with the RadLabelElement.  Any suggestions would be greatly appreciated.

 

LightVisualElement lowerElement;

lowerElement.Alignment = ContentAlignment.BottomCenter;

lowerElement.StretchHorizontally = true;​

tile.Children.Add(lowerElement);

RadLabelElement deviceInfo = new RadLabelElement();

deviceInfo.StretchHorizontally = true;

deviceInfo.TextAlignment = ContentAlignment.BottomCenter;​

deviceInfo.Alignment = ContentAlignment.BottomCenter;​

lowerElement.Children.Add(deviceInfo);

etc.... none of that helps.

Dimitar
Telerik team
 answered on 14 Aug 2015
2 answers
132 views

If you have a look at http://www.telerik.com/help/winforms/gridview-grouping-basic-grouping.html, it talks about the grouping feature that comes with the RadGridView.

I would like to know if there is an event that fires when the user removes a group (clicks on the X in the top right corner of a group). Is there such an event?

Gibran
Top achievements
Rank 1
 answered on 13 Aug 2015
1 answer
119 views

Hello,

Please see the attached screen shot. It shows 2 ChartView in which the pies are not aligned. The reason is that the text in the legends on the right are not the same width. Therefore the purple pie chart gets pushed over more to the left than the red one. The goal is to get them aligned.

One solution that was offered to me was to set the legend position to "bottom", but this isn't feasible to us since we want to minimize the height of the splitpanel as much as possible and adding the legend to the bottom will only increase the height.

What I'd really like is to have a way of setting the absolute position of the pie charts. I'm wondering if this is possible. Is it? Is there another solution?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Aug 2015
1 answer
117 views

Hi,

By default the Design view of the RadMarkupEditor has no horizontal and vertical scrollbar. By using the following code, I was be able to show the scrollbars:

 

oDesignView = mEditor.GetType().GetField("designView", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(mEditor) as WebBrowser;

oDesignView.ScrollBarsEnabled = true;

 

However, it has a side effect which I find rather annoying.​ See the screenshot in attachment to see the effect. The vertical scrollbar appears next to the "default" scrollbar. For the horizontal scrollbar there is no such problem. Is this a known issue and is there a way to avoid this behavior?

Thanks,

Tom

Stefan
Telerik team
 answered on 13 Aug 2015
9 answers
143 views
hi, i have created a Custom Appointment Class inherit Telerik.Appointment Class

Public Class CustomAppointment
    Inherits Telerik.WinControls.UI.Appointment
    Public Sub New()
        MyBase.New()
    End Sub

    Private _Visitato As Boolean = False
    Private _Ordine As Boolean = False



    Public Property Visitato() As Boolean
        Get
            Return Me._Visitato
        End Get
        Set(ByVal value As Boolean)
            If Me._Visitato <> value Then
                Me._Visitato = value
                Me.OnPropertyChanged("Visitato")
            End If
        End Set
    End Property


    Public Property Ordine() As Boolean
        Get
            Return Me._Ordine
        End Get
        Set(ByVal value As Boolean)
            If Me._Ordine <> value Then
                Me._Ordine = value
                Me.OnPropertyChanged("Ordine")
            End If
        End Set
    End Property
End Class

But when i try to modify an appointment the TryCast between my object and telerik appointment return always nothing

Protected Overrides Sub LoadSettingsFromEvent(ByVal ev As IEvent)
        MyBase.LoadSettingsFromEvent(ev)

        Dim CustomAppointment As CustomAppointment = TryCast(ev, CustomAppointment)
        If CustomAppointment IsNot Nothing Then
            Me.Visitato_chk.Checked = CustomAppointment.Visitato
            Me.Ordine_chk.Checked = CustomAppointment.Ordine
        End If
    End Sub









Deo
Top achievements
Rank 2
 answered on 13 Aug 2015
5 answers
634 views
I am trying to enable copying from a GridView to paste into other programs, but I'm encountering multiple problems.

I have a GridView with MultiSelect = True, SelectionMode = FullRowSelect, and ClipboardCopyMode = EnableAlwaysIncludeHeaderText (though the same problems occurs with EnableWithoutHeaderText).

Problem #1:
When I select a single row, only the current cell is copied. It is pasted as: ColumnHeader<CrLf>CellValue

Expected result: Whole row should be copied.

Problem #2:
When I select multiple rows, copy and paste into another program (I've tried Notepad++ and Excel), the rows are all pasted as a single line. There are tab characters between the cell values, but no newline characters. Instead there is a tab character between the rows. This makes it impossible to paste into Excel -- all values are pasted into a single cell.

Expected result: Tabs between cells, newline between rows.

Problem #3:
To combat the above, I've tried capturing the "Copying" event to roll my own clipboard function:

Private Sub GridClipboardPrep(sender As System.Object, e As Telerik.WinControls.UI.GridViewClipboardEventArgs) _
    Handles GVComputerSearch.Copying
 
    Dim copyStr As String = ConvertSelectedDataToString(sender)
    Clipboard.SetText(copyStr)
End Sub
 
Private Function ConvertSelectedDataToString(grid As RadGridView) As String
    Dim strBuild As New System.Text.StringBuilder()
 
    Dim row As Integer = 0
    While row < grid.SelectedRows.Count
        Dim cell As Integer = 0
        While cell < grid.SelectedRows(row).Cells.Count
            strBuild.Append(grid.SelectedRows(row).Cells(cell).Value.ToString())
            strBuild.Append(vbTab)
            System.Math.Max(System.Threading.Interlocked.Increment(cell), cell - 1)
        End While
 
        strBuild.Append(System.Environment.NewLine)
        System.Math.Max(System.Threading.Interlocked.Increment(row), row - 1)
    End While
 
    Return strBuild.ToString()
End Function

But the end result is the same as Problem #2 above.

So I put a breakpoint at the end of Sub GridClipboardPrep and guess what? It runs three times! Furthermore, if I paste into Notepad while the program is paused at the breakpoint, it pastes correctly (though without the header row). After the program continues, paste looks like Problem #2 again.
Stefan
Telerik team
 answered on 12 Aug 2015
9 answers
143 views

Hi all, 

RadGridView can't rectangle all cells as long as I use "Windows7Theme"

The mouse will stop on middle cell when you drag you mouse.

Please my code. Thanks.

 

    public partial class MyForm: Form
    {
        private Telerik.WinControls.Themes.Windows7Theme windows7Theme = new Telerik.WinControls.Themes.Windows7Theme (); 
        public MyForm ()
        {
            InitializeComponent ();
            Telerik.WinControls.ThemeResolutionService.ApplicationThemeName = "Windows7";

            this.radGridView1.Location = new System.Drawing.Point (0, 0);
            this.ClientSize = new System.Drawing.Size (600, 300);
            this.radGridView1.Size = new System.Drawing.Size (600, 300);
            this.radGridView1.MasterTemplate.MultiSelect = true;
            this.radGridView1.SelectionMode = GridViewSelectionMode.CellSelect;
            this.radGridView1.MasterTemplate.SelectionMode = Telerik.WinControls.UI.GridViewSelectionMode.CellSelect;
            this.radGridView1.MasterTemplate.ShowRowHeaderColumn = false;
            this.radGridView1.MasterGridViewTemplate.ShowRowHeaderColumn = false;
            DataTable dataSource = new DataTable ("Test");
            for (int i = 0; i < 40; i++)
            {
                string ColName = string.Format ("Col{0}", i.ToString ());
                dataSource.Columns.Add (ColName, typeof (string));
            }
            this.radGridView1.DataSource = dataSource;
            for (int i = 0; i < 40; i++)
            {
                DataRow datarow = dataSource.NewRow ();
                for (int j = 0; j < dataSource.Columns.Count; j++)
                {
                    string sText = dataSource.Columns[j].ColumnName;
                    sText += i.ToString ();
                    datarow[j] = sText;
                }
                dataSource.Rows.Add (datarow);
            }
        }

tony
Top achievements
Rank 1
 answered on 12 Aug 2015
4 answers
200 views
Hello,

I am a user of the framework "Telerik" for "C # Winform."

For some time now I try to interface my application with the "Panorama Desktop" module to display "Tiles" according to the connected user.

The objective is to get the name of the groups in the table "GROUPS" in the MS-Sql database and create the dynamically in my application.

Then retrieve the table "ITEMS" all items of a group and include them in the appropriate group.

Table : GROUPS
groupID
groupName
groupOrder

Table : ITEMS
itemID
groupID
itemName
itemOrder
itemImage
itemRow
itemCol
itemSpanWidth
itemSpanHeight

Would someone an idea or example code allows me to set up this feature because then I do not see how.

Thanking you in advance for your answers.

Regards,

Alexandre
alexandre.schouvert@gmail.com
Alexandre
Top achievements
Rank 1
 answered on 11 Aug 2015
2 answers
370 views

I have implemented custom grouping for a GridView and would like to change the group header background color for some groups based on the grouped rows.

How would I do that?

 -Lou

Dimitar
Telerik team
 answered on 11 Aug 2015
1 answer
112 views

Hi,

Gridview sort fails when column contains null values or incompatible row values.

See the following errors when sorting using the column header.

 

Brian

 

 

Dimitar
Telerik team
 answered on 11 Aug 2015
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?