Telerik Forums
UI for WinForms Forum
0 answers
3 views

Hello,
I have problem with performance of GridView in self referencing hierarchy mode. I am working on move up/down function to move specific row up or down. I need to move it also in my underlying list, so I move it first in my list and then clear BindingList for GridView and add new items. This is done in DoRefreshEditorItems method of TestParEditorCollection class:

		private void DoRefreshEditorItems()
		{
			EditorItems.Clear();
			maxGridId = 0;

			foreach (var item in Items)
			{
				var editorItem = new TestParEditorItem(item, ++maxGridId);
				EditorItems.Add(editorItem);

				if (item.HasSubItems)
					AttachSubItems(editorItem);
			}

			RenumberRows();
		}

Each call to EditorItems.Add() takes cca 100ms and whole refresh of 20 rows takes cca 2s. It looks like this:

I also tried to set DataSource to null, refresh binding list and set DataSource back, but it looks very similar. I have attached test project, it's TelerikTestReal project in solution.

Marian
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 17 May 2024
0 answers
6 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
0 answers
19 views

Is there a way to detect when the user clicks on the column header to sort.

An event like SortStarted and SortFinished?

I'd like to capture that event to perform some special processing.

Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 14 Mar 2024
0 answers
37 views

Hi,

When form loads scroll bar missing as well as summary also missing but when i resize the form it appear and work appropriately.
I believe this is some visual glitch. Please provide me some solution for this.
I am attaching gif image which ca explain you my concern.

Check the below attached zip file for more reference.

Amol
Top achievements
Rank 1
 asked on 27 Oct 2023
0 answers
58 views
Hi, please tell me how to move rows in grid with bindingsource and the selfreference mode. And if you turn on the sort mode, then dragging stops working altogether.
alex
Top achievements
Rank 2
Iron
 updated question on 21 May 2023
0 answers
43 views
Hi! Why is the value of the selected cell in RadGridView shifted to the left, how can I fix this? Table in mode grid.Relations.AddSelfReference() (like TreeView)
alex
Top achievements
Rank 2
Iron
 updated question on 19 May 2023
0 answers
53 views

Hi,

I have a radgridview with fullrowselect enabled. When i select a cell, the row is selected correctly, but the selected cell changes padding or width slightly which seems to affect the entire column.

It's just a minor visual annoyance, but is there a way to prevent this?

Thanks,

Philip

Philip
Top achievements
Rank 1
 asked on 03 Mar 2023
0 answers
115 views

Hello, I am trying to use the gridview to try to display data...this is kind of a work in progress as I don't know what best approach is that I should be taking to display the data or if I am even using the right control.  I am trying to piece things together from some of the examples I can find. My questions are:

1. In the column named "img" is it possible to just hide that header and place the image next to the text? 

2. Can those expanded columns be auto sized instead of manual sized?

3. Is there an example of a dropdown box in one of these expanded row?  

 

Here is my rough code  creating the expanded rows: 

    'create out custom datasource containing all the apps 
        Dim BusinessAppsDT As New DataTable("Apps")
        With BusinessAppsDT
            .Columns.Add("id", GetType(Guid))
            .Columns.Add("img", GetType(Byte()))
            .Columns.Add("name", GetType(String))
        End With

        For Each row As DataRow In dt.Rows
            For Each itm As MyPortalObjects.Objects.ListItem In DeSerializeListview(Of MyPortalObjects.Objects.ListItem)(row("User_Needed_BusinessApps"))
                 BusinessAppsDT.Rows.Add(row("id"), itm.IconByteArray, itm.Name)
            Next
        Next

        'gridview templates are the tabs?
        Dim BusinessAppsTemplate As New GridViewTemplate
        BusinessAppsTemplate.Caption = "Apps"
        BusinessAppsTemplate.DataSource = BusinessAppsDT
        gvQueue.Templates.Add(BusinessAppsTemplate)

        Dim BusinessAppsRelation As New GridViewRelation(gvQueue.MasterTemplate)
        With BusinessAppsRelation
            .ChildTemplate = BusinessAppsTemplate
            .ParentColumnNames.Add("id")
            .ChildColumnNames.Add("id")
        End With
        gvQueue.Relations.Add(BusinessAppsRelation)

        Dim BusinessAppsView As New HtmlViewDefinition()
        With BusinessAppsView
            .RowTemplate.Rows.Add(New RowDefinition())
            .RowTemplate.Rows(0).Cells.Add(New CellDefinition("img", 3, 1, 3))
            .RowTemplate.Rows(0).Cells.Add(New CellDefinition("name", 10, 1, 3))

        End With
        BusinessAppsTemplate.ViewDefinition = BusinessAppsView
Willy
Top achievements
Rank 2
Iron
Iron
 asked on 08 Apr 2022
0 answers
100 views

Hello,

I contact you because I have 2 questions about the events of RagGridView control.

  1. I have 2 columns in my GridView (one GridViewTextBoxColumn readonly and one GridViewDecimalColumn editable). The decimal column can have a null value or a decimal value.
    I handle these events : CellValidating, RowValidating and RowValidated. In the CellValidating, I check if my decimal column has a value and in this case it must be between min and max value and display the Row.ErrorText and cancelling the validating event. However if the decimal value is null, I have to ask the user a confirmation when the row is validating, so I do that in the RowValidating event. If the user does not confirm, I cancel the RowValidating and I would like to set the decimal cell as the current cell and BeginEdit. Is it possible in the RowValidating event set a current cell and BeginEdit (in a new row or an existing row) ?
  2. In the GridView I register a custom GridNewRowBehavior and override the ProcessEscapeKey method that execute this code :
    bool canceled = this.GridViewElement.CancelEdit();
    this.GridControl.MasterView.TableAddNewRow.CancelAddNewRow();

    return canceled;       
    If the gridView is in edit mode on the new row or an existing row and I press the Escape key, my custom behaviour performs perfectly this treatment. But the RowValidating and RowValidated events in my form fires. How can I detect in these events that the edit mode is canceling because I would like to reset some properties ?

Thank you
Fabrizio

Fabrizio
Top achievements
Rank 1
 asked on 04 Jun 2019
0 answers
38 views

 Hello everyone,

 I have a problem, please help me solve it.

 How to realize the function of GridView, item (8, a) in GridView with RadGridView control.

hong
Top achievements
Rank 1
 asked on 27 May 2019
Narrow your results
Selected tags
Tags
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
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
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
ContextMenu
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
DateTimePicker
CollapsiblePanel
Conversational UI, Chat
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
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
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?