Telerik Forums
UI for WinForms Forum
1 answer
138 views

Dear sir/madam,

I used your solution for adding a checkbox in grouprows of a grid for UI Winforms:

winforms-sdk/GridView/GridCheckAllGroupRows at master · telerik/winforms-sdk · GitHub

Only specific grouprows need a checkbox, not all grouprows, which I handle in the CreateCell event. So far so good, seems to work perfect.

But.... when I start scrolling in the grid, because not all grouprows are visible in one screen, and the grouprows that have a checkbox leave the screen because of scrolling down, and then scrolling up again, the checkbox in the grouprow is gone, and grouprows that did not have the checkbox have now a checkbox?

Strange, I cannot figure out what is going wrong.

Hopefully  I succeeded in describing the situation clearly.
Help would be appreciated.

Kind regards.

 

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Mar 2023
0 answers
124 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
1 answer
193 views

Hello!

My company is using RadGridView for an application where users can view and organize/edit SQL data. The grid is set to allow paging and up to 50 rows per page. Because of the size of some of the tables our users work with, the pages can number in the hundreds, which raises an issue when using the grid's built-in sorting capabilities. 

By default, the grid seems to sort all the data in the table as opposed to just the visible rows on screen. This results in a portion of data being displaying that is completely different from what is supposed to be on that page. What I'm looking to do is to have the grid sort only the child rows visible on the page.

I assume going the custom sort rout is necessary here? I've tried a bunch of different approaches to varying degrees of success, but nothing's gotten me quite there. The grid is data bound, which working around has been maybe the biggest hurdle for me so far. Ideally I'd like to be able to reorganize the rows on screen without having to rebind the grid, though I'm not sure how feasible that it. Regardless, any help is appreciated!

Best,

Rich

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Mar 2023
1 answer
137 views

Hello!

I am currently using RadGridView for a project my company has me working on. We want to be able to prevent users from setting CellForeColor and CellBackColor to the same values (as seen in the image below). I've tried implementing a check on a variety of different elements to try and catch this case if it happens, but so far I've not had much luck. I guess more than anything I'm wondering which element I should be focusing on in order to catch this when it happens? I've scoured these forums and the rest of the internet and I haven't seen anything similar being asked. Any help is greatly appreciated, even if it's just a point in the right direction!

Best,

Rich

Dinko | Tech Support Engineer
Telerik team
 answered on 01 Mar 2023
1 answer
150 views

I am using Telerik UI for Winforms version 2022.1.118.40

I am trying to bind a treeview to a list of object-related data, but only the root nodes are displayed.

My object-related data looks like this:

public class MyRootObject
{
    public string Name {get; set;}
    public List<MyChildObject> ChildObjects {get; set;}
}

public class MyChildObject
{
    public string Name {get; set;}
}

My treeview is set up like this:

var myRootObjects = new List<MyRootObject>()
{
   new MyRootObject()
   {
      Name = "RootName",
      ChildObjects = new List<MyChildObject>()
      {
         Name = "ChildName"
      }
   }
}

MyTreeView.DataSource = myRootObjects;
MyTreeView.ChildMember = "ChildObjects";

 

