Telerik Forums
UI for WinForms Forum
1 answer
201 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 

I
Emanuel Varga
Top achievements
Rank 1
 answered on 01 Nov 2010
1 answer
172 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
247 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
357 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
204 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
4 answers
368 views
Hi,

I'm sure this is an easy question but for some reason I cannot get my head round it.

I have a form (Form1) with several RadGridViews on it. I have created a second form (Form2) that the user completes to add rows to each of the gridviews.

I'm stuck on being able to access the gridviews from the second form to complete the radgridview.rows.add.

I have created an object for Form1 inside Form2 but that's where I get stuck.

Can someone please point me in the right direction?

Guy
Guy
Top achievements
Rank 1
 answered on 01 Nov 2010
7 answers
230 views
Hi all,
I have a custom calendar which is derived from GridViewDateColumn. I don't know in whic method I must determine type of the Editor.
class MyCalendar:GridViewDateColumn 
{
public override CreateEditor()
{
  Create Editor as MyCalendar;
}
}
Please just write the code which works. I've seen the "Customizing Editors" part of GridView help but it's sample explains EditorRequired event while I  want to add a new column by clicking a button with the type MyCalendar.
Thank you.
Tooraj
Top achievements
Rank 1
 answered on 31 Oct 2010
5 answers
359 views
Hello!

I wonder is it possible to implement the following example?
I wish to have two pages of a PageView, but wish them to lead to a single GridView.

The reason for that is that the application uses to much memory and starts working slowly if I have multiple "heavy controls". I tried to create a form with four grids on different pages of a PageView, but I experience delays when switching tabs and even starting the application.

Here I try to implement the situation when two grids have very much alike data (say "New Events" and "Old events"), populated from one very same table on SQL server. The only difference between two sets of data is a "bit" field indicating whether this is an old event or a new one. I guess it's too much to create a special grid for each data set. And, as long as we are planning to move from Delphi, there is a TTabControl - which does what I wish. Well, almost exactly - with Delphi control I cannot create three tabs, two of which lead to one page and the third - to another.

I hope I can implement this with RadPageView.
Thank you.
Emanuel Varga
Top achievements
Rank 1
 answered on 30 Oct 2010
2 answers
407 views
hi..

how  to make a particular row  in a grid view  as read only?
Vidhya
Top achievements
Rank 1
 answered on 30 Oct 2010
6 answers
249 views
Hi there,

My users want me to change the default key navigation behavior on a hierarchical grid.  For instance, they want the tab key to move down to the children of a hierarchical row if it's the end of the line instead of moving to the next row of the same level.

I implemented a solution that looks like this:

public class CustomGridHierarchyRowBehavior : GridHierarchyRowBehavior
{
    protected override bool ProcessTabKey(KeyEventArgs keys)
    {
        if (GridViewElement.Navigator.IsLastColumn(GridViewElement.CurrentColumn) && !keys.Shift)
        {
            GridViewElement.Navigator.Select(GridViewElement.CurrentRow.ChildRows[0], GridViewElement.CurrentRow.ChildRows[0].ViewTemplate.Columns[0]);
            return true;
        }
  
        return base.ProcessTabKey(keys);
    }
}

But I get the following exception sometimes when tabbing around quickly:

Object reference not set to an instance of an object.
   at Telerik.WinControls.UI.ViewInfoTraverser.SetCollectionForStage()
   at Telerik.WinControls.UI.ViewInfoTraverser.Reset()
   at Telerik.WinControls.UI.ViewInfoTraverser..ctor(GridViewInfo viewInfo)
   at Telerik.WinControls.UI.GridRowBehavior.IsOnLastCell()
   at Telerik.WinControls.UI.GridRowBehavior.ProcessTabKey(KeyEventArgs keys)
   at MyApp.CustomGridHierarchyRowBehavior.ProcessTabKey(KeyEventArgs keys) in C:\Dev\MySolution\MyApp\App_Code\CustomGridView.cs:line 141
   at Telerik.WinControls.UI.GridRowBehavior.ProcessKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.BaseGridBehavior.ProcessKey(KeyEventArgs keys)
   at Telerik.WinControls.UI.RadGridView.ProcessDialogKey(Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at MyApp.Program.Main() in C:\Dev\MySolution\MyApp\Program.cs:line 20

The line 141 in my custom method correlates to the call to "return base.ProcessTabKey(keys);".

Am I doing something wrong?  Am I missing an important call to some helper method or forgetting to set some property?  I've been experimenting with these behavior classes and have been having a lot of trouble with random/difficult to reproduce exceptions deep inside the guts of the grid.

I should also probably mention that my grid is three levels deep, in case that makes any difference (as it did for the issue with collapsing hierarchy rows).  And I'm using VS 2008 and version 2010.2.10.914 of the Telerik controls.

Thanks for any insight!
Emanuel Varga
Top achievements
Rank 1
 answered on 29 Oct 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)
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?