Telerik Forums
UI for WinForms Forum
3 answers
30 views
Hello, How to add other control elements to radcheckedListBox,such as radDropDownList or radTextBox or radLabel, etc., and how do I add them at a specified position?
Nadya | Tech Support Engineer
Telerik team
 answered on 19 Nov 2024
1 answer
18 views

I have a self-referencing Hierarchy working fine in .NET Framework 4.8,
now I upgraded to .NET 8 with

UI.for.WinForms.AllControls.Net60   2022.2.808-hotfix


public partial class Form1 : Form
{
    private Person[] _people = {
        new Person() { ID=1, Parent =0, Name = "Hans"},
        new Person() { ID=2, Parent =1, Name = "Fred"},
        new Person() { ID=3, Parent =1, Name = "Mary"},
        new Person() { ID=4, Parent =0, Name = "John"}
    };


    public Form1()
    {
        InitializeComponent();

        radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate, nameof(Person.ID), nameof(Person.Parent));
        radGridView1.DataSource = _people;
    }
}


public class Person
{
    public int ID { get; set; }
    public int Parent { get; set; }
    public string Name { get; set; }
}

Now, there are errors produced like "enumeration already finished".
Without this AddSelfReference, everything is fine. (just without the collapsable sections)
Setting DataSource first, doesn't make a difference either.

Something must have changed from the 4.8 to your 6.0 version.

Nadya | Tech Support Engineer
Telerik team
 answered on 18 Nov 2024
1 answer
21 views

as following picture shows, I have a hierarchical "Grid View", when the amount of data is too large, I can not see the horizontal scrollbar of “Event”

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Nov 2024
1 answer
29 views
Hello,

I have code similar to this


private void OnCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
    if (/*some-condition-that-are-always-true-for-all-cells-in-specific-column*/true)
    {
        e.CellElement.Children.Clear();
        e.CellElement.Children.Add(new RadButtonElement { Text = e.CellElement.Value?.ToString() });
    }
}

So basically, what I'm trying to achieve is to make GridViewDataColumn look and behave like GridViewCommandColumn (currently I handle clicks on the button inside cells CellClick event handler)


My questions are:
  1. Are there any performance drawbacks of mine implementation (i.e., related to the fact that the cell formatting event could be fired very often) ?
  2. Is there a way to dynamically change grid column types. For example, after data binding, a column becomes a GridViewDataColumn but after clicking a button somewhere in a form it changes to GridViewCommandColumn?
 
Thanks
Dinko | Tech Support Engineer
Telerik team
 answered on 14 Nov 2024
1 answer
17 views

When the GanttView opens, the ratio of the text (left) side to the graphical (right) side is 50/50.

This looks strange, as there may be either lots of space to the right of the right-most column of text, or not enough space if you have lots of columns.

There may be a better way to do this, but to make the left hand (text) columns have the correct with, and stay correct, add this:

  Private Sub resetSplitter()
      Dim allColWidths = 0
      For Each c As GanttViewTextViewColumn In myGanttView.GanttViewElement.Columns
          allColWidths = allColWidths + c.Width
      Next

      If allColWidths <> 0 Then 'might still be initializing
          allColWidths += 5 'removes the horizontal scroll bar from the text part - makes the left hand side look a bit neater
          myGanttView.Ratio = allColWidths / myGanttView.Width
      End If


  End Sub

You can then call this from:

1 - the Load event, so it looks nice at the start and

2 - from the resize, so it stays looking nice:

    Private Sub myGanttView_Resize(sender As Object, e As EventArgs) Handles myGanttView.Resize
        resetSplitter()
    End Sub
Nadya | Tech Support Engineer
Telerik team
 answered on 14 Nov 2024
1 answer
31 views

Hello!

I was trying to use Sorting/Filtering/Grouping while using VirtualMode by using the default properties and methods and wasn't able to. I found this that said "In the future editions of RadGridView, we have planned to implement virtual grouping operations with a simpler and more useful API." in the year 2009. Have there been any changes? Can i use the functionalities that i want while using VirtualMode without having to override and subscribe several events to workaround this problem?

 

