Telerik Forums
UI for WinForms Forum
2 answers
321 views
Doing a winform app and I've created the dropdownmenu dynamcically as shown below. Now, I can't figure out how to determine which menu item gets selected so I can execute the proper function. Can you assist?

private void radTreeView1_MouseDown(object sender, MouseEventArgs e)
{
  if (e.Button == MouseButtons.Right)
  {
    RadDropDownMenu radMenu = this.DropDownMenu;               

    RadMenuItem radMenuItem = new RadMenuItem();
    radMenuItem.Text = "Open";
    radMenu.Items.Add(radMenuItem);

    radMenuItem = new RadMenuItem();
    radMenuItem.Text = "Save";
    radMenu.Items.Add(radMenuItem);

    radMenuItem = new RadMenuItem();
    radMenuItem.Text = "Print";
    radMenu.Items.Add(radMenuItem);

    radMenu.Show(radTreeView1, e.Location);
  }  
}

Jack
Telerik team
 answered on 21 Jul 2008
1 answer
91 views
Hi there,
I want to programmatically add grouping to my datagrid like so:

radGridView1.MasterGridViewTemplate.GroupByExpressions.Add("[PeriodeID] Group By [PeriodeID]"); 


When I run this the datagrid isn't grouped by the column, only sorted by the column.
When I drag and drop the column the datagrid does get a proper grouping header.
What am i missing?

Tanx!
Robbie
Top achievements
Rank 1
 answered on 21 Jul 2008
1 answer
227 views

 

Hi Guys,

I am having a problem changing the Cursor icon to a hand while hovering or entering over a RadLabelElement within the RadGridView GridViewCommandColumn cell.  I am using the most current version of the controls.

The following is how my controls are placed:

I have a RadGridView control, with a GridViewCommandColumn that contains a RadMenuElement and 4 RadLabelElements.

My problem arises when I try to use the MouseEnter() event handler on the RadLabelElement to change the Cursor type from the default (arrow) to a Hand. It will not make the change.

The following is an outline of the source code that contains the problems described above:

  private void gvManageDocs_CellFormatting(object sender, CellFormattingEventArgs e)    
            {  
                    if (e.CellElement is GridCommandCellElement)  
                    {  
                            GridViewRowInfo gvrRow = e.CellElement.RowInfo;  
                            e.CellElement.Children.Clear();  
                            RadMenuElement buttonElement = new RadMenuElement();  
                            RadLabelElement lblLabel = new RadLabelElement();  
                                                                         
                            lblLabel.Text = "View";  
                            lblLabel.Click += new EventHandler(lblView_Click);  
                            lblLabel.MouseLeave += new EventHandler(lblLabel_MouseLeave);                                  
                            lblLabel.MouseEnter += new EventHandler(lblLabel_MouseEnter);  
                            lblLabel.ForeColor = Color.Blue;  
                            buttonElement.Items.Add(lblLabel);  
                            lblLabel = null;  
   
                            lblLabel = new RadLabelElement();  
                            lblLabel.Text = "Modify";  
                            lblLabel.Click += new EventHandler(lblModify_Click);  
                            lblLabel.MouseLeave += new EventHandler(lblLabel_MouseLeave);  
                            lblLabel.MouseEnter += new EventHandler(lblLabel_MouseEnter);  
                            lblLabel.ForeColor = Color.Blue;  
                            buttonElement.Items.Add(lblLabel);  
                            lblLabel = null;  
                            }          
                
                            e.CellElement.Children.Add(buttonElement);  
                    }  
 
 
void lblLabel_MouseEnter(object sender, EventArgs e)  
        {  
               Cursor = Cursors.Hand;  
               ((RadLabelElement)sender).ForeColor  = Color.Red;  
       }  
void lblLabel_MouseLeave(object sender, EventArgs e)  
        {  
            Cursor = Cursors.Arrow;  
            ((RadLabelElement)sender).ForeColor = Color.Blue;              
        }   
 

Please let me know what I can do to solve this issue.

Many thanks,
Mike

Martin Vasilev
Telerik team
 answered on 18 Jul 2008
1 answer
153 views
Dear telerik,

Before expanded or after expanded, the location of each node will be different.  So how do i know the location of nodes in (x,y)?


Thanks
Jordan
Telerik team
 answered on 18 Jul 2008
3 answers
230 views
Hi,
I have one application with one docking manager that contains some dockPanels and some tabbed documents.
I want to add a tabbed document (Telerik.WinControls.Docking.DocumentPane)
via C# code... what is the best way to do this?

Thanks for support
Lorenzo
Julian Benkov
Telerik team
 answered on 18 Jul 2008
1 answer
80 views
Hi,

Whenever I change the AllowEdit property your obsolete LabelEdit property gets added to my Designer and I receive a warning on compile. I then have to go and manually remove it again. This is probably because when I change AllowEdit the LabelEdit changes with it in the controls designer properties.

Though not critical it is annoying..

Regards,
Brad
Jordan
Telerik team
 answered on 18 Jul 2008
1 answer
117 views
Hi.

I'm using the Theme builder to create my own TreeViewTheme. I've actually also edited the VScrollBar theme to create my own theme. Both themes are in the same Xml File. I'm Trying to use my personal scrollbar in the treeview style but It's not working, the scroll bar looks with the default style, not with my own style.

Thanks.
Jordan
Telerik team
 answered on 18 Jul 2008
1 answer
149 views

Here's my code for filtering the grid:

FilterExpression
filter = new FilterExpression();
    filter.Predicates.Add(
FilterExpression.BinaryOperation.AND,
    GridKnownFunction.EqualTo,
    
GridFilterCellElement.ParameterName);
filter.Parameters.Add(
GridFilterCellElement.ParameterName, 1);
definesGrid.Columns[
"Configuration_Id"].Filter = filter;

No filtering occurs.

What am I missing.

BTW you really need better documention on your products...

Boyko Markov
Telerik team
 answered on 18 Jul 2008
5 answers
180 views
This is exception is being thrown by the RadGridView but it does not happen every time entering a winform.  The data has not changed between attempts.

Are there any suggestions.

Thank you.

"Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

{System.Exception[6]}

"\r\nServer stack trace: \r\n   at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)\r\n   at System.Reflection.Assembly.GetTypes()\r\n   at Telerik.WinControls.UI.EditorManagerBase.LoadTypes(TypeCollection types, Type inheritedType)\r\n   at Telerik.WinControls.UI.EditorManagerBase.LoadTypes(Type inheritedType)\r\n   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)\r\n   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)\r\n   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)\r\n\r\nException rethrown at [0]: \r\n   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)\r\n   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)\r\n   at Telerik.WinControls.UI.EditorManagerBase.TypeLoadDelegateDelegate.EndInvoke(IAsyncResult result)\r\n   at Telerik.WinControls.UI.EditorManagerBase.EditorCallBack(IAsyncResult result)\r\n   at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(IMessage msg)\r\n   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)\r\n   at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(Object o)\r\n   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)\r\n   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)"
Jack
Telerik team
 answered on 18 Jul 2008
1 answer
150 views
I have set a RadButton as AcceptButtonof the windows form.

I have also set the AllowShowFocusCues as true. Button's theme name is set to Vista. However, the button does show the cue that it is default button. Neither at design time nor at run time.

Please Help.
Peter
Telerik team
 answered on 18 Jul 2008
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
Styling
Barcode
BindingNavigator
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
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?