Telerik Forums
UI for WinForms Forum
12 answers
1.1K+ views
Hi there

I have a RadGrid that a user can apply filters to. Once they click on a submit button, I want to extract all filtered rows and then process the data from there.

Is there a built in function to only retrieve the filtered data?

Thank you.
n/a
Top achievements
Rank 1
 answered on 28 May 2020
7 answers
681 views

I'm trying to remove the sort arrow from column headers in the RadListView control.

I attached an image for example.

Thank you.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 May 2020
8 answers
540 views

Using Telerik UI for WinForms 2019.1.117.40

Have a form with multiple controls including RadMultiColumnComboBox. Dropdownstyle is DropDownList. I see the RadMultiColumnComboBox receives focus when tabbing thru the controls, but it will not receive keyboard input initially. I can get it to receive keyboard input on subsequent times if I use the mouse to open the drop-down & close the drop-down 1st.

 

Sequence of actions:

1. tab thru controls to set focus on RadMultiColumnComboBox   <---- keyboard input does not work

2. tab to another control

3. tab to RadMultiColumnComboBox   <----- keyboard input still does not work

4. use mouse to click the drop-down arrow to open

5. use mouse to click arrow to close drop-down

6. use mouse to click on another control

7. tab thru controls to set focus on RadMultiColumnComboBox   <---- keyboard input NOW works.

 

I have tried in code to open and close the drop-down and then tabbing to it, but keyboard input still does not work. Keyboard input only works after I have used the mouse one time to open & close the drop-down.

Is there a way to get the keyboard input to work every time?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 May 2020
5 answers
1.6K+ views
Helo !

In a grid(WinForms), by default, vertical scroll appears to the right side of grid and horizontal scroll appears to the bottom of grid.
but I need to display vertical scroll to the left side of grid and horizontal scroll to the top of grid.

For horizontal scroll, please specify some way to display the scroll at top of grid in following position with respect to grid :
a.  just above column headers
b.  just below column header
c.  just above group descriptor(if group descriptor set to true)
d.  in between group descriptor and column headers.
I need to implement any one of these.

For Vertical Scroll : to the left side of grid
a. After RowHeaderColumn (if ShowRowHeaderColumn set to true)
b. Before RowHeaderColumn (if ShowRowHeaderColumn set to true)
c. Simply at the beginning from left(if ShowRowHeaderColumn set to false)


thanks,

Chan

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 May 2020
1 answer
229 views

I found this code on telerik resource site. This function return value of LinearAxis,

    Private Function GetVerticalAxisValueFromMouse(ByVal e As MouseEventArgs) As Object
        Dim axis As LinearAxis = TryCast(RadChartView1.Axes(1), LinearAxis)
        Dim delta As Double = axis.ActualRange.Maximum - axis.ActualRange.Minimum
        Dim totalHeight As Double = axis.Model.LayoutSlot.Height
        Dim ratio As Double = 1 - (e.Location.Y - Me.RadChartView1.Area.View.Viewport.Y - axis.Model.LayoutSlot.Y) / totalHeight
        Dim value As Double = axis.ActualRange.Minimum + delta * ratio
        Return value
    End Function

 

I want to get value of CategoricalAxis value from CandleStick Chart

Nadya | Tech Support Engineer
Telerik team
 answered on 27 May 2020
1 answer
301 views

Hello,

I am trying to bring into view all elements of a diagram, but cannot manage to fit it to screen. Is there any workaround for BringIntoView method?
I tried to use the followings and won't work.

Last piece of code sometimes works, sometimes doesn't.
Is there a formula to calculate the bounds, the view port size and zoom to fit all elements of a diagram into view?

Thank you!

 

1.
var box = selectedHardwareVariant.Shapes.GetEnclosingBounds();
selectedHardwareVariant.DiagramElement.BringIntoView(box, false);
selectedHardwareVariant.DiagramElement.Controller.OnViewportChanged();

2.

var box = selectedHardwareVariant.Shapes.GetEnclosingBounds(); selectedHardwareVariant.PanToPosition(box.Center()); selectedHardwareVariant.DiagramElement.BringIntoView(box, false); selectedHardwareVariant.DiagramElement.Controller.OnViewportChanged();

3.

