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
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) ?

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

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.Click02.'Populate selected cells with "FF"03.Try04.Dim cell As GridViewCellInfo05. 06.If dgvMain.SelectedCells.Count > 0 Then07._lastGridChange.Clear08.End If09. 10.For Each cell In dgvMain.SelectedCells11._lastGridChange.Add(cell.RowInfo.Index & "," & cell.ColumnInfo.Index & "," & cell.Value)12.cell.Value = "FF"13.Next14.Catch ex As Exception15.ShowErrorBox("No cell selection detected. Be sure to select a cell first.")16.End Try17.End SubLine 11. _lastGridChange saves the values before they are updated
01.Private Sub dgvMain_ContextMenuOpening(sender As Object, e As ContextMenuOpeningEventArgs) Handles dgvMain.ContextMenuOpening02. 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. Try12. 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 Exception17. End Try18. 19. Try20. AddHandler FF_MenuItem.Click, AddressOf FF_MenuItem_Click21. AddHandler HH_MenuItem.Click, AddressOf HH_MenuItem_Click22. AddHandler CC_MenuItem.Click, AddressOf CC_MenuItem_Click23. AddHandler ClearColumn_MenuItem.Click, AddressOf ClearColumn_MenuItem_Click24. Catch ex As Exception25. End Try26.End SubSetting up the ContextMenu Options
The link for Navigation - Context Menu opens the "Menu" page and not the "Context Menu" page.

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.
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

Hello,
I have two RadGridView bound to two different Lists, on two different tabs of a tab control; I DeferRefresh, set the data source, set AutoSize columns mode to none and then call BestFitColumns
The second grid, containing just two example rows, gets its columns resized as expected, but not the first that looks like nothing happened.
The strange behavior is that, if I manually resize (aka click the corner of the window and drag) even just of some pixels the WinForm where the tabs and the grids are staying, the columns gets refreshed to the best fit, as expected from the BestFitColumns command, somehow like it was not refreshed after the bind. This grid have 60 rows, not so many, both Lists contains the same class, so the amount of columns is the same; both grids have the same attributes.
Any idea?
Thank you in advance
Best regards
