Telerik Forums
UI for WinForms Forum
2 answers
41 views
I need border 3d border style of rad grid view.
Like attached below image.
Shubham
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 15 May 2024
3 answers
60 views

Hello,

I have two problems with selfrefencing hierarchy in GridView. First, my test application is related to this thread, just for info and context, but I am asking question in new thread, as it was recommended to me, and I think this is separate problem not related to original design question.

https://www.telerik.com/forums/gridview---design-of-parameter-editor-with-subitems

I have created more realistic test application (TelerikTestReal in attached project) with new data structures for self referencing hierarchy binding. I can see desired output after program startup. When I add new main item programatically, GridView shows it properly. But, when I change test type of main item and subitems are changed, deleted child rows disappear, but newly added are not shown, as you can see on animation below. After some debugging, I see child rows are added to BindingList bound to DataSource of GridView, I also see ListChanged event of BindingList is properly fired, but GridView doesn't show new child rows. I can show them by calling ResetBindings() method of BindingList. What can be the problem?

The second problem is that I cannot close program after call to ResetBindings() method, I can click close button manytimes, but nothing happens.

Dinko | Tech Support Engineer
Telerik team
 answered on 09 May 2024
1 answer
39 views

Hello,

I'm using a RadDropDownList control and i've noticed when handling the PopupOpening event, the sender object being passed is a RadDropDownListElement object and not the RadDropDownList control itself. Is there a way to get the RadDropDownList object from the RadDropDownListElement object? I need to get the parent control of the actual RadDropDownList control and i can't do this from the RadDropDownListElement object currently. 

I have the same problem with the RadColorBox and its ValueChanged event handler returning a RadColorBoxElement object instead of RadColorBox.

Let me know if you need more information!

Thanks,

Hayley

Dinko | Tech Support Engineer
Telerik team
 answered on 09 May 2024
1 answer
36 views
When exporting data from a RadGridView to a .csv file using the ExportToCSV class, I'd like the resulting .csv file to be sorted to match what the users have on their grid. For example, if a user were to drag a column on the grid to the far left, I'd expect that column to appear first in the .csv file after exporting. Is there a simple way to accomplish this?

Thanks in advance!
Dinko | Tech Support Engineer
Telerik team
 answered on 03 May 2024
0 answers
34 views

My current version is 2024.1.312.40

I tried to load a layout (xml file) saved in a previous version RadGridView and get an error that I cannot intercept. In which way I can either catch this exception or disable their occurrence for the user?

The exception occurs in the method: rdgvMain.LoadLayout(reader) and try is not working;

strLayout, reader, stream are not empty

 

 try
            {
                using (var stream = new StringReader(strLayout))
                {
                    var reader = XmlReader.Create(stream);

                    rdgvMain.LoadLayout();

                    stream.Close();
                    reader.Close();
                }
            }
            catch (Exception ex)
            {
                AddInfo(ex.Message);
            }

 

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.WinControls.UI.GridRowBehavior.OnMouseMove(MouseEventArgs e)
   at Telerik.WinControls.UI.BaseGridBehavior.OnMouseMove(MouseEventArgs e)
   at Telerik.WinControls.UI.RadGridView.OnMouseMove(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseMove(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.RadControl.WndProc(Message& m)
   at Telerik.WinControls.UI.RadGridView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

 

Thanks,

Serhii
Top achievements
Rank 1
 updated question on 03 May 2024
1 answer
34 views

We have a commandbar docked to the right of our form, underneath another user control which is docked to the top. 

The commandbar is one row with two strips in it, and the first strip (the one which is getting out of bounds) has two buttons on it. (see attached images). 

It works fine but when you maximize the form, the first strip appears to lose it's first button.

Inspecting the element properties of the strip shows that for some reason, the ControlBoundingRectangle/BoundingRectangle has it's Y axis set to -42.

Is there any way to reset the ControlBoundingRectangle to back to it's original value or any other method to stop it from going out of bounds?

We're using version 2020.1.113.40


Thanks,

Dinko | Tech Support Engineer
Telerik team
 answered on 03 May 2024
1 answer
61 views

I have a mdi parent with raddock control, I add new forms and I can use the mouse to change the layout of the mdi child in the parent but I cannot make the layoutMDI to work to change the layout

 

this.LayoutMdi(MdiLayout.TileHorizontal);

Just doing something simple to get the idea

 

     private void Form1_Load(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;
            this.radDock1.AutoDetectMdiChildren = true;

            Form form = new Form2();
            form.Text = "MDI Child 1";
            form.MdiParent = this;
          //  form.Show();

            form = new Form2();
            form.Text = "MDI Child 2";
            form.MdiParent = this;
          //  form.Show();

            form = new Form2();
            form.Text = "MDI Child 3";
            form.MdiParent = this;
          //  form.Show();

            this.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal);
        }

 

Dinko | Tech Support Engineer
Telerik team
 answered on 02 May 2024
1 answer
130 views

Hello,
I have question about getting / copying formatted data in GridView. How can I get outside of GridView formatted value of cell? Second, how can I copy formatted data generally? I understand GridView uses virtualization and it formats data only for visual cells. But definitely there must be some methods for formatting data, that are at least used for formatting visual cells from underlying data. I have seen more forum threads and few samples in KB and documentation, I know there are Copying and CopyingCellClipboardContent events, but all samples demostrates manual formatting, for example lookup in combo box cell, or short time string for DateTime. I would like to get standard formatting, as it's displayed in GridView.

Maybe I should ask only to getting formatted value programatically, not standard Copy in GridView, but I have seen more samples for this. I was using WinForms DataGridView before, and there is FormattedValue property in cell object. I think there have to be a way how to get formatted value also in GridView, maybe by calling some method of GridView. About Copy, the best for me would be if I can get formatted value and do Copy manually, because I want to copy more data formats, formatted text representation and binary data for underlying data objects.

Btw. I was surprised GridView copies raw data and not formatted, I think standard and expected behavior for user is to copy what you can see, not some raw data.

Dinko | Tech Support Engineer
Telerik team
 answered on 02 May 2024
2 answers
63 views

Hello,

I have question about GridView handling of properties with Browsable(false) attribute. It's expected that when I add this attribute to some property, automatic generation of columns will ignore it. But why when I add this column manually, that column is empty. Is it a bug? I think that attribute means that should not be displayed in PropertyGrid, but it doesn't prevent to read / write property. It's not problem for me, that's just question, I ran into it during some other tests.

But, maybe it's not bug but expected behavior, but when I add this attribute to property used as ID for self referencing hierarchy, program freezes on startup, and I think this is a bug, isn't it?

Dinko | Tech Support Engineer
Telerik team
 answered on 01 May 2024
3 answers
130 views

Hello,

I am wondering if GridView really doesn't have selection mode similar to RowHeaderSelect in WinForms DataGridView, where I can select individual cells clicking on those cells or I can select row by clicking row header cell. I have read documentation and forum, and I am also wondering if somebody else really doesn't have the same question.

For example, I want to delete row only if row is selected, not if only few cells are selected in multiple rows, it's strange behavior for me. Or, second use case, I have more Copy operations depending on selection scope, if row is selected, whole data object is copied to clipboard, if individual cells are selected, just those data as text are copied, if only cells from specific columns are selected, one parameter sub-object is copied etc.

Now, I can get used to this new behavior, but users are used to DataGridView behavior, I think they will be little bit confused. Or, I know when I click to row header cell, all cells in that row are selected (also the hidden ones), so I can check if all cells in row are selected and then consider that row as selected, but it will be more processing.

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Apr 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
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
TaskBoard
Styling
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
+? 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?