Telerik Forums
UI for WinForms Forum
3 answers
559 views

I have a lot of RadGridViews inside my applications and as long as there are columns of type GridViewTextBoxColumn only I never encountered perfomance issues. Now I have to do some formatting (very simple logic in my opinion, see code below) and my RadGridView is much slower, especially scrolling.



I tried using CellFormatting and RowFormatting event (not the same time) but both events result in poor performance. Also I am wondering why the documentation recommends using CellFormatting instead of RowFormatting. I have to display 1000-10000 records with 15 columns. Isn't RowFormatting executed one time per (visible) row while CellFormatting will be executed 15 times per row?



Here is my RowFormatting code. Of course the code differs a little bit when I use it in CellFormatting but the idea is the same. All I want to do is set some Images:



// Check column "EventTypeID" and set corresponding icon in column "EventTypeImage"
 
var cell = row.Cells["EventTypeImage"];
 
if (cell != null && cell.Value == null)
{
  switch ((byte) row.Cells["EventTypeID"].Value)
  {
    case (byte) EEventType.Error:
    {
      cell.Value = Resources.ErrorIcon;
      break;
    }
 
    // other cases
  }
}
 
// 4 more GridViewTextBoxColumns that I check and set corresponding icon in a GridViewImageColumn

Performance is good as long as there are few records. But beginning with 500+ rows I have to deal with big performance impacts. I also encountered some crazy behavior with CellFormatting. When I put a counter in my code and write this counter to console whenever CellFormatting event is raised the event never stops from raising so the application hangs forever. I don't know whats going on there, why is this event raising endless just because I write down some debug info to console?



I am using latest version of RadControls for WinForms Q3.

George
Telerik team
 answered on 12 Feb 2014
3 answers
196 views
Hello!
When there is no selected file in BrowseEditor control there is default text "(none)". I've tried to set value to "", but there was no effect. Is there a way, to set textbox text to empty string? Thank you in advance.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Feb 2014
4 answers
193 views
Hello,

Is there a possibility to change the value of a GridViewBrowseColumn after selecting a file with the file browser? (e.g. for replacing parts of the path with environment variables).

My current workaround for this is a editbale GridViewTextBoxColumn for the path and another GridViewCommandColumn right next to it, which opens a filebrowser for setting the value of the GridViewTextBoxColumn.

Thanks for help!
Alexander
Top achievements
Rank 1
 answered on 11 Feb 2014
4 answers
102 views
Hello,

How can I prevent the box from appearing in a grids cell when the cell is selected?

Thanks

Chom
Stefan
Telerik team
 answered on 11 Feb 2014
3 answers
141 views
Hi There, 

I am getting run time error while previewing the weekly style of RadScheduler. This is happening when I use SchedulerWeeklyPrintSTyle.GroupType = SchedulerPrintGroupType.Resource and changing layout to "2 pages/week". If the layout is "1 page / week", then it is showing the preview as expected.  

Please see the attached Print Setting window to see the settings that throws the run time error. 

************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Telerik.WinControls.UI.SchedulerWeeklyPrintStyle.GetPageResource(Int32 pageNumber)
   at Telerik.WinControls.UI.SchedulerPrintStyle.DrawTopArea(Rectangle drawingArea, Graphics graphics, Int32 pageNumber)
   at Telerik.WinControls.UI.SchedulerPrintStyle.DrawPage(Graphics graphics, Rectangle drawingArea, Int32 pageNumber)
   at Telerik.WinControls.UI.RadScheduler.Telerik.WinControls.UI.IPrintable.PrintPage(Int32 pageNumber, RadPrintDocument sender, PrintPageEventArgs args)
   at Telerik.WinControls.UI.RadPrintDocument.OnPrintPage(PrintPageEventArgs e)
   at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)
   at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
   at System.Drawing.Printing.PrintController.Print(PrintDocument document)
   at System.Drawing.Printing.PrintDocument.Print()
   at System.Windows.Forms.PrintPreviewControl.ComputePreview()
   at System.Windows.Forms.PrintPreviewControl.CalculatePageInfo()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
JobPlanner
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/One/Link/JobPlanner.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Telerik.WinControls.UI
    Assembly Version: 2013.1.777.20
    Win32 Version: 2013.1.777.20
    CodeBase: file:///C:/Program%20Files%20(x86)/One/Link/Telerik.WinControls.UI.DLL
