Telerik Forums
UI for WinForms Forum
2 answers
143 views

Hi,

VirtualGrid highlights a row with selected cell by default,

could you please assist me with information how can I highlight a column too?

Much thanks!

Yuri
Top achievements
Rank 1
 answered on 12 Dec 2018
0 answers
63 views

I open all child forms in maxmized state but when i close the form i find all other forms i opened before not maxmized as it appears that any form get maxmized makes all forms that was opened before it lose their maxmized state

i need to make all child forms i open to always stay in maxmized state

ahmed
Top achievements
Rank 1
 asked on 12 Dec 2018
3 answers
471 views

     I want to let the user to color some words or phrases in a Textbox.

I thought the features of RadTextBoxControl would be good for that. (In between RadTextBox and RichTextEditor)

First handicap, I seem to have no influence on Block Creation, meaning on how the text is split into Blocks.

Than I assign a text like 'Dvoraks "New World" Symphony'

I get Blocks like

  • Dvoraks
  • "New
  • World"
  • Symphony

Not really what I wanted.

I found no other way than this:

radTextBoxControl1.TextBoxElement.ViewElement.Children.Add(new TextBlockElement() {Text = "Dvoraks"});
radTextBoxControl1.TextBoxElement.ViewElement.Children.Add(new TextBlockElement() {Text = "\"New World\""});
radTextBoxControl1.TextBoxElement.ViewElement.Children.Add(new TextBlockElement() {Text = "Symphony"});

Is this a good way, the recommanded way, to do custom splitting ?

Next: I could not attach a click event to a text block.

I found your Demo with a Button inside a TextBox (implementing ITextBlock on RadButtonElement) this works fine.

But something like this, is just never called (replacing the "new TextBoxElement" with "new TBE" in the above snippet of course)

public class TBE : TextBlockElement
    {
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
        }
    }

 

Than I tried to subscribe to the Click-Event directly. (The Click Event of the TextBlockElement). No catched event either.

Another try:

radTextBoxControl1.TextBoxElement.MouseDown += TextBoxElement_MouseDown;
 
private void TextBoxElement_MouseDown(object sender, MouseEventArgs e)
        {
            var clickedElement = radTextBoxControl1.ElementTree.GetElementAtPoint(e.Location) as ITextBlock;
            if (clickedElement != null)
            {
            }
        }

 

No success either: The GetElementAtPoint always returns the TextBoxElement, which is not wrong, but I want a children of it, a TextBlock.

 

So I need help on how to catch a click on a TextBlock,... than finally I can color my Block on user click (with setting textblock.ForeColor = Red f.e.).

 

Finally, what I'am missing also is Selecting a TextBlock. The Select Functions of TextBoxControl are all character based.

But has the TextBlock information about it's own position in the whole Text ? Is this the Offset/Length Property  ? Documentation don't gives me any clue, if this is something measured in pixel, number of characters, or whatever.

So how do I something like textBoxControl1.Select(textblock) ?

 

 

 

 

Hristo
Telerik team
 answered on 12 Dec 2018
4 answers
598 views
Successful to get the button into header cell for expanding/collapsing the group columns except last one (this is sum of the reaming  columns since should not be collapsed) in each group.

This has been achieved by creating button in header cell through  radgrid CreateCell event.

But failed to achieve couple of below things,
Refer attached screenshot, expand/collapse button must be placed in title of the group, marked 1 in attached image. New position should be marked  in second image.
Button image must be changed, meaning while expanding, there is should be one image ,when collapsing there should be another image.
(Have tried this, but it is behaving strange, button image is getting changed in different position, seems it is redrawing )

Appreciate, if somebody could help us to accomplish this
sajin
Top achievements
Rank 1
 answered on 12 Dec 2018
8 answers
236 views

Hi!

I need help to use our custom DropDownPopupForm (custom means that we have items in the list and after the DropDownListElement we have one RadButtonElement) for auto completion feature too.
Our custom DropDownList works as expected, when I click on the downward arrow then it shows our customized DropDownPopupForm, but when I start typing into the DropDownList then suggestions are not formatted the same way as in the previous scenario (they are not formatted at all).

I found that the AutoCompleteSuggestHelper class has the following line:
"internal bool isSuggestMode = false;//indicates this as Suggest DropDownList e.g. this is a second drop down"

So if I try to use our custom DropDownListElement, then I can not set this field from outside the package.

 

Thank you,
Sandor

 

 

Sandor
Top achievements
Rank 1
 answered on 11 Dec 2018
7 answers
463 views
I've been trying for 2 days now to download the latest QuickStart app, the one with the infamous MainForm, and have been unsuccessful.  It seems there's many versions of this, most of which I found in forum threads. 

The last one I got is "079906_QSF".   A number of erros come up when I try to build it, so it won't even build, and it does have the MainForm, but it won't even open in VS. 

Also, I noticed this QSF project/solution is in C#.  I primarily use VB.  So does a VB version of this QuickStart/Example app exist?  I'm very curious to understand how that MainForm was built. 

Thank you much for your time,
Daniel


Here's some of the errors when I try to build the project:

Error 13 The name 'EnsureChildElements' does not exist in the current context 

