Telerik Forums
UI for WinForms Forum
2 answers
171 views
I have an Element that Inherits from LightVisualElement. In CreateChildElements I add three controls - StackLayoutPanel, Image and Label - however the Size is always 0 which causes problems in another controller where I try to stack several Elements together.

 

Why is the Size 0?

When is the Size initialized?

 
protected override void CreateChildElements()
        {
            base.CreateChildElements();
 
            mainPanel = new StackLayoutPanel();
            mainPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
 
            checkBox = new LightVisualElement();
            checkBox.DrawText = false;
            checkBox.ImageLayout = System.Windows.Forms.ImageLayout.Center;
            checkBox.ShouldHandleMouseInput = false;
            checkBox.NotifyParentOnMouseInput = true;
 
            mainPanel.Children.Add(checkBox);
 
            label = new RIOLabelElement();
            label.TextAlignment = ContentAlignment.TopCenter;
            label.Font = new System.Drawing.Font("Segoe UI", 8, FontStyle.Italic, GraphicsUnit.Point);
            label.ShouldHandleMouseInput = false;
            label.NotifyParentOnMouseInput = true;
            mainPanel.Children.Add(label);
             
            this.Children.Add(mainPanel);
        }
Hristo
Telerik team
 answered on 11 Apr 2017
1 answer
184 views

I am dynamically adding tabs to a pageview.  How can I add subtabs?

When I click on a tab, I need the tabs within the top tab to show. 

Here is the code I have.  The first set of tabs work.  Can't figure how to add child tabs

//create a tab for each line
DataTable dt = GetLines();
 
if (dt.Rows.Count > 0)
{
    foreach (DataRow row in dt.Rows)
    {
        RadPageViewPage newLine = new RadPageViewPage();
        newLine.Text = row["DEPARTMENT_DESCRIPTION"].ToString();
        pvMain.Pages.Add(newLine);
 
        //get the list of what runs on each line (by Department_id)
        DataTable dtLines = GetLineDepartments(Convert.ToInt16(row["DEPARTMENT_ID"].ToString()));
 
        if (dtLines.Rows.Count > 0)
        {
            foreach (DataRow rowDept in dtLines.Rows)
            {
                // add depts tabs to the line
                RadPageViewPage newDept = new RadPageViewPage();
                newDept.Text = rowDept["LINE_DESCRIPTION"].ToString();
                //newLine.Controls.Add(newDept);  //how do I add to the newline RadPageViewPage
                newLine.
            }
        }
    }
}
Hristo
Telerik team
 answered on 11 Apr 2017
11 answers
780 views

Hi

How I have to add new row on cell end edit. I have 10 columns in the gridview, after particular cell end edit and pressing tab key i should add a new row.

I tried ProcessTab Key and it is not working.

Please let me know how i can achieve this.

Thanks in advance.

Regards

Gopinath

 

 

 

 

 

Gopinath
Top achievements
Rank 1
 answered on 11 Apr 2017
2 answers
86 views

Hi is there a way to add buttons near a collapse button in ribbon bar (see picture for more detail)?

 

Thank you :)

Hristo
Telerik team
 answered on 10 Apr 2017
4 answers
228 views
Hello,

I have this annoying issue about the radscrollablepanel, what i do is inside the scrollablepanel  i put a radgridview on it.
When the gridview is populated the radscrollablepanel adjust and works well, but the issue is when you scroll at the middle or bottom part 
of gridview and click on row or cell. It automatically scrolls you up into the top instant and by that you cant edit something in rows which you have scrolled.
Is there any ways to stop the scrollablepanel in scrolling automatically?
Hristo
Telerik team
 answered on 10 Apr 2017
4 answers
1.8K+ views

Hi

I'm trying to save and load a RadDock layout to a database field using a MemoryStream but the code fails on loading the layout with error 'System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.'

