Telerik Forums
UI for WinForms Forum
1 answer
332 views
Hi
I have a RadDock control with a number of ToolWindows on it. The ToolWindows have CloseAction set to Hide. The user can "open" or "close" a toolwindow from a state button (and also a checked menu item). The state of the button (and the check on the menu) should indicate the whether or not the ToolWindow is displayed. Is there a way to tell if a ToolWindow is hidden programmatically?

Thanks
Julian Benkov
Telerik team
 answered on 05 Nov 2009
1 answer
130 views
1. I like to submit a "bug report" that the Enter Key is not toggling expansion / collapse of the ChildGridViewTemplates of the CurrentRow unless they were previously expanded since the RadGridView has been opened.  In cases where it's not toggling, it's passed to RadGridView's KeyDown Event.  In cases where it is, it's passed to BaseGridBehavior's undocumented, Override-able ProcessKey Function.

2. I like to submit a "feature request" that an option be added to turn on / off the ChildView expansion / collapse behavior of the Enter Key.  When "on", it would always toggle expansion / collapse regardless of whether a Row was previously expanded.  When "off", it would do nothing except be passed to RadGridView's KeyDown Event.  a. The use of the Left and Right keys to expand / collapse a hierarchical / tree-like list are much more universal (see Windows Explorer, Outlook, VS, SSMS) where as the only place I could find the Enter Key key being used that way is the the Solution / Property Explorers in MS' VS and SSMS (not exactly common software for end-users) (1).  b. the Enter Key is commonly used for other purposes (i.e. selecting / opening an item) even in hierarchical / tree-style lists.  c. To override the Enter Key, I have to use the more difficult / non-intuitive method of overriding the GridBehavior Property vs. KeyDown Event.

(1) http://www.telerik.com/community/forums/winforms/gridview/expand-colllapse-master-parent-childgridviewtemplates-programmatically-in-radgridview.aspx
Jack
Telerik team
 answered on 05 Nov 2009
1 answer
101 views
Hi,
I have urgent problem -> we have a gridview bound to binding list -> is working fine but sometimes im hanfling an exception ( especially when have set groupig for some column )

Here is CallStack for this exception

   w Telerik.WinControls.UI.DataGroup.GetRow(Int32 index)
   w Telerik.WinControls.UI.DataGroup.get_Item(Int32 index)
   w Telerik.WinControls.UI.GridTraverser.MovePrevDataRow()
   w Telerik.WinControls.UI.GridTraverser.MovePrevRow()
   w Telerik.WinControls.UI.GridTraverser.MoveBackwardCore()
   w Telerik.WinControls.UI.GridTraverser.MoveBackward()
   w Telerik.WinControls.UI.GridScroller.ScrollUp(Int32 step)
   w Telerik.WinControls.UI.GridTableElement.vscrollBar_Scroll(Object sender, ScrollEventArgs e)
   w Telerik.WinControls.UI.RadScrollBarElement.OnScroll(ScrollEventArgs args)
   w Telerik.WinControls.UI.RadScrollBarElement.CallOnScroll(ScrollEventType scrollType, Int32 oldValue, Int32 newValue)
   w Telerik.WinControls.UI.RadScrollBarElement.SetThumbPosition(Point thumbLocation, Boolean dragging)
   w Telerik.WinControls.UI.ScrollBarThumb.SetPosition(MouseEventArgs e, Boolean dragging)
   w Telerik.WinControls.UI.ScrollBarThumb.OnMouseMove(MouseEventArgs e)
   w Telerik.WinControls.RadElement.DoMouseMove(MouseEventArgs e)
   w Telerik.WinControls.RadElement.CallDoMouseMove(MouseEventArgs e)
   w Telerik.WinControls.ComponentInputBehavior.OnMouseMove(MouseEventArgs e)
   w Telerik.WinControls.RadControl.OnMouseMove(MouseEventArgs e)
   w Telerik.WinControls.UI.RadGridView.OnMouseMove(MouseEventArgs e)
   w System.Windows.Forms.Control.WmMouseMove(Message& m)
   w System.Windows.Forms.Control.WndProc(Message& m)
   w System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   w Telerik.WinControls.RadControl.WndProc(Message& m)
   w System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   w System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   w System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   w System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   w System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   w System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   w System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   w System.Windows.Forms.Application.Run(Form mainForm)
   w ActSupervisor.Program.Main() w D:\Projekty\Alfavox-src\trunk\Alfa CC\Supervisor\Program.cs:wiersz 58
Jack
Telerik team
 answered on 05 Nov 2009
1 answer
62 views
Hello,
I have a Winform RadGridView binded to a datatable. When I want to export it to excel I have an "index out of range" exception.
Some of columns are hidden, some of columns are in the columnChooser.

Dim exporter As New ExportToExcelML(documentTop.DataGrid) 
exporter.SheetMaxRows = ExcelMaxRows._65536 
exporter.ExportVisualSettings = True 
Dim fileName As String = "c:\ExportedData.xls" 
exporter.RunExport(fileName) 

I'am using the code sample found in the documentation but it crashes on RunExport method.

Martin Vasilev
Telerik team
 answered on 05 Nov 2009
1 answer
115 views
Hi,