Error 8 'Telerik.WinControls.UI.RadRotatorElement.OnBubbleEvent(Telerik.WinControls.RadElement, Telerik.WinControls.RoutedEventArgs)': cannot change access modifiers when overriding 'protected' inherited member 'Telerik.WinControls.RadElement.OnBubbleEvent(Telerik.WinControls.RadElement, Telerik.WinControls.RoutedEventArgs)' 079906_QSF\QSF\QuickStart\RadRotator\RadRotatorElement.cs 282 30 QuickStart

Error 17 'Telerik.WinControls.UI.RadCarouselElement' does not contain a definition for 'EnsureChildElements' and no extension method 'EnsureChildElements' accepting a first argument of type 'Telerik.WinControls.UI.RadCarouselElement' could be found (are you missing a using directive or an assembly reference?) 079906_QSF\QSF\QuickStart\RadCarousel\RadCarouselElement.cs 134 22 QuickStart
--------------------------------------------
And here's the call stack when I try to open the MainForm:

at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.GetMemberTargetObject(XmlElementData xmlElementData, String& member)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.CreateAssignStatement(XmlElementData xmlElement)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.XmlElementData.get_CodeDomElement()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.EndElement(String prefix, String name, String urn)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.Parse(XmlReader reader)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.ParseXml(String xmlStream, CodeStatementCollection statementCollection, String fileName, String methodName)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnMethodPopulateStatements(Object sender, EventArgs e)
at System.CodeDom.CodeMemberMethod.get_Statements()
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
Hristo
Telerik team
 answered on 11 Dec 2018
4 answers
599 views

I wrote some code to capture the user's selected values before changing them. Thus, allowing the changes to be restored to the previous values. 

The problem I ran into was that my click event from the contextmenu is called multiple times. This wipes out the true previous values. I could just add a flag at the beginning of the event, but I was wondering if there was a better way to approach this? why is this click event called multiple times on a single click?

 

01.Private Sub FF_MenuItem_Click(sender As Object, e As EventArgs) Handles FF_MenuItem.Click
02.'Populate selected cells with "FF"
03.Try
04.Dim cell As GridViewCellInfo
05. 
06.If dgvMain.SelectedCells.Count > 0 Then
07._lastGridChange.Clear
08.End If
09. 
10.For Each cell In dgvMain.SelectedCells
11._lastGridChange.Add(cell.RowInfo.Index & "," & cell.ColumnInfo.Index & "," & cell.Value)
12.cell.Value = "FF"
13.Next
14.Catch ex As Exception
15.ShowErrorBox("No cell selection detected. Be sure to select a cell first.")
16.End Try
17.End Sub

Line 11.  _lastGridChange saves the values before they are updated

 

 

 

01.Private Sub dgvMain_ContextMenuOpening(sender As Object, e As ContextMenuOpeningEventArgs) Handles dgvMain.ContextMenuOpening
02. 
03.    FF_MenuItem.Text = "FF"
04.    HH_MenuItem.Text = "HH"
05.    CC_MenuItem.Text = "CC"
06.    ClearColumn_MenuItem.Text = "Clear Column Values"
07. 
08.    Dim separator As RadMenuSeparatorItem = New RadMenuSeparatorItem()
09.    e.ContextMenu.Items.Add(separator)
10. 
11.    Try
12.        e.ContextMenu.Items.Add(FF_MenuItem)
13.        e.ContextMenu.Items.Add(HH_MenuItem)
14.        e.ContextMenu.Items.Add(CC_MenuItem)
15.        e.ContextMenu.Items.Add(ClearColumn_MenuItem)
16.    Catch ex As Exception
17.    End Try
18. 
19.    Try
20.        AddHandler FF_MenuItem.Click, AddressOf FF_MenuItem_Click
21.        AddHandler HH_MenuItem.Click, AddressOf HH_MenuItem_Click
22.        AddHandler CC_MenuItem.Click, AddressOf CC_MenuItem_Click
23.        AddHandler ClearColumn_MenuItem.Click, AddressOf ClearColumn_MenuItem_Click
24.    Catch ex As Exception
25.    End Try
26.End Sub

Setting up the ContextMenu Options

 

 

 

 

 

Gone2TheDogs
Top achievements
Rank 2
Iron
Veteran
 answered on 10 Dec 2018
3 answers
88 views

The link for Navigation - Context Menu opens the "Menu" page and not the "Context Menu" page. 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Dec 2018
4 answers
263 views

I have RadGridView with GridViewColorColumn . The default color picker dialog is far more advanced than what i need. I just need to allow user to pick basic colors. I see a ENUMS in RadColorDialog  class such as ShowBasicColors, ShowSystemColors, ShowWebColors, ShowProfessionalColors. 

Question is, how do i modify this behavior from Grid?

 

i need to show only basic colors.

 

please help.

 

 

Yanick
Top achievements
Rank 1
 answered on 07 Dec 2018
5 answers
158 views

Hi, 

 

The ability to add a heirarchy to the parent rows in the virtual grid is great, but is there a way to add multiple data types for the children rows?

 

For example 

 

public class Parent{

public string Name = "Parent Row";

public ChildType1 child1 = new Child1();

public ChildType2 child2 = new Child2();

 

}

 

When a user expands the Parent row, is there a way to define new grids for both Child1 and Child2 to be expanded?  This would be super helpful for an asset management project I'm working on. 

 

Thanks,

Mike

 

 

 

Hristo
Telerik team
 answered on 07 Dec 2018
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?