Telerik Forums
UI for WinForms Forum
0 answers
160 views

Hello,

I contact you because I have 2 questions about the events of RagGridView control.

  1. I have 2 columns in my GridView (one GridViewTextBoxColumn readonly and one GridViewDecimalColumn editable). The decimal column can have a null value or a decimal value.
    I handle these events : CellValidating, RowValidating and RowValidated. In the CellValidating, I check if my decimal column has a value and in this case it must be between min and max value and display the Row.ErrorText and cancelling the validating event. However if the decimal value is null, I have to ask the user a confirmation when the row is validating, so I do that in the RowValidating event. If the user does not confirm, I cancel the RowValidating and I would like to set the decimal cell as the current cell and BeginEdit. Is it possible in the RowValidating event set a current cell and BeginEdit (in a new row or an existing row) ?
  2. In the GridView I register a custom GridNewRowBehavior and override the ProcessEscapeKey method that execute this code :
    bool canceled = this.GridViewElement.CancelEdit();
    this.GridControl.MasterView.TableAddNewRow.CancelAddNewRow();

    return canceled;       
    If the gridView is in edit mode on the new row or an existing row and I press the Escape key, my custom behaviour performs perfectly this treatment. But the RowValidating and RowValidated events in my form fires. How can I detect in these events that the edit mode is canceling because I would like to reset some properties ?

Thank you
Fabrizio

Fabrizio
Top achievements
Rank 1
 asked on 04 Jun 2019
2 answers
138 views

I want to exclude some columns from searching.  I set the column AllowSearching = false.  The column name is still showing in the 'Search in Columns' menu unchecked.  Can I hide those columns?  I tried :

DirectCast(DirectCast(e.ContextMenu, Telerik.WinControls.UI.RadDropDownButtonPopup).Items(0), Telerik.WinControls.UI.RadMenuItem).Items(i).Visibility = ElementVisibility.Hidden

It hides the menu item with the column name but showing a empty item in the position.  Anyway I can make it disappear?

Thanks.

QQ
Top achievements
Rank 1
 answered on 04 Jun 2019
6 answers
1.0K+ views

So what I have to do basically is create an Excel report of the selected rows of my RadGridView and create a header on the first few rows (above my RadGridView data) with a little information about the report so like the time it was created for example. For now, I'm using GridViewSpreadExport class and passing the RadGridView into the constructor and using the SpreadExportRenderer class. and calling RunExport(...). So I guess my questions are:

 

1.) I seen 3 different ways to export  RadGridView data to Excel: GridViewSpreadExport, GridViewSpreadStreamExport, and ExportToExcelML. Which one is best for what I'm trying to accomplish? 

 

2.) How can I just export the data of the selected rows of the RadGridView?

 

3.) Is there a way to export 2 RadGridView to the same Excel sheet? 

JeffSM
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 03 Jun 2019
5 answers
229 views

Hi,

Is there a way to hide the column header, for example, I want to  hide first column header and shift the item to the left. 

Many thanks,

Omar

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Jun 2019
3 answers
165 views

Using the new open file dialog, set MultiSelect = true

If you only select 1 file, the Open button is disable until you select at least 1 more file

Dimitar
Telerik team
 answered on 03 Jun 2019
5 answers
162 views
I need an PropertyGridDropDownListEditor with icons.
How can I do that?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 May 2019
1 answer
138 views

Hi, 

How can I disable the pinch gesture (aka two finger zoom in or out) which is changing the row height (undesired). For fixing the row height, I have set AllowRowResize = false. With the gesture, the row height can still be made very small or very large with this set to false. This is for version 2014.3.1202.40 of the GridView.

Thanks!

Alan

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 May 2019
1 answer
182 views

I'm testing gridview and add cell values manually without using any datasource.

I'd like to show navigator control for the rows of gridview.

Is there any way to do so?

Dimitar
Telerik team
 answered on 30 May 2019
4 answers
545 views

Hi,

I am overriding ProcessCmdKey to detect when a user press a combination of keys to scroll up and down in the pdfViewer. I'm currently using .PageUp() and .PageDown(), but of course that goes up and down whole pages.

I understand that pdfViewer already has shortcuts using the arrow keys, but that requires that the pdfViewer control be in focus. For our purposes, the user prefers to not lose focus on whatever control they are using, for example, typing in data from the pdf without losing focus of the textbox.

Is there any way that I can use the native function of the Up and Down keys with pdfViewer without requiring that the pdfViewer control be in focus? If I cannot do so, how may I replicate scrolling behavior with my own chosen shortcuts?

        private void ScrollPDFViewer(Keys keyData)
        {

            if (keyData == (Keys.Up | Keys.Control))
            {
                this.radPdfViewer.PageUp();

 

// this.radPdfViewer.PdfViewerElement.Scroller.UpdateScrollValue();
            }
            else if (keyData == (Keys.Down | Keys.Control))
            {
                this.radPdfViewer.PageDown();
            }
        }

Dimitar
Telerik team
 answered on 30 May 2019
1 answer
161 views

I have a RadGridView with EnableGrouping = True and AutoSize = true. When I drag a column to group by it I get an "Exception Unhandled" error in my Program.Cs file;

System.Reflection.TargetInvocationException
  HResult=0x80131604
  Message=Exception has been thrown by the target of an invocation.
  Source=mscorlib
  StackTrace:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   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()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Telerik.WinControls.RadControl.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr 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 TDT.Program.Main() in C:\Users\0123456789\Documents\Visual Studio Projects\TDT\TDT\Program.cs:line 19

Inner Exception 1:
InvalidOperationException: MeasureOverride returned positive infinity: Telerik.WinControls.UI.GroupPanelElement

 

Any suggestions for a workaround?

Dimitar
Telerik team
 answered on 30 May 2019
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
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
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
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?