Telerik Forums
UI for WinForms Forum
1 answer
109 views

dear all, i m facing the following issue when i pressed shortcut key which is "Ctrl + F" register in my application using the following code.

[code]

this.grdMain.GridViewElement.Shortcuts.Add(new RadShortcut(Keys.Control, Keys.F));
this.grdMain.GridBehavior = new ModifiedGridActions();

[/code]

and overriding the keyprocess function in grid behaviors using the following code

[code]

public class ModifiedGridActions : BaseGridBehavior
        {
            public override bool ProcessKey(KeyEventArgs keys)
            {
                try
                {
                    if (keys.Control && keys.KeyCode == Keys.F) // issue on this line
                    {
                        this.GridControl.MasterView.TableFilteringRow.Cells["cName"].BeginEdit();
                    }
                }
                catch (Exception ex)
                {
                }
                return base.ProcessKey(keys);
            }
        }

[/code]

when i press ctrl + f above override function triggers but its parameter only contains keys.control is true and keys.keycode property contains 17 which also ctrl code. what i expect is to get keys.control is true and keys.keycode should contains keys.F so that my logic can execute am i implementing somthing wrong.

Dimitar
Telerik team
 answered on 20 Feb 2017
3 answers
131 views
Hello,

I am trying to keep an object in the Tag property of a tool window.
But when I dock the tool window to a position the tag property becomes null.

  

 

ToolWindow window = new ToolWindow();   
_documentTabStrip.Controls.Add(window);  
window.Tag = "Tag";  // Here I assign a tag   
_radDock.DockControl(window, DockPosition.Top, DockType.ToolWindow);  
// The Tag property of the docked toolwindow is null (_radDock.ToolWindows[0].Tag is null)  
 

Is there any way to find the docked window in the _radDock to set its Tag.
Please help.
Burhan Eyimaya

 

 

 

 

 

 

 

 

 

 

Hristo
Telerik team
 answered on 20 Feb 2017
0 answers
90 views

Hi,

I'm creating password with track bar.

I do not know how to write code (TrackBar.Value):

 

Please check my code:

01.int PassLength = 0;
02.static string Shuffle(string input)
03.{
04.    var q = from c in input.ToCharArray()
05.            orderby Guid.NewGuid()
06.            select c;
07.    string s = string.Empty;
08.    foreach (var r in q)
09.        s += r;
10.    return s;
11.}
12.private void CreatePassword_Click(object sender, EventArgs e)
13.{
14.    txt_CreatePass.Text = "";
15.    string text = "aAbBcCdDeEfFgGhHiIjJhHkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ01234567890123456789{,;:!*$@-_=^[}{,;:!*$@-_=^[}";
16.    text = Shuffle(text); //shuffle the above symbols using shuffle() method.
17.    text = text.Remove(PassLength); //cut the string size according to the chosen trackbar value.
18.    txt_CreatePass.Text = text;
19.}
20. 
21.private void TrackBar_ValueChanged(object sender, EventArgs e)
22.{
23. 
24.    this.TrackBarCreatePass.Value = Convert.ToInt32(+1);
25.    lbl_Count.Text = PassLength.ToString();
26. 
27.    //lbl_Count.Text = TrackBarCreatePass.Value.ToString();
28.    //PassLength = this.TrackBarCreatePass.Value;
29.}
30. 
31.private void TrackBar1_CreatePass_ValueChanged(object sender, EventArgs e)
32.{
33.    PassLength = TrackBar1_CreatePass.Value + 1; //trackbar value starts from 0, so I add +1 to make it understandable;
34.    lbl_Count.Text = PassLength.ToString();
35.}
saeid
Top achievements
Rank 1
 asked on 19 Feb 2017
1 answer
184 views

Is there any way to apply a StyleRepository object to a control? I know I can do something like:

         Theme currenTheme = ThemeRepository.FindTheme(ThemeResolutionService.ApplicationThemeName);
         StyleRepository repositoryFromTheme = currenTheme.FindRepository("DisabledForeColor");
         PropertySetting styleForeColor = repositoryFromTheme.FindSetting("ForeColor");
         Color colorToSet = (Color)styleForeColor.Value;
         myTextBox.Forecolor = colorToSet;