Telerik.Windows.Diagrams.Core.DiagramConstants.MinimumZoom = 0.001;
                Telerik.Windows.Diagrams.Core.DiagramConstants.MaximumZoom = 50;
                selectedHardwareVariant.AutoScroll = true;
                selectedHardwareVariant.AutoLayout = true;
                selectedHardwareVariant.ZoomIn(1);
                selectedHardwareVariant.Zoom = 1;
                selectedHardwareVariant.DiagramElement.Controller.OnViewportChanged();
                var box = selectedHardwareVariant.Shapes.GetEnclosingBounds();
                selectedHardwareVariant.PanToPosition(box.Center());
                selectedHardwareVariant.DiagramElement.BringIntoView(box, false);
                selectedHardwareVariant.DiagramElement.Controller.OnViewportChanged();
                IEnumerable<IShape> shapesOutside = selectedHardwareVariant.DiagramElement.Shapes.Where(x => !selectedHardwareVariant.DiagramElement.IsInViewport(x));
                for (int i = 0; i < shapesOutside.Count(); i++)
                {
                    double newZoom = Math.Round(selectedHardwareVariant.Zoom/1.1, 3);
                    box = selectedHardwareVariant.Shapes.GetEnclosingBounds();
                    selectedHardwareVariant.DiagramElement.PanToPosition(box.Center());
                    selectedHardwareVariant.DiagramElement.Controller.OnViewportChanged();
                    selectedHardwareVariant.ZoomOut(newZoom, box.Center());
                    selectedHardwareVariant.Zoom = newZoom;
                    if (selectedHardwareVariant.DiagramElement.Shapes.All(x => selectedHardwareVariant.DiagramElement.IsInViewport(x)))
                    {
                        break;
                    }
                }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 May 2020
5 answers
1.6K+ views
Hey all,

I can't seem to find a way to get the panel to only have a bottom border. It's probably pretty obvious but everything I'm trying isn't working.

So far I've gone into the smart tag for the panel control and messed around with the 'width' property of the various borders under the layout and box area's of the properties. I've done this with both the UI.RadPanelElement and BorderPrimitive areas. I'm setting the width on the side I don't want to show to 0 and that's not working. I've also tried -1 as well as changing the BorderThickness to no avail.

Appreciate any help with this!
Nadya | Tech Support Engineer
Telerik team
 answered on 27 May 2020
2 answers
2.5K+ views

Hello,

I'm having some troubles with the alignment of any control in a layout or panel. Perhaps, I'm missing something trivial. Appreciated your help in this regard. 

The attached image shows the basic approach that I'm looking for. Using RadLayoutControl or RadPanel, I'm not able to keep any control center aligned during design time. It this possible in any way? 

Thanks

Lao

 

Hu
Top achievements
Rank 1
Veteran
 answered on 27 May 2020
1 answer
199 views

This is really for anyone that is using the chart controls and not just the admins. I have the controls working as expected, but I cannot come up with a suitable layout that I like and still works when the form is maximized. By "work" I mean still looking acceptable. For example, when the form is a fixed size, my layout looks fine but when I go full screen on a 34" monitor, there's a ton of unused space and the form looks like a hot mess.

What do folks do in this scenario? I don't have enough charts to fill up that much real estate and if I did, they surely wouldn't fit on a smaller form. Also, I probably wouldn't want to fill up a large monitor with that many charts. 

Are dev's giving the user the ability to build their own dashboards PowerBI style? 

For now I think I'm going to make my form a fixed width and keep moving forward. I will have to circle back to the layout challenges later.

Just curious to know what folks do when they hit this. 

Thanks,

Michael. 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 May 2020
2 answers
1.1K+ views

Hi,

 

I have one RadGridView for WinForm UI.

I bind data dynamically using DataSource property and bind DataTable that is returned from database.

Before binding datasource, I add a GridViewCheckBoxColumn to the RadGridView (for selecting all rows).

 

following is the sample code:

If RadGridView1.MasterTemplate.Columns.GetColumnByFieldName("").Length = 0 Then
            Dim checkBoxColumn As GridViewCheckBoxColumn = New GridViewCheckBoxColumn("")
            checkBoxColumn.EnableHeaderCheckBox = True
            checkBoxColumn.HeaderCheckBoxAlignment = ContentAlignment.MiddleCenter
            checkBoxColumn.AllowFiltering = False
            checkBoxColumn.CheckFilteredRows = False
            checkBoxColumn.HeaderText = String.Empty

            RadGridView1.MasterTemplate.Columns.Add(checkBoxColumn)
            AddHandler RadGridView1.HeaderCellToggleStateChanged, AddressOf RadGridView1_HeaderCellToggleStateChanged
        End If

 

Later I bind the data table:

RadGridView1.DataSource = dataTable

 

Now, I have 2 problems:

1. Checking / Unchecking header check box, checks/unchecks checkboxes of current page only.  I need to perform the operation for the whole grid.

2. I have got filters on.  User can select filters on columns.  Once filters are applied, records are displayed according to those filters (other records are hidden).  Now, when checking the header check box, it only selects records that are part of current page.  For example, if I am on first page and apply filter on one column, grid will hide all rows from the first page that do not match the filter and pull records from 2nd and 3rd pages that match the criteria and show on the first page.  But if I select check box in the header, then only records from first page are selected, records that came from 2nd and 3rd page are not selected.

 

Kindly help.

 

Nadya | Tech Support Engineer
Telerik team
 answered on 26 May 2020
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
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?