Telerik Forums
UI for WinForms Forum
1 answer
69 views
Hi there,

I was wondering if its possible to move some of the Pages to a 2nd row so that the pages do not overrun out of the form.

For e.g.

I got a form with the pages set up this way

|/Page 1// Page2// Page 3// Page 4// Page 5//|
|                                                                       |

and I would like it to look like

|/Page1//Page2//_______________________|
|/Page3//Page4//Page5__________________|
|                                                                        |
Stefan
Telerik team
 answered on 08 Sep 2011
2 answers
129 views
Hi

I am trying to develop a wallboard application that will simply rotate web pages to present production information about particular companies.  The web pages are being served correctly and render fine within any web browser; but when using the rotator there is always one item that is blank.  I have a collection of sites to display and then am simply creating items into the radRotator control, after a set period of time I simply refresh the browser.  Has anyone else experienced issues with the webbrowser item not loading the page contents?

The code to setup the rotator is

               

radRotator1.Stop();
radRotator1.Items.Clear();

foreach (string site in sites)
{

    RadWebBrowserItem item1 = new RadWebBrowserItem();
    item1.Url = new Uri(site);
    item1.WebBrowserControl.ScriptErrorsSuppressed = true;
 
    radRotator1.Items.Add(item1);
}
 
radRotator1.CurrentIndex = 0;
radRotator1.Start(true);

To refresh after period of time
radRotator1.Stop();
 
foreach (RadItem item in radRotator1.Items)
{
 
    RadWebBrowserItem item1 = (RadWebBrowserItem) item;
    item1.WebBrowserControl.Refresh(); 
}
 
radRotator1.Start(true);

Any help appreciated, have spent lots of time on this but the problem is that the page that is not loaded is not consistent and could be any of the sites in the list.

Cheers
Ivan Petrov
Telerik team
 answered on 08 Sep 2011
4 answers
176 views
Hello
I have a question. Is it possible to autosize rows but not only the viewable part but the entire row?
For example I have a GridView with 45 columns but I can see in one time only part of all columns.
And if I scroll left/right I see how the rows are autosized. but I would like to have all the rows autosized from the begining.
can you help me?
Jack
Telerik team
 answered on 08 Sep 2011
1 answer
104 views
How to maintain the state of treeview.
To maintain the state I tried following options
Expand() 
ExpandAll()
Toggle()
selected=true
Ensurevisible
None of the above thing works.
Svett
Telerik team
 answered on 08 Sep 2011
3 answers
147 views
I'm reading the contents into an array then assigning it excel range for faster export.
I successfully exported to excel when it is not grouped. However when grouped I dont get the grouping effect appearing.
Below is a snippet:

           foreach (GridViewColumn col in grid.Columns)
                {
                    arr[0, i] = col.HeaderText;
                    i++;
                }
 
                //Contents
                long currRow = 0;
                foreach (GridViewRowInfo row in grid.Rows)
                {
                    int currCol=0;
                    foreach (GridViewColumn col in grid.Columns)
                    {
                        if(row.Cells[currCol].Value != null )
                        {
                           arr[currRow + 1, currCol] = row.Cells[currCol].Value.ToString();
                        }
                        else
                        {
                            arr[currRow + 1, currCol] ="";
                        }
 
                    currCol ++;
                    }
                    currRow ++;
                }
 
                rng.Value2 = arr;

any suggestions will be appreciated.
Jack
Telerik team
 answered on 08 Sep 2011
1 answer
194 views
Good afternoon.
    I have a problem with RadPanelBar. I use VB Express 2008.
I create a new WinForm project and add a RadPanelBar control. Dock = True, GroupStyle = ExplorerBarStyle.
This is the code:
Imports Telerik.WinControls.UI
  
Public Class Form1
  Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim rpbge As RadPanelBarGroupElement
  
    For i As Integer = 0 To 10
      rpbge = New RadPanelBarGroupElement
      rpbge.Caption = "Group" & i
      rpbge.EnableHostControlMode = True
      RadPanelBar1.Items.Add(rpbge)
    Next
  
    Dim rlc As New RadListControl
    rlc.Height = 2
    rlc.Width = rpbge.ContentPanel.ClientSize.Width
    rlc.Anchor = AnchorStyles.Left Or AnchorStyles.Right Or AnchorStyles.Top
    rpbge.ContentPanel.Controls.Add(rlc)
  
    rpbge.Expanded = True
  End Sub
End Class

Now:
- Run the project and scroll down with the vertical scroll bar.
- Collapse and Expand the last group (Group10).
- Now try to scroll down again with the vertical scroll bar and you'll see the flicker.
Is there any solution?
Thank you in advance.
Gianfranco
Stefan
Telerik team
 answered on 08 Sep 2011