JP

Nadya | Tech Support Engineer
Telerik team
 answered on 14 Nov 2024
2 answers
138 views
In my case, the child gridview is so height(about one thousand records) and cannot see the horizontal scroll until the vertical scroll to the end. And I cannot found anyway to set the gridViewTemplate's width and height (not a row's height), so,  if cannot set these , then I don't know how the VerticalScrollState and HorizontalScrollState works?

Hope to get help.

Thanks!
neil
Top achievements
Rank 1
Iron
 answered on 14 Nov 2024
2 answers
118 views

I have a customer that when adding new records to my data grid doesn't want the records to disappear until the grid is refreshed.

For example, in the screen shot, the user has filtered the rows to State Program = "AK FFS" and NDC = "42543-003-01".  The user want to see the existing values while creating the new record i.e.,  NDC 42543-003-02.  When the user enters all the fields and the record gets added it disappears because of the current filters applied.  Is there a way to by-pass the filters on the newly added rows?

Appreciate any advise.

Álvaro
Top achievements
Rank 1
Iron
Iron
 answered on 05 Nov 2024
1 answer
15 views

Hi,

Is it possible to override the colour and width of the horizontal drag / drop visual cue? If so can you give me an example ?

 

Cheers

Toby

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Nov 2024
1 answer
39 views
During implementation different own styles, I've noticed some confusing moments, and I could find the explanation in docs.

Working with Padding Border and Margin expected structure was as it is described in a picture. Row element Content contains Cell element.

1)[RowBorders]
After format implementation Cells cover Row border.

        private void RadGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            e.CellElement.DrawFill = true;
            e.CellElement.BackColor = Color.Orange;
            e.CellElement.NumberOfColors = 1;

            e.CellElement.BorderColor = Color.Yellow;
            e.CellElement.BorderWidth = 3;
            e.CellElement.DrawBorder = true;
            e.CellElement.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.SingleBorder;
            e.CellElement.BorderGradientStyle = Telerik.WinControls.GradientStyles.Solid;
        }

        private void RadGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
        {
            e.RowElement.DrawFill = true;
            e.RowElement.BackColor = Color.GreenYellow;
            e.RowElement.NumberOfColors = 1;

            e.RowElement.BorderColor = Color.Aqua;
            e.RowElement.BorderWidth = 3;
            e.RowElement.DrawBorder = true;
            e.RowElement.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.SingleBorder;
            e.RowElement.BorderGradientStyle = Telerik.WinControls.GradientStyles.Solid;
        }
2)[Row Padding]
In case of adding padding to the row, cells were not surrounded by some row spaces, but only size of row and it's cells were increased.

e.RowElement.Padding = new Padding(20,20,20,20);
3)[Row and Cell Margin]
Setting Margin to the row or cell, adds margin to the group of rows or cells. (there is no margin between rows and cells)


e.RowElement.Margin = new Padding(20,20,20,20);
e.CellElement.Margin = new Padding(10, 10, 10, 10);
3.1) [Cell Margin Right side]
As you can see from the previous picture margin wasn't added to the group of cells on the right side.

4) Is there any docs about BorderThickness using, because only way of changing of changing Thickness of each border i see as BorderTopWidth, BorderBottomWidth, BorderLeftWidth, BorderRightWidth.

I would appreciate if you share docs where I can understand the concept of this implementations.
Thank You!
Dinko | Tech Support Engineer
Telerik team
 answered on 04 Nov 2024
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
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
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
Accessibility
VirtualKeyboard
NavigationView
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
n
Top achievements
Rank 1
Iron
Iron
Arifullah
Top achievements
Rank 2
Iron
Iron
Marat
Top achievements
Rank 1
Richard
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 2
Iron
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
n
Top achievements
Rank 1
Iron
Iron
Arifullah
Top achievements
Rank 2
Iron
Iron
Marat
Top achievements
Rank 1
Richard
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 2
Iron
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?