However, if I have multiple properties to set (say, multiple colors and maybe some transparency or a background image or something), this can get a bit tedious and it lacks flexibility. So, what I'd like to do is just take the StyleRepository object and apply it directly to the control. Alternately, I'd be fine with looping through the settings collection and applying each of those individually so long as I didn't have to hard code the names of the PropertySettings into my code. Something like:

         foreach (PropertySetting currentPropertySetting in repositoryObjectFromTheme.Settings)
         {
            genericRadControl.SOMETHING = currentPropertySetting;
         }

would work for me fine as well.

Any suggestions?

 

Hristo
Telerik team
 answered on 17 Feb 2017
2 answers
651 views
Hi, I am working with the Rich Text Editor Ribbon Bar in WinForms.  I want to hide the entire File menu options.  How can this be done?
Bill
Top achievements
Rank 1
 answered on 17 Feb 2017
4 answers
572 views
Hello,

Since last version, how could I change column index, because now it seems that "Telerik.WinControls.UI.GridViewColumn.Index" is read only ?

Thanks.
Hristo
Telerik team
 answered on 17 Feb 2017
5 answers
134 views

Hello,

There is a bug in gridview printiing with mode landscape only

with this gridview :

http://creiler.free.fr/window_gridview.jpg

My PrintStyle :

 With oStyle

                .FitWidthMode = PrintFitWidthMode.NoFitCentered
                .PrintGrouping = False
                .PrintSummaries = True
                .PrintHeaderOnEachPage = True
                .PrintHiddenColumns = False
                .PrintHierarchy = True
                .PrintAllPages = True
                .HierarchyIndent = 0
                .CellFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
                .HeaderCellFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
                .SummaryCellFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
                .GroupRowFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
            End With​

 

normal :

http://creiler.free.fr/gridview1.jpg

landscape :

http://creiler.free.fr/gridview2.jpg​​

Summary cells are shifting 
Hristo
Telerik team
 answered on 16 Feb 2017
5 answers
419 views
Hi,

Is there some way to get the underlying datasource record when hovering over a cell in the RadGridView?
If not, is there some way to get all cellvalues of the row of the RadGridViewwhere where I'm hovering over?

Reason, I display a RadOffice2007ScreenTipElement when hovering over some cell in the RadGridView and I would like to display some information in there.
For this I need to get to that data BUT I do not want to select that row!!!
The row that was/is selected must stay selected!!

regards
Didier
Dimitar
Telerik team
 answered on 16 Feb 2017
2 answers
172 views

Hi, 

I have to add a ContextMenu to my MultiColumnComboBox. I already added a Winforms ContextMenuStrip and also set the ContextMenu Property. 

Now when I click on my dropDownButton of the ComboBox the right ContextMenu is shown but if I click in the middle of the textboxelement of the Combobox I get another one I do not want. Setting the ContextMenu of the textboxelement doesnt change that behaviour. 

THIS-OBJECT:MultiColumnComboBoxElement:TextBoxElement:TextBoxItem:HostedControl:ContextMenuStrip = THIS-OBJECT:contextMenuStripMain

Does anyone have an idea how to solve this ?

 

Sincerely,

Dominik

Dominik
Top achievements
Rank 1
 answered on 16 Feb 2017
23 answers
285 views
I have a 3 level hierarchical grid and I am getting the following error when I try to edit an expanded child row:

System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Telerik.WinControls.GridView"
StackTrace:
at Telerik.WinControls.UI.GridViewEditManager.InitializeEditor(IInputEditor activeEditor)
at Telerik.WinControls.UI.GridViewEditManager.BeginEdit()
at Telerik.WinControls.UI.GridRowBehavior.OnMouseUpLeft(MouseEventArgs e)
at Telerik.WinControls.UI.GridRowBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.BaseGridBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.RadGridView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
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(Int32 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(Form mainForm)
at CU_Estimating_v2.Program.Main() in C:\Documents and Settings\APahlka\My Documents\Visual Studio 2008\Projects\CU_Estimating_v2\CU_Estimating_v2\Program.cs:line 23
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

If the row is not expanded, then I don't get the error. The grid looks something like this when the error occurs:
- Parent
  - Child (trying to edit and get’s error) 
     Grandchild

I don’t get it when the child row is not expanded like this:
- Parent
+ Child (trying to edit and no error)

I'm trying to duplicate it on a smaller project, but I have not been able to yet.

Do you have any suggestions to try?

Thank you,
Aaron
Dimitar
Telerik team
 answered on 15 Feb 2017
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
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?