Telerik Forums
UI for WinForms Forum
4 answers
123 views
Ivan Todorov
Telerik team
 answered on 17 Jan 2012
3 answers
123 views
Just switched from a Winforms DataGridView to a RadGridView on a client project and the customer has asked if they can have the Selection Rectangle (as shown here http://www.telerik.com/help/winforms/gridview-rows-selection-rectangle.html 
) enabled on the row selectors as well.

Dragging anywhere in the cells starts the selection but attempting to drag over a row header does not continue it. They would like to be able to start selecting multiple rows by dragging from the row selectors (to the left of each row).

The issue is that they are used to the way the old DataGridView works and would like it to work the same way. A minor issue yes, but users don't like change.

Is there a hack so that I can enable the rectangle selection to show and start when a mouse click occurs on the row selector too?

Thanks in advance

Terry
Jack
Telerik team
 answered on 17 Jan 2012
2 answers
124 views
Hello all,

Scenario:
I am using the latest Radcontrols for Winforms (2011.3.11.1116) and I have a list of classes(categories) comprised of the following:
Name (string)
SubCats (List of objects(1) - each with props (Name, list of Reports))
Reports (List of objects(1) - each with props (list of Reports)) 

Reports is made up of Name and ID

Is it possible to use something like:
.Displaymember = "Name\Name\Name\Name"
.ChildMemeber = "categories\Reports\SubCats\Reports

or am I forced to loop through my class and populate the nodes manually?

Any help is appreciated.
Julian Benkov
Telerik team
 answered on 17 Jan 2012
1 answer
161 views
Hi
I want to update Rad Control for WinForms Q3 2010 to latest version. How can I do it.
I try to use tool update of Telerik: Project Update Utility. But it occurs so many errors.
Thank you.
Stefan
Telerik team
 answered on 17 Jan 2012
4 answers
223 views
Hi,

I am having problems with using MultiComboboxes in GridView while using the filter bar.
Normal editing is ok after I have handled the RadGridView1_CellEditorInitialized event
If I click on the filter bar column and then select a value it throws this error:

