Telerik Forums
UI for WinForms Forum
2 answers
146 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
277 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
172 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
272 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
303 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
156 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
179 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
188 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
166 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
353 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
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
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
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
BindingNavigator
Styling
Barcode
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
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?