I have tried different ways of setting the 'ChildMember' property, as per documentation ( https://docs.telerik.com/devtools/winforms/controls/treeview/data-binding/binding-to-object-relational-data ), such as 'myrootObjects\\ChildObjects', but I can not get the child objects to be displayed.

How do I get the child objects to be displayed?

Dinko | Tech Support Engineer
Telerik team
 answered on 01 Mar 2023
3 answers
259 views

I have a grid whose datasource is a list of DocumentGroup objects, each of which has a property "Others" of type IEnumerable<Document>.

I wrote the following:

        GridViewTemplate childTemplate = new GridViewTemplate();
        grdDocuments.Templates.Add(childTemplate);
        childTemplate.Columns.Add(new GridViewTextBoxColumn(nameof(Document.Docname)));
        childTemplate.Columns.Add(new GridViewTextBoxColumn(nameof(Document.Filepath)));
        GridViewRelation relation = new GridViewRelation(grdDocuments.MasterTemplate, childTemplate);
        relation.ChildColumnNames.Add(nameof(CompanyTb.DocumentGroup.Others));
        childTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
        grdDocuments.Relations.Add(relation);
        
        grdDocuments.Fill(Data.DocumentGroups);

(I'm not showing the whole setup of grdDocuments.)

This basically works, in that it shows a row for each DocumentGroup with the data in their columns, plus an icon to the left of each allowing the user to open the associated sub-grid of Documents.  Clicking on that icon gives me the correct number of rows under each DocumentGroup and each row has two columns (one for the Docname property and one for the Filepath property).

The only problem is that all the cells in all the Document rows are empty, even though there's data in the objects behind them.

What am I missing?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Feb 2023
2 answers
455 views

Hi,

I have an issue with the following simple code where I drag a label over a GridView header. The DragDrop codes works fine.

I recently added the following ligne

            SetLabelBorder(sourceLabel, true);

In the DynamicLabel_MouseDown event handler starting the DragDrop along with the DynamicLabel_MouseUp event handler.

The labelBorder is normally setup in the MouseDown event, but even if I simply click on the label and release it, the MouseUp event is not called and the border cannot be suppressed.

Here is the related code:


RadLabel? PreviousLabelWithBorderSet = null; private void DynamicLabel_MouseDown(object? sender, MouseEventArgs e) { sourceLabel = sender as RadLabel; if (sourceLabel != null) { if (e.Button != MouseButtons.Left) return; isCurrentlyDragging = true; objCurrentlyDragged = DragObject.Label; SetLabelBorder(sourceLabel, true); gvCsvData.DragDrop += gvCsvData_DragDrop; if (sourceLabel != null) DoDragDrop(sourceLabel.Text, DragDropEffects.Copy); } } private void DynamicLabel_MouseUp(object? sender, MouseEventArgs e) { sourceLabel = sender as RadLabel; if (sourceLabel != null) { if (e.Button != MouseButtons.Left) return; if (sourceLabel != null) SetLabelBorder(sourceLabel, false); } } private void SetLabelBorder(RadLabel labelBorder, bool setBorder) {

// Temporary : At least suppress previous label border if new one is selected !! if (PreviousLabelWithBorderSet != null) { PreviousLabelWithBorderSet.LabelElement.BorderVisible = false; PreviousLabelWithBorderSet = null; } if (setBorder) { labelBorder.LabelElement.BorderVisible = true; PreviousLabelWithBorderSet = labelBorder; } else { labelBorder.LabelElement.BorderVisible = false; } }

 

What am I doing wrong ?

Thanks

Patrick

 

Dess | Tech Support Engineer, Principal
Telerik team
 updated answer on 28 Feb 2023
0 answers
218 views

I get this message when starting Visual Studio.

message: Visual Studio stopped responding for x seconds (x s anywhere from 6 to 20).

Disabling the extension Progress Telerik UI for WinForms Extension 2023.1.113.1 might help.

 

Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview Version 17.6.0 Preview 1.0

and previous versions also.

Also previous versions of UI for WinForms.

 

It does not matter if I am working on a WinForms project or not.

 

Works find after that.

 

-George

 

 

 

 

George
Top achievements
Rank 1
 asked on 27 Feb 2023
1 answer
132 views

To further explain, the behavior happens when adding a new row, via button event, to the gridview (with AddNewBoundRowBeforeEdit enabled and AllowAddNewRow disbaled). The new row is pinned to the top, with editing enabled. When copying row data from one row to this new row, pasting the row data only works if the grid view is on the last page. Pasting Individual cells do not have this problem and any cell is enabled for edit while viewing any page of the grid view.

So I'm left wondering why is this even an issue in the first place. Not even automatically pasting valid row data, via button event that adds the new row, works.

Is there a setting available somewhere that can override this behavior? Or explanation as to why this is the case?

Let me know if more information is needed.

Edit:

I've put together a small app using a pre-existing demo provided by Telerik. Note that due to some other behavior, pasting into the new row on last page removes said row from view.  Ignore that behavior.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Feb 2023
1 answer
418 views

Hi,

first sorry for the general tag selected as I didn't find any specificone  about Document Processing.

I am creating a simple document mostly made up of tables  using the following code where neither the row.height, nor the VerticalAlignment are working (see attached screenshot).

I  would like much narrower cells and the text vertically centered.

How to achieve this ?

thanks

Patrick

 

RadFlowDocument document = new RadFlowDocument();
RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document);

Section section = new Telerik.Windows.Documents.Flow.Model.Section(document);
document.Sections.Add(section);

section.PageMargins = new Telerik.Windows.Documents.Primitives.Padding(40, 10, 40, 10);
section.PageSize = PaperTypeConverter.ToSize(PaperTypes.A4);

Table FactTable = section.Blocks.AddTable();

        for (int i = 0; i < datas.GetLength(0); i++)
        {
            TableRow row = new TableRow(document);
            row.Height = new TableRowHeight(HeightType.Exact, 14);
            PiedFactTable.Rows.Add(row);
            {
                TableCell cell = row.Cells.AddTableCell();
                cell.VerticalAlignment = VerticalAlignment.Center;
                Run run= cell.Blocks.AddParagraph().Inlines.AddRun(datas[i]);
            }
        }

Dimitar
Telerik team
 answered on 24 Feb 2023
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?