Telerik Forums
UI for WinForms Forum
4 answers
144 views
I want to launch a new form after a carousel selected element has rotated into position 
but I can not find any (end of rotation event) that will allow me to do this.
Is there one or is there a techinque I can use to simulate this
Peter
Telerik team
 answered on 02 Nov 2010
2 answers
159 views
I need to be able to drag a row from a gridview over onto a tree view. I see an example but it's pretty old. I was wondering if there are any newer examples or better ways of doing it?

TIA - Jeff.
Svett
Telerik team
 answered on 02 Nov 2010
1 answer
106 views
I noticed that RadDock's (2010.2.10.914) ActiveWindowChanging event has some inconsistent behaviors:

        private void mainDock_ActiveWindowChanging(object sender, DockWindowCancelEventArgs e)
        {
            //Current: radDock1.ActiveWindow
            //Changing To: e.DockWindow
            if (radDock1.ActiveWindow != e.DockWindow)
            {
                //There are at least 2 documents in radDock1
            }
            else
            {
                //There is none or only 1 document in radDock1
            }
        }

It would be nice if DockWindowCancelEventArgs class would have both the current and the changing-to DockWindows information.
This is useful when you have a situation where a MDI application and documents having their own RadDock components. In this scenario, when switching between documents, it would be a good idea to hide any floating windows in the existing document before switching to the changing-to document. I don't think RadDock currently has anything for this purpose.

Phi
Julian Benkov
Telerik team
 answered on 02 Nov 2010
1 answer
88 views
Hi team,

I have normal windows form which is docked using raddock.
I need to set an icon on the tab of the form.

Thanks
Suresh.
Richard Slade
Top achievements
Rank 2
 answered on 02 Nov 2010
2 answers
413 views
Problem: You want the grid to fill up entirely so you use Column Fill mode so no empty space would be showing in the right side of the columns. In doing that, you loose the horizontal scroll bar when the grid's size is smaller than the sum of the column's width. There has been suggestion of using a scrollable panel to host the grid. But that solution is not ideal.

Solution: It is very simple. Just turn off the Column Fill mode so the horizontal scroll bar would be available when needed. Then we just have to do what the Column Fill mode is doing manually

Below is the code that I came up with: Subscribe to the grid's gridView_Resize() event so it would call FillWidth() when there is a resize event. Where ever in your code when you show the grid the first time, just call to FillWidth() so it would look right in the case that that gridView_Resize() event does not fire.

public void FillWidth()
{
    if (gridView.ColumnCount == 0)
        return;
 
    var width = CalcColumnsWidth();
 
    if (width < gridView.ClientSize.Width)
    {
        // get the remain empty space in grid
        width = gridView.ClientSize.Width - width;
 
        int extraWidthPerColumn = width / gridView.ColumnCount;
        int i, limit = gridView.ColumnCount - 1; // stop before the last column
 
        for (i = 0; i < limit; i++)
        {
            if (gridView.Columns[i].MaxWidth > 0 && gridView.Columns[i].Width + extraWidthPerColumn > gridView.Columns[i].MaxWidth)
            {
                // do calculation before we lost the original width
                width -= (gridView.Columns[i].MaxWidth - gridView.Columns[i].Width);
                gridView.Columns[i].Width = gridView.Columns[i].MaxWidth;
            }
            else
            {
                gridView.Columns[i].Width += extraWidthPerColumn;
                width -= extraWidthPerColumn;
            }
        }
 
        // the last column get any remaining width
        gridView.Columns[i].Width += width;
 
        // This only add to the last column
        //gridView.Columns[gridView.ColumnCount - 1].Width += gridView.ClientSize.Width - width;
    }
}
 
private int CalcColumnsWidth()
{
    int width = 0;
 
    foreach (var column in gridView.Columns)
        width += column.Width;
 
    return width + gridView.ColumnCount + 15; //take into the vertical lines between columns and vertical scrollbar
}
 
private void gridView_Resize(object sender, EventArgs e)
{
    gridView.MasterTemplate.BestFitColumns();
    FillWidth();
}
.