5 answers
176 views
I have a combobox populated with a dataset, and i want to show in the column editor (before enter a value) a value of the items of the combo.

How can i do this.

Thanks a lot.
Emanuel Varga
Top achievements
Rank 1
 answered on 08 Sep 2011
3 answers
106 views
Hi.

I have a "little" problem with the ListControl.
I am trying to do a little Chat thingy.. and facing a Problem when the items are formated with Styles (Font, Size, Bold...).

In my Test Application you will see some controls.
1.) ListControl that stores the written messages
2.) A TextBox to input the desired Text message
3.) 2 Buttons with the text 1 and 20 - The 20 Button just calls the 1 button 20 times
    The 1 Button, inserts 3 Items into the ListControl 
        1st a HeaderItem with the UserName and the DateTime
        2nd a TextItem with the given Text
        3rd a FooterItem to get a space between Messages
4.) An indicator for the Items.Count Value of the ListControl


So now the Problems i have after i have added some Messages to the ListControl and do some scrolling at some Point you will notice 3 Errors.
1.) The last Item doesnt get selected (not Highlighted with the Orange Color)
2.) The scrolling doesnt work. The Scrollelement moves but the ListControl seems like frozen.
3.) No new Items get displayed, tough it works - Item Counter goes still up.

Another Problem is that when i call the 20 Buttons at first after the form loads, the last item doesnt get selected. But this isnt really an issue that i am facing in reall application, because this button only exists in this test application so that you can add items faster, since you need some. (Second time hitting this button selects list item fine, only doesnt work when hitting it at first)

