Telerik Forums
UI for WinForms Forum
1 answer
8 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.

Nadya | Tech Support Engineer
Telerik team
 answered on 22 Apr 2024
0 answers
2 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?

Marian
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 21 Apr 2024
0 answers
2 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.

Marian
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 21 Apr 2024
0 answers
4 views

I need to create a grid that looks like this:

In the upper right there is an X that need to be a hyperlink which fires a C# event. I'm preparing the data for the grid like this:

foreach (var item in data)
{
    item.Name = $"<html><span style=\"font-size: 10\">{item.Name} {item.Acct}</span><p>{item.TicklerDesc}</html>";
    item.TicklerDate = $"<html><p></p><span style=\"font-size: 8\">{string.Concat(Enumerable.Repeat("&nbsp;", 22))}X<p></p>{item.TicklerDate}</span></html>";
}

As it stands now the X is useless. The questions is: How do I make it a hyperlink (or fake equivalent) so that I can fire a C# event?

Thanks

Carl

Carl
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 19 Apr 2024
0 answers
7 views

I am calling a panel from another form so I can re-use it without having duplicate code. This panel has a RadViewGrid, but because it is called outside of its parent form it doesn't seem to call the CellFormatting handle. I am trying to style the cells in code, but backcolor doesn't seem to do anything

'Create new form to display pnlPayment
 Dim FormPayment As Form = New Form
FormPayment.Size = New Size(1070, 652)
FormPayment.Name = "FormPayment"
FormPayment.StartPosition = FormStartPosition.CenterScreen
FormPayment.FormBorderStyle = FormBorderStyle.FixedDialog
FormPayment.ControlBox = False
FormPayment.Controls.Add(FrmCashRegister.pnlPayment)

'dynamically find this. can also be done with FrmCashRegister.pnlPayment.Visible = true but I wrote it like this to be sure and to make my life hard
Dim paymentpanel() As Control = FormPayment.Controls.Find("pnlPayment", False).

paymentpanel(0).Visible = True
FrmCashRegister.RadGridViewPayment.AutoSizeRows = True
FrmCashRegister.RadGridViewPayment.EnableAlternatingRowColor = True
For Each row As Telerik.WinControls.UI.GridViewRowInfo In FrmCashRegister.RadGridViewPayment.Rows
    For Each cell In row.Cells
        cell.Style.DrawFill = True
        cell.Style.ForeColor = Color.White 'works
        cell.Style.BackColor = Color.Blue 'doesn't work
    Next
Next

The cell.Style.ForeColor works, but cell.Style.BackColor does not.

I've tried getting the CellElement and assigning styling there but that doesn't work either.
Philip
Top achievements
Rank 1
 asked on 18 Apr 2024
1 answer
98 views
Hi 
 I am using gridviewdatetime column in my gridview (winforms). When user click the cell The calendar popup to select the date. The calendar control have two default button 1. Clear 2. Today. I want to diable or remove the Clear button from calendar popup.
Please reply (Urgent)
Karthik
Top achievements
Rank 1
Iron
 answered on 15 Apr 2024
2 answers
29 views

Hi, 

I'm using RadGridView version 2022.1.222.40.

When the data table I'm using has a lot of data (15.000 for example), when I select an entire column, the cells in SelectedCells collection are normally less than 15.000 (it could be 14996 or 14997) in the SelectionChanged event. With less than 10.000 it seems that works correctly. 

Is there a bug for selected cells when the RadGridView shows more than 10.000 elements?

Regards, 

Evaristo Cuesta.

Nadya | Tech Support Engineer
Telerik team
 answered on 12 Apr 2024
1 answer
12 views

Hi!

I have a RadGridView (v2022.1.222.40) with a high amount of elements (~90000) and when trying to copy a column I see that the Copying is taking too long. Even if I do a dummy code processing the data.

I cancel all the formats except DataFormats.Text, and it still takes too much time.

I have thought about canceling all the formats and saving the data in a variable instead of the clipboard but if I cancel everything, the Pasting event won't be triggered later... Any suggestion?

Here is my code:

private void gridView_Copying(object sender, GridViewClipboardEventArgs e)
{
    if (e.Format != DataFormats.Text)
    {
        e.Cancel = true;
        return;
    }

    // Do some dummy code

    // Save it in the Clipboard
    e.DataObject.SetData(nameof(MyCustomModel), items);
}

Dinko | Tech Support Engineer
Telerik team
 answered on 11 Apr 2024
5 answers
19 views


using System.Windows.Forms;

namespace testGridViewKeyPress
{
    public partial class RadForm2 : Telerik.WinControls.UI.RadForm
    {
        private int count_;
        public RadForm2()
        {
            InitializeComponent();

            count_ = 0;
        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            count_++;
            radLabel1.Text = count_.ToString();

            radGridView2.BeginUpdate();
            radGridView2.Rows.Clear();
            //I Want to Process Row Clear And Add
            radGridView2.EndUpdate();

            return true;
        }
    }
}

 


When I hold down the key, I want to clear the row of the GridView and add a new row.

However, when the number of columns increases, even if rows work is performed between BeingUpdate() and EndUpdate(),

All UI is not highlighted or updated.

If the control needs processing when in the press state like this, shouldn't I use gridview?

Or, if there is another solution, please let me know.

+What I want is for all UI to update and operate when a key is pressed.

+My telerik version 2021.3.914.40(Dev)

 

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Apr 2024
1 answer
14 views

I like to display data like above . Each row's data type could be decimal, integer, or string. Thanks!

Nadya | Tech Support Engineer
Telerik team
 answered on 01 Apr 2024
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)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
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
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
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
Callout
ColorBox
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
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
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?