----------------------------------------
Telerik.WinControls
    Assembly Version: 2013.1.777.20
    Win32 Version: 2013.1.777.20
    CodeBase: file:///C:/Program%20Files%20(x86)/One/Link/Telerik.WinControls.DLL
----------------------------------------
Telerik.WinControls.Scheduler
    Assembly Version: 2013.1.777.20
    Win32 Version: 2013.1.777.20
    CodeBase: file:///C:/Program%20Files%20(x86)/One/Link/Telerik.WinControls.Scheduler.DLL
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Telerik.WinControls.GridView
    Assembly Version: 2013.1.777.20
    Win32 Version: 2013.1.777.20
    CodeBase: file:///C:/Program%20Files%20(x86)/One/Link/Telerik.WinControls.GridView.DLL
----------------------------------------
TelerikCommon
    Assembly Version: 2013.1.777.20
    Win32 Version: 2013.1.777.20
    CodeBase: file:///C:/Program%20Files%20(x86)/One/Link/TelerikCommon.DLL
----------------------------------------
7md78np1
    Assembly Version: 2013.1.777.20
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
PLFC
    Assembly Version: 1.0.0.0
    Win32 Version: 4.10.20140124.02
    CodeBase: file:///C:/Program%20Files%20(x86)/One/Link/PLFC.DLL
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5474 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------




Stefan
Telerik team
 answered on 10 Feb 2014
3 answers
280 views
Hi!

When I change the value of RadTextBox CharacterCasing to CharacterCasing.Upper, this RadTextBox lost the focus.
Why? Does it has a solution?

Thanks
Stefan
Telerik team
 answered on 10 Feb 2014
5 answers
520 views
Hello,

​I would like to change the color of the horizontal grid lines for selected row and in MouseMove event (remove orange color)

screenshot attached.

Thank you very much.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Feb 2014
2 answers
146 views
I would like to set a tooltip for and individual cell  of type 'GridCheckBoxCellElement'. I tried the following code but, unfortunately I did not have a way to determine the what cell (column/Row) index the sender came from. Any advice is appreciated.


void radGridViewAssignProject_ToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e){  ////GridDataCellElement cell = sender as GridDataCellElement; if (sender is RadCheckmark)
 {  e.ToolTipText = "E-Form/Attachment files will be added to this project";  }
 else if (sender is GridHyperlinkCellContentElement) {
  e.ToolTipText = "Mapp project indexes to e-form controls.";  }
 else if (sender is RadButtonElement) {
  e.ToolTipText = "Remove project from this e-form";  }
 else if (sender is GridDataCellElement) {
 }
 else
 {
  e.ToolTipText = "";  }
}
George
Telerik team
 answered on 07 Feb 2014
4 answers
890 views
Hi.  I am using your Q3 2009 WIn controls and would like to know how do I trap the selected item change event in a multi column combo box column in the grid view.

Additionally, I am trying to format the Drop down (grid element) of the column in a subroutine. 
The grid itself is bound to a list and the  multi-column combo box column is bound to another list.  I am able to bound the dropdown list using;

Dim colLookup As GridViewMultiComboBoxColumn = TryCast(.Columns("SourceColumnIndex"), GridViewMultiComboBoxColumn)

            If colLookup IsNot Nothing Then
                colLookup.DataSource = SourceColumPicLst
                colLookup.ValueMember = "ColumnIndex"
                colLookup.DisplayMember = "ColumnIndex"
            End If

That successfully binds and displays the list for the columns properly.
I would also like to format the dropdown displayed.  I've attempted to access the editor control using the GetDefaultEditor() function of the Column setting that to a grid view.   It however returns nothing.  What event could I use to get to the grid element of the dropdown that will allow me to format the display?

Thank you for the assist.

Dimitar
Telerik team
 answered on 06 Feb 2014
8 answers
199 views

After upgrading the controls from version 2012.3.1211.40 to the latest 2013.3.1127.40 I am seeing an issue only on one type of computer (Panasonic Toughbooks) where after you select an item from a RadDropDownList with a DropDownStyle set to DropDownList you will get a speech bubble with the value that you selected in it. If the RadDropDownList box’s style is set to DropDown, it does not exhibit the same issue and works as expected. I created a basic sample program using just the controls in the two styles with no additional code and I received the same results (see Dropdownlist attachment).  Copying over the Telerik Demo programs I get the same result.

I have tried my little program on several Panasonic computers with the same results but on other non-Panasonic  computers, they act normally.  Any Ideas as to what may be going on since the old version of the controls worked fine.

John

Dimitar
Telerik team
 answered on 06 Feb 2014
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
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?