First question : 
I have a radGridView in my application. I hide some columns. If I right-clic in the grid, the contextual menu appears and if I clic on "Column chooser" it appears correctly with hidden columns inside. Good.

Now, I want to create a little button to open the column chooser quickly without the contextuial menu. If I call 

Me.DataGrid.ColumnChooser.Show()

the column chooser appears, but it is empty.

Other question : 
Is it possible to change the theme of the columnChooser ? I'am using the desert theme and when I open it, it is still in XP style (blue border).

Thank you for all
Martin Vasilev
Telerik team
 answered on 04 Nov 2009
1 answer
54 views
MDI Parent, with maximised MDI child.

The control box sits marginally low (see shot_01.jpg).
Deyan
Telerik team
 answered on 04 Nov 2009
1 answer
432 views

In our database tables we have a field isDeleted. This indicates if a record is logically deleted. 

There is a Delete-Button on the form. If the user presses this button, the flag should be set, then the data saved. After that the window is closed and the user gets back to the form with the list. The list is built upon a database view with the where-clause "where IsDeleted = 0".

For editing the data I have a detail data form with a ObjectView. On the form there is a RadCheckbox-Control named cbIsDeleted.
The control is bound via the IsChecked-Property to the persistent data.

  • If I check/uncheck the CheckBox with the mouse and save the data, the changed value is saved in the database.
  • If I want to do the same programmatically, on the GUI the Checkbox will be checked/ unchecked. But when I want to save the data - the changed value for the Checkbox wouldn't be stored in the database: 

 

 

cbIsDeleted.ToggleState =   
Telerik.WinControls.Enumerations.ToggleState.On; 

 

I tried also:

 

cbIsDeleted.Checked = true

What's wrong? Should I set some other properties?

Thanks in advance
Bernhard

Nick
Telerik team
 answered on 04 Nov 2009
1 answer
119 views
Good Evening All

I have got a RadPanelBar docked to the left hand side of my MDI form.  I am trying to nest a RadCallander into this RadPanelBar by just dragging and dropping the RadCallander control from the toolbox as detailed in the Getting started section of the panel on the online help (http://www.telerik.com/help/winforms/panel_gettingstarted.html).  However when i add it it adds it to the form rather than into the PanelBar.

Can anyone please tell me where i am going wrong and how to stop this happening?

Thank you in advnace

Luke Frost
Nikolay
Telerik team
 answered on 04 Nov 2009
1 answer
60 views
I'd like to make a "feature request" to add an option to make the Tab appear even when there's only one ChildGridViewTemplate (i.e. only 1 sibling) on a given level.  This would help clarify what the ChildGridViewTemplate is for.

Telerik WinForms 2009Q3 Beta (2009.2.9.1016) / 2009Q2 (2009.2.9.729), VB, VS 2005 (v8.0.50727.762 SP.050727-7600), .Net 2.0 (2.0.50727), XP SP3, 3GB, 2.99GHZ, Core2Duo.
Jack
Telerik team
 answered on 04 Nov 2009
1 answer
117 views
Hi,
     There are two columns in a grid placed in a windows form. The first column is a GridViewComboBoxColumn and the second one is a GridViewDataColumn. I have populated the combo box with values. I need to assign the selected value from the drop down to the cell on which it resides. The code i have written is given below.

private void BindData()
        {
            radGridView1.GridElement.BeginUpdate();
            var gridViewLookUpColumn = ((GridViewLookUpColumn)(radGridView1.CurrentRow.Cells["column1"].ColumnInfo));

            if (gridViewLookUpColumn == null) return;

            gridViewLookUpColumn.DataSource = FillData();
            gridViewLookUpColumn.DisplayMember = "Name";
            gridViewLookUpColumn.ValueMember = "Id";
            gridViewLookUpColumn.DropDownStyle = RadDropDownStyle.DropDownList;

            radGridView1.GridElement.EndUpdate();
        }

        private static DataTable FillData()
        {
            var dt = new DataTable();
            dt.Columns.Add(new DataColumn("Name", typeof(String)));
            dt.Columns.Add(new DataColumn("Id", typeof(Int32)));

            var dr = dt.NewRow();
            dr["Name"] = "Test 1";
            dr["Id"] = 1;
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["Name"] = "Test 2";
            dr["Id"] = "2";
            dt.Rows.Add(dr);
            return dt;
        }

 private void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
        {
            BindData();
        }

        private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
        {
            try
            {
                var radEditor = radGridView1.ActiveEditor;

                if (radEditor == null) return;
                switch (radEditor.GetType().Name)
                {
                    case "RadComboBoxEditor":
                        {

                            var element = ((RadComboBoxElement)((RadComboBoxEditor)radGridView1.ActiveEditor).EditorElement);
                           
                            if (element == null) return;
                            var selectedText = ((RadComboBoxItem) element.SelectedItem).Text;
                            MessageBox.Show("Begin" + selectedText);

                            radGridView1.CurrentRow.Cells["column1"].CellElement.Text = selectedText;
                            //radGridView1.Rows[e.RowIndex + 1].Cells[e.ColumnIndex + 1].Value = element.SelectedValue;                                
                            break;
                        }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }


I can select the value from the dropdown. But the value assigned to the cell is not displaying. Please help me.

Regards
Shamjith


Jack
Telerik team
 answered on 04 Nov 2009
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?