Hi Telerik support team,
I've performance issues with sorting in a radGridView. Below you find a very simple example (grid with 2 text columns) and nothing specials. The dataset (deserialized from a json file) contains 7560 rows, which is not much.
My own conclusion is 'it depends on the data'. In my dataset the column PhaseName is sorting ok. ProjectName is very slow. When I group the columns I see that ProjectName has not much groups (so a lot of duplicates) and PhaseName has a lot of groups (so, not much duplicates).
I tried to fasten it up with custom sorting but I got the same result. Can you help me with this issue??
(by the way: grouping also takes a lot of time)
Code:
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
radGridView1.Columns.Add(new GridViewTextBoxColumn("ProjectName") { ReadOnly = true });
radGridView1.Columns.Add(new GridViewTextBoxColumn("PhaseName") { ReadOnly = true });
LoadData();
}
private void LoadData()
{
var json = File.ReadAllText(@"c:\Daniel\content.json");
var list = JsonConvert.DeserializeObject<List<ProdTemp>>(json);
radGridView1.DataSource = list;
}
internal class ProdTemp
{
public string ProjectName { get; set; }
public string PhaseName { get; set; }
}
}
Regards,
Daniel Kaya
Hello,
I am trying to export a radPivotGrid into excel as per the documentation
private void radButton1_Click(object sender, EventArgs e)
{
SaveFileDialog sf = new SaveFileDialog();
sf.Filter = "EXCEL | .xls";
if (sf.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
// Telerik.WinControls.UI.Export.ExportToExcelML htmlexport = new Telerik.WinControls.UI.Export.ExportToExcelML(radPivotGrid_StockPositionPivot);
// htmlexport.RunExport(sf.FileName);
PivotGridSpreadExport spreadExport = new PivotGridSpreadExport(radPivotGrid_StockPositionPivot);
spreadExport.RunExport(@"..\..\exported-file.xlsx", new SpreadExportRenderer());
}
}
the red marked position is throwing an exception, and code suggestion is asking to create a new class to implement SpreadExortRenderer I am not sure how it can be done, any help will be appreciated. TIA
Please see the picture attached - I 'd like to display only the green options,
thank you
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.
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
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
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
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?
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?