Telerik Forums
UI for WinForms Forum
9 answers
1.6K+ views
How do I access only the filtered rows in a grid.  I basically need to select the first row that is visible after setting a filter.  I also have other needs for accessing only the rows that are still visible after a filter, but this is my first need.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Dec 2018
6 answers
295 views

Grid just populated with few rows, so there is an empty area below those rows.

Multiselection is enabled.

Grid has just been populated, so there are no selected rows.

If I click on the empty area below the rows, I get this exception:

System.Exception: Exception caught by
CurrentDomain.UnhandledException - type: System.NullReferenceException value:
System.NullReferenceException: Object reference not set to an instance of an
object.<br>   at
Telerik.WinControls.UI.GridRowBehavior.DoMultiFullRowSelect(GridCellElement
currentCell, Point currentLocation)<br>   at
Telerik.WinControls.UI.GridRowBehavior.DoMouseSelection(GridCellElement
currentCell, Point currentLocation)<br>   at
Telerik.WinControls.UI.GridRowBehavior.ProcessMouseSelection(Point
mousePosition, GridCellElement currentCell)<br>   at
Telerik.WinControls.UI.GridRowBehavior.OnMouseMove(MouseEventArgs e)<br>   at
Telerik.WinControls.UI.BaseGridBehavior.OnMouseMove(MouseEventArgs e)<br>   at
Telerik.WinControls.UI.RadGridView.OnMouseMove(MouseEventArgs e)<br>   at
System.Windows.Forms.Control.WmMouseMove(Message& m)<br>   at
System.Windows.Forms.Control.WndProc(Message& m)<br>   at
Telerik.WinControls.RadControl.WndProc(Message& m)

 

if I select a row, before clicking on the empty area, nothing happens.

I could preselect a row, just after populating. but I'd like to understand why this happens

 

Dimitar
Telerik team
 answered on 13 Dec 2018
3 answers
105 views

Hi dear Telerik team.

I have a VirtualGrid.

I have made workaround to substitute indent cell of a row with a text, lets call it "row header".

And I would like to know how can I deal to make "row header" looks absolutely the same as "column header" by the easiest way?

Please find attachment bellow.

Much thanks!

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Dec 2018
1 answer
54 views
When I click the tab on the last cell while it is in edit on the grid view, it should not navigate anywhere instead it should stay on the same cell (last cell) for editing.
Currently, when I click on the Tab button it moves to the next control or moves to the next row in the gridlines.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Dec 2018
0 answers
60 views

Hello,

When I click the tab on the last cell while it is in edit on the grid view, it should not navigate anywhere instead it should stay on the same cell (last cell) for editing.
Currently, when I click on the Tab button it moves to the next control or moves to the next row in the gridlines. Please kindly help me.

Thanks in advance.

Krish
Top achievements
Rank 1
 asked on 12 Dec 2018
2 answers
88 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
48 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
314 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
496 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
171 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
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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?