Hope you guys can help me fix those problems, already tried some LayoutUpdates but no luck till now. :(

And a side Note Question, is there a way to change the HighLight MouseOver and the Select Color?

Source Code for test Application:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
using Telerik.WinControls.UI;
 
public partial class RadForm1 : RadForm
{
    public RadForm1()
    {
        InitializeComponent();
 
        radTextBox1.Text = "Some random Text!";
        radListControl1.AutoSizeItems = true;
 
        radTextBox1.Font = new Font("Times New Roman", 10, FontStyle.Bold);
        radTextBox1.TextBoxElement.ForeColor = Color.Red;
        radListControl1.SelectionMode = SelectionMode.One;
    }
 
    List<int> ids = new List<int>();
    private int GetNewId()
    {
        int returnValue = 0;
        do
        {
            returnValue = new Random().Next(int.MaxValue);
        } while (ids.IndexOf(returnValue) >= 0);
        ids.Add(returnValue);
 
        return returnValue;
    }
 
    private void radButton1_Click(object sender, EventArgs e)
    {
        RadListDataItem itemHeader = new RadListDataItem(string.Format("<html><b>{0}</b> ({1})</html>", "Some User", DateTime.Now), GetNewId());
        radListControl1.Items.Add(itemHeader);
 
        RadListDataItem itemText = new RadListDataItem(radTextBox1.Text, GetNewId());
        itemText.TextWrap = true;
        itemText.Font = radTextBox1.Font;
        itemText.ForeColor = radTextBox1.TextBoxElement.ForeColor;
        radListControl1.Items.Add(itemText);
 
        RadListDataItem itemFooter = new RadListDataItem("   ", GetNewId());
        radListControl1.Items.Add(itemFooter);
 
        radListControl1.SelectedItem = itemFooter;
        radTextBox2.Text = radListControl1.Items.Count.ToString();
    }
 
    private void radButton2_Click(object sender, EventArgs e)
    {
        for (int i = 0; i < 20; i++)
        {
            radButton1_Click(null, null);
        }
    }
}


Designer:

partial class RadForm1
{
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.IContainer components = null;
 
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }
 
    #region Windows Form Designer generated code
 
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
            this.radListControl1 = new Telerik.WinControls.UI.RadListControl();
            this.radTextBox1 = new Telerik.WinControls.UI.RadTextBox();
            this.radButton1 = new Telerik.WinControls.UI.RadButton();
            this.radButton2 = new Telerik.WinControls.UI.RadButton();
            this.radTextBox2 = new Telerik.WinControls.UI.RadTextBox();
            this.label1 = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.radListControl1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radButton1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radButton2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            //
            // radListControl1
            //
            this.radListControl1.CaseSensitiveSort = true;
            this.radListControl1.ItemHeight = 18;
            this.radListControl1.Location = new System.Drawing.Point(12, 12);
            this.radListControl1.Name = "radListControl1";
            this.radListControl1.Size = new System.Drawing.Size(274, 229);
            this.radListControl1.TabIndex = 0;
            this.radListControl1.Text = "radListControl1";
            //
            // radTextBox1
            //
            this.radTextBox1.Location = new System.Drawing.Point(12, 247);
            this.radTextBox1.Name = "radTextBox1";
            this.radTextBox1.Size = new System.Drawing.Size(192, 20);
            this.radTextBox1.TabIndex = 1;
            this.radTextBox1.TabStop = false;
            this.radTextBox1.Text = "radTextBox1";
            //
            // radButton1
            //
            this.radButton1.Location = new System.Drawing.Point(211, 247);
            this.radButton1.Name = "radButton1";
            this.radButton1.Size = new System.Drawing.Size(33, 24);
            this.radButton1.TabIndex = 2;
            this.radButton1.Text = "1";
            this.radButton1.Click += new System.EventHandler(this.radButton1_Click);
            //
            // radButton2
            //
            this.radButton2.Location = new System.Drawing.Point(250, 247);
            this.radButton2.Name = "radButton2";
            this.radButton2.Size = new System.Drawing.Size(36, 24);
            this.radButton2.TabIndex = 3;
            this.radButton2.Text = "20";
            this.radButton2.Click += new System.EventHandler(this.radButton2_Click);
            //
            // radTextBox2
            //
            this.radTextBox2.Location = new System.Drawing.Point(211, 277);
            this.radTextBox2.Name = "radTextBox2";
            this.radTextBox2.Size = new System.Drawing.Size(75, 20);
            this.radTextBox2.TabIndex = 4;
            this.radTextBox2.TabStop = false;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(153, 277);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(52, 13);
            this.label1.TabIndex = 5;
            this.label1.Text = "Counter:";
            //
            // RadForm1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(298, 303);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.radTextBox2);
            this.Controls.Add(this.radButton2);
            this.Controls.Add(this.radButton1);
            this.Controls.Add(this.radTextBox1);
            this.Controls.Add(this.radListControl1);
            this.Name = "RadForm1";
            //
            //
            //
            this.RootElement.ApplyShapeToControl = true;
            this.Text = "RadForm1";
            this.ThemeName = "ControlDefault";
            ((System.ComponentModel.ISupportInitialize)(this.radListControl1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radButton1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radButton2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
 
    }
 
    #endregion
 
    private Telerik.WinControls.UI.RadListControl radListControl1;
    private Telerik.WinControls.UI.RadTextBox radTextBox1;
    private Telerik.WinControls.UI.RadButton radButton1;
    private Telerik.WinControls.UI.RadButton radButton2;
    private Telerik.WinControls.UI.RadTextBox radTextBox2;
    private System.Windows.Forms.Label label1;
}


Ivan Todorov
Telerik team
 answered on 08 Sep 2011
2 answers
299 views
Hi,

I have a radgridview which has an IQueryable as datasource. When attempting to filter the radgridview using filter descriptors the fiter descriptors are shown on the grid. But the fields are not filtered. I have an idea this has something to do with the binding?

The IQueryable is generated in the DAL and returned to the BL which in turn returns it to the WinForm. There is no way to directly access the database as we can only work on the Winform.

Is it possible to filter the radgridview when it is using an untyped IQueryable as datasource?

radGridView1.DataSource = BusinessObject.getAll(); //Returns IQueryable
 
//Setting filter descriptors
 
FilterDescriptor filter = new FilterDescriptor();
                                filter.Operator = FilterOperator.IsEqualTo;
                                filter.PropertyName = "Username"t;
                                filter.Value = "Bob";
                                filter.IsFilterEditor = true;
                                this.radGridView1.MasterTemplate.EnableCustomFiltering = true;
                                this.radGridView1.MasterTemplate.EnableFiltering = true;
                                this.radGridView1.FilterDescriptors.Clear();
                                this.radGridView1.FilterDescriptors.Add(filter);
                                radGridView1.ShowFilteringRow = true;
ado
Top achievements
Rank 1
 answered on 08 Sep 2011
3 answers
884 views
Hey at Telerik

I would like to know how i can set the RadMaskedEditBox to accept only a decimal number.

I need the RadMaskedEditBox for coordinates and cannot limit the box to a specific number og digits before the seperator or after.

The closest i can get is by setting the MaskType of the RadMaskedEditBox to 'Numeric' and the Mask to 'n'.

As i see it 'n' and 'n2' gives the same result. isn't 'n' supposed to not limit the input.

Sincerly

Jan
Stefan
Telerik team
 answered on 07 Sep 2011
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?