System.Reflection.TargetInvocationException was unhandled
  Message=Exception has been thrown by the target of an invocation.
  Source=mscorlib
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Delegate.DynamicInvoke(Object[] args)
       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, Boolean ignoreSyncCtx)
       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 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at Telerik.WinControls.RadControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.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 System.Windows.Forms.Application.Run(ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at RMS.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
  InnerException: System.NullReferenceException
       Message=Object reference not set to an instance of an object.
       Source=Telerik.WinControls.GridView
       StackTrace:
            at Telerik.WinControls.UI.ScrollableRowsContainerElement.RemoveElement(Int32 position)
            at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureElements()
            at Telerik.WinControls.UI.BaseVirtualizedContainer`1.MeasureOverride(SizeF availableSize)
            at Telerik.WinControls.UI.ScrollableRowsContainerElement.MeasureOverride(SizeF availableSize)
            at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
            at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
            at Telerik.WinControls.UI.RowsContainerElement.MeasureOverride(SizeF availableSize)
            at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
            at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
            at Telerik.WinControls.UI.ScrollViewElement`1.MeasureView(SizeF availableSize)
            at Telerik.WinControls.UI.ScrollViewElement`1.MeasureOverride(SizeF availableSize)
            at Telerik.WinControls.UI.GridTableElement.MeasureOverride(SizeF availableSize)
            at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
            at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
            at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
            at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayoutCallback(ILayoutManager manager)
       InnerException:

the InnerException shows a System.NullReferenceException so I tried to force the filter value by handling the editor_TextChanged event, the code runs but the error is still thrown, code below:

Private Sub RadGridView1_CellEditorInitialized(sender As Object, e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles RadGridView1.CellEditorInitialized
    Try
        Dim editor As Telerik.WinControls.UI.RadMultiColumnComboBoxElement = TryCast(e.ActiveEditor, Telerik.WinControls.UI.RadMultiColumnComboBoxElement)
        If editor IsNot Nothing AndAlso editor.Columns IsNot Nothing Then
            With editor
                If .ValueMember = "pkPostID" Then
                    .Columns("pkPostID").IsVisible = False
                    .Columns("tPostUPN").HeaderText = "UPN"
                    .Columns("tJobTitleName").HeaderText = "Job Title"
                    .Columns("dtPostStart").HeaderText = "Start Date"
                    .Columns("dtPostEnd").HeaderText = "End Date"
                ElseIf .ValueMember = "pkEmployeeID" Then
                    .Columns("pkEmployeeID").IsVisible = False
                    .Columns("lEmployeeNumber").HeaderText = "Emp Num"
                    .Columns("tEmployeeFirstName").HeaderText = "First Name"
                    .Columns("tEmployeeLastName").HeaderText = "Last Name"
                End If
                .AutoSizeDropDownToBestFit = True
                .AutoFilter = True
                RemoveHandler editor.TextChanged, AddressOf editor_TextChanged
                AddHandler editor.TextChanged, AddressOf editor_TextChanged
            End With
        End If
    Catch ex As Exception
        Call MessageBox.Show(ex.Message)
    End Try
End Sub
 
Private Sub editor_TextChanged(sender As Object, e As System.EventArgs)
    Try
        Dim editor As Telerik.WinControls.UI.RadMultiColumnComboBoxElement = DirectCast(Me.RadGridView1.ActiveEditor, Telerik.WinControls.UI.RadMultiColumnComboBoxElement)
        With editor
            If .ValueMember = "pkPostID" Then
                With .EditorControl
                    With .MasterTemplate.FilterDescriptors
                        .Remove("filterUPN")
                        .Add("filterUPN", Telerik.WinControls.Data.FilterOperator.IsEqualTo, editor.Value)
                    End With
                    .TableElement.Update(Telerik.WinControls.UI.GridUINotifyAction.FilteringChanged)
                End With
            ElseIf .ValueMember = "pkEmployeeID" Then
                With .EditorControl
                    With .MasterTemplate.FilterDescriptors
                        .Remove("filterEmpNum")
                        .Add("filterEmpNum", Telerik.WinControls.Data.FilterOperator.IsEqualTo, editor.Value)
                    End With
                    .TableElement.Update(Telerik.WinControls.UI.GridUINotifyAction.FilteringChanged)
                End With
            End If
        End With
    Catch ex As Exception
        Call MessageBox.Show(ex.Message)
    End Try
End Sub

If I select filters on other columns that are not MultiComboboxes they work without error.

I only have 2 columns in the grid that use multicomboboxes, the ValueMember and DisplayMember values are as follows:
Column 1 "POST"
ValueMember = "pkPostID" underlaying value datatype is Integer32
DisplayMember = "tPostUPN" underlaying value datatype is String

Column 2 "Employee"
ValueMember = "pkEmployeeID" underlaying value datatype is Integer32
DisplayMember = "lEmployeeNumber" underlaying value datatype is Integer32

the data is types and values are the same in the GridViewMultiComboBoxColumn elements.

Any help/ideas would be most welcome.

Thanks 

Wayne Steel
Mako
Top achievements
Rank 1
 answered on 17 Jan 2012
2 answers
110 views
Hi,

I have a Main form that is set to MDI Parent This has a RadRibbon and a RadDock.the Dock is set to  Auto Detect Mdi Children

I then Load a Form which contains a DataGridView in a Panel. I want to change the RadRibbon on the Main form to a Context Menu for the DataGridView when it is clicked and when the Form is Clicked the menu should return to the Form context.

I can switch to the DataGridView using its GotFocusEvent

To switch back the Form it is on does not fire the GotFocus, Activated or Click Events. is is possible to find out when the user has clicked on a form?

Thanks
Stefan
Telerik team
 answered on 17 Jan 2012
3 answers
74 views
Hi,

I have created a class that derives from the RadRibbonBar so that i can create the elements on the bar in code and create an instance of the bar to apply them to my Form.

public class SappsRibbonBar : RadRibbonBar
{
   public void CreateSappsRibbonBar(MenuType MenuType)
   {
      BuildFromDB(MenuType);
   }
}

this builds the bar ok but there seems to be no theme attached to the bar. is there something i'm missing?

thanks
Stefan
Telerik team
 answered on 17 Jan 2012
3 answers
88 views
Hi,
I have just upgraded to .1219 and would like to use the new nice features with the TelerikEditor.

this.richRibbonBar1 = new TelerikEditor.RichRibbonBar();


I get this error msg:

Error 3 The type or namespace name 'TelerikEditor' could not be found (are you missing a using directive or an assembly reference?)

What have I missed here?

Thank you,
Karl
Nikolay
Telerik team
 answered on 17 Jan 2012
1 answer
161 views
i want  to know  how to add the rows added by the users to be added on the top
and also want to know how to add the rows that added by programatically to be added on the top.

i use the bound mode.i bind List<> to the "gridview.DataSource".
 
 
Stefan
Telerik team
 answered on 16 Jan 2012
15 answers
535 views
How do I load the existing themes (e.g. Office2007Black) into the visual style builder to customize them?  Loading the RadForm control simply loads the control default, and I cannot add from assembly because, I believe, the RadForm does not inherit from RadControl and thus is not a choice.
Svett
Telerik team
 answered on 16 Jan 2012
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
ProgressBar
CheckedDropDownList
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?