I have very similar code to save and load layouts for RadDock and it works. Also I can save and load dock layouts if I use xml files but I don't want to use them.

I'm using Progress OpenEdge andthese are code snippets for saving and loading the layout.

METHOD PRIVATE VOID SaveDockLayout( ):
    DEF VAR l_MemoryStream AS System.IO.MemoryStream   NO-UNDO.
    DEF VAR l_UTF8Encoding AS System.Text.UTF8Encoding NO-UNDO.
    DEF VAR lc_char        AS LONGCHAR                 NO-UNDO.

    ASSIGN
        l_MemoryStream = NEW System.IO.MemoryStream()
        l_UTF8Encoding = NEW System.Text.UTF8Encoding()
        .
    radDock1:SaveToXml(l_MemoryStream).
    lc_char = l_UTF8Encoding:GetString(l_MemoryStream:ToArray()).
    COPY-LOB FROM lc_char TO tt_stored_layout.layout.

    l_MemoryStream:Close().
    l_MemoryStream = ?.
    DELETE OBJECT l_MemoryStream NO-ERROR.
    DELETE OBJECT l_UTF8Encoding NO-ERROR.

END METHOD.

METHOD PRIVATE VOID LoadDockLayout( ):
    DEF VAR l_MemoryStream AS System.IO.MemoryStream   NO-UNDO.
    DEF VAR l_UTF8Encoding AS System.Text.UTF8Encoding NO-UNDO.
    DEF VAR lc_char        AS LONGCHAR                 NO-UNDO.

    COPY-LOB FROM tt_stored_layout.layout TO lc_char.

    ASSIGN
        l_UTF8Encoding = NEW System.Text.UTF8Encoding()
        l_MemoryStream = NEW System.IO.MemoryStream(l_UTF8Encoding:GetBytes(lc_char), 0, l_UTF8Encoding:GetByteCount(lc_char))
        .
    radDock1:SuspendLayout().
    radDock1:LoadFromXml(l_MemoryStream).
    radDock1:ResumeLayout().

    l_MemoryStream:Close().
    l_MemoryStream = ?.
    DELETE OBJECT l_MemoryStream NO-ERROR.
    DELETE OBJECT l_UTF8Encoding NO-ERROR.

END METHOD.

Can you help or give me an example of using a method to save and load dock layouts withouth resorting to xml files?

Kind regards

Tung

Tung
Top achievements
Rank 1
 answered on 07 Apr 2017
1 answer
100 views

Hi. I was able to "remove" options and exit buttons which appear at run-time with this code:

this.radRibbonBar1.ExitButton.Visibility = ElementVisibility.Collapsed;
this.radRibbonBar1.OptionsButton.Visibility = ElementVisibility.Collapsed;

 

But how shall i remove this separator line over here which was above options and exit button? 

Hristo
Telerik team
 answered on 07 Apr 2017
2 answers
98 views

Hello

I'm using ThemeResolutionService.LoadPackageFile to load a tssp file and apply the theme for the whole application with ThemeResolutionService.ApplicationThemeName = AppliThemeName;

My RadForm (F1) has MdiChildren detect by a RadDock (RD1).

One of these MdiChildren is an other RadForm (F2) which contains a radDock (RD2) which contains some others RadForm (F3x) added with DockControl method.

The F3x RadForms are not themed.

Is there anything else to do for apply theme in this case?

Infos version:

.Net 4.6.1.

Telerik 2017.1.221.40

Hristo
Telerik team
 answered on 06 Apr 2017
3 answers
238 views
 Is there any direct feature available to resize the columns in grid by hovering over the left/right border of each Column and clicking/dragging to resize the column width or what is the approach to achieve this.
Hristo
Telerik team
 answered on 05 Apr 2017
2 answers
55 views

Hello dear,

I need to know the possibility of enable filtration with some values to show just rows that contain any value from parameters, regards.

Ammar
Top achievements
Rank 1
 answered on 05 Apr 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)
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?