Telerik Forums
UI for WinForms Forum
4 answers
263 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
158 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
264 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
284 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
148 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
1 answer
176 views
Hi Emanuel,
I tested your code for FADateTimePicker. It embeds the control to the cell.
But still there are some problems:
1. When clicking inside the cell this error occurs: 'Object reference not set to an instance of an object.' this error raises because of this line of your code: dateTimePicker.SelectedDateTime = (DateTime)activeEditor.Value;
2. When clicking the calendar's combobox to open the dropdown list to choose date, the list does not drop down. You must press Enter to open the Date Picker.
3. After selecting the date the contents of the cell must be the same as the host control that is:
 CellContents=FADateTimePicker.SelectedDateTime.
4. User must enter to the cell to make the calendar visible, while I want the calendar to be visible for each cell of the column when the form loads.
Thank you Emanuel, I will not forget your name because of your KIND Attention.
Sincerly, Tooraj Azizi.
Emanuel Varga
Top achievements
Rank 1
 answered on 29 Oct 2010
2 answers
180 views
Hello,

I have been struggling for a few days on this and have met with no success. I'm hoping someone can send me in the right direction. I have a grid that represents product prices by user type. User Type across the top, SKU down the left side. I need to show the price for each intersection, and as well, indicate whether that user type has access to the item. In addition, I need to be able to edit both values. 

So in a single cell, I need a way to represent a decimal and a boolean. At first I tried the examples for loading multiple controls into a cell, but that didn't work for a number of reasons, most importantly, it would have been cumbersome to navigate and interact. So my next attempt was to have the cell display the price in two colors: Gray implies that the user has no access, blue implies that the user has access. I could then allow the operator to tab through the cells, type in prices and hit Ctrl + A to toggle the active flag. 

I started with an override of GridDataCellElement that takes a string, with the pipe character separating the two values: "true|150.00", and stores the result internally in a string and a bool. This is being done in the SetContentCore override. Display works great, but when you edit a cell, you are presented with the composite field - true|150.00 - rather than just the price field.

I can supply code if necessary, but if someone can recommend the best way to do something like this, or better yet post an example, that would be great.

Thanks, Steve
neebs
Top achievements
Rank 2
 answered on 29 Oct 2010
3 answers
163 views
Hi,

I would like to disable all possible selection (rows, Cells & Columns). The grid view is used for the display purpose, so users don't have to select anything.

I don't find how to do this in VB

In the Forum, I found a sample in C#
this.radGridView1.CurrentRow = null;
this.radGridView1.CurrentRowChanging += 
new CurrentRowChangingEventHandler(radGridView1_CurrentRowChanging);

private
 
void radGridView1_CurrentRowChanging(object sender, CurrentRowChangingEventArgs  e)
 {
 e.Cancel =
true;
 }

Bur I can't translate it in VB
Emanuel Varga
Top achievements
Rank 1
 answered on 29 Oct 2010
3 answers
343 views
Hi,

I'm using the latest telerik build, with VS 2010 (vb net)

I Have a RadGridView and I fill it programatily.
There is 4 columns : First Name, Last Name, Age, Adress and many row (near 3000)

How can I check if a row exist a row with First Name & Last Name already exist, without having to loop on each row and without have effect on the display ?

Thanks

Anthony


Ps : The demo have a lot of error under Windows 7 - 64Bits caused by the OleDB 4.0....
Emanuel Varga
Top achievements
Rank 1
 answered on 29 Oct 2010
9 answers
164 views
Hi There,

When a horizontal scroll bar is generated in the tree view, it cover the space on the last showing node.
My problem is when you move down the tree node by arrow down, you can not see the last node properly, because the horizontal scroll bar cover it unless you move the vertical scroll bar by mouse. 

Thanks,

Fendy  
Emanuel Varga
Top achievements
Rank 1
 answered on 28 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)
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?