Phi
Top achievements
Rank 1
 answered on 02 Nov 2010
1 answer
132 views
Hi,

I followed an example i found on this forum with this code:
RadDateTimeEditor editor = this.radGridView1.ActiveEditor as RadDateTimeEditor;
 if (editor != null)
 {
     RadDateTimeEditorElement editorElement = (RadDateTimeEditorElement)editor.EditorElement;
     editorElement.ShowUpDown = true;
 }

This code are inserted into the event CellBeginEdit. 
The problem is when i'm editing the cell. Since i have bounded this grid to a datasource i expect the value (Time) from the datasource to show up in this cell when i'm editing as well as when i'm not editing it.
But instead of showing the value, the value presented is 00:00:00.

The second question is, how can i modify this editorElement to only show hh:mm (ex. 11:30) when editing? 

Regards
Svein Thomas
 RadDateTimeEditor editor = this.radGridView1.ActiveEditor as RadDateTimeEditor;
            if (editor != null)
            {
                RadDateTimeEditorElement editorElement = (RadDateTimeEditorElement)editor.EditorElement;
                editorElement.ShowUpDown = true;
            }I


I
Emanuel Varga
Top achievements
Rank 1
 answered on 01 Nov 2010
1 answer
124 views

Hi,

I can't find the element that change the colors and appearence of the tabs that are shown inside the radgriview as child rows.

Anyone knows the name of the element that I'm looking?

Thanks,

Felipe
Alexander
Telerik team
 answered on 01 Nov 2010
3 answers
214 views
Hi,

I've got a RadChart that I'm building on the fly from a filtered binding source. It shows some values on the Y Axis and along the X Axis it shows the month number that the data corresponds to:

For example
20
15
10
5
     1     2    3    4    5   6  7   8  9   10   11   12

Where 1 = january and so on.

Because I am not binding this to a datasource, but I am building the series and data on the fly, I cannot use the

Me

 

.RadChart.PlotArea.XAxis.DataLabelsColumn as far as I know.

However, I want to replace the X Axis labels with meaningful names I.e Jan Feb Mar etc...

I have tried adding this in during the loop and the labels show, but once the labels show, the data doesn't.

Please can you advise an easy way to get the X Axis labels to be set to a custom value

Thanks

Richard

 

Evgenia
Telerik team
 answered on 01 Nov 2010
9 answers
284 views

Hello!

Was the meaning of GridCellElement.RowIndex property changed since 2009-Q3?

Please see the following code snippet:

01.public Form1()
02.{
03.    InitializeComponent();
04.  
05.    radGridView1.Columns.Add(new GridViewTextBoxColumn("Group"));
06.    radGridView1.Columns.Add(new GridViewTextBoxColumn("RowIndex"));
07.  
08.    for (int i = 0; i < 3; i++)
09.        radGridView1.Rows.Add("Group 1");
10.    for (int i = 0; i < 3; i++)
11.        radGridView1.Rows.Add("Group 2");
12.  
13.    radGridView1.MasterTemplate.GroupDescriptors.Add(new GroupDescriptor("Group"));
14.}
15.  
16.private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
17.{
18.    if (e.CellElement.ColumnInfo.Name == "RowIndex")
19.        e.CellElement.Value = e.CellElement.RowIndex.ToString();
20.}

I expect the following result:

Group 1

0

1

2

Group 2

3

4

5

But the result is:

Group 1

0

1

2

Group 2

0

1

2

It seems that the RowIndex is an index inside the group but not the entire grid. Could you please confirm this?

Is the following workaround correct?

1.int rowIndex = radGridView1.Rows.IndexOf(e.CellElement.RowInfo);

Thank you.

Jack
Telerik team
 answered on 01 Nov 2010
2 answers
144 views
Should be pretty simple. I need to export a RadGridView to excel. I follow the instructions in the video / tutorial. I get to the step where we code in the exporttoexcelml piece and it errors out. I have my references and such.
KawaUser
Top achievements
Rank 2
 answered on 01 Nov 2010
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?