Self-referencing hierarchy does not work, when ColumGroupsViewDefinition is applied.
FIX. RadGridView - the TextAlignment property of GridViewHyperlinkColumn is not taken into consideration Reproduce: - add RadGridView private void Form1_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'nwindDataSet.Customers' table. You can move, or remove it, as needed. this.customersTableAdapter.Fill(this.nwindDataSet.Customers); DataColumn colContactName = nwindDataSet.Customers.Columns["ContactName"]; DataColumn colAddress = nwindDataSet.Customers.Columns["Address"]; this.radGridView1.Columns.Add(colContactName.ColumnName); this.radGridView1.Columns.Add(colAddress.ColumnName); this.radGridView1.Columns.Add(new GridViewHyperlinkColumn(colAddress.ColumnName + " Link")); this.radGridView1.Columns["Address"].TextAlignment = ContentAlignment.MiddleRight; this.radGridView1.Columns["Address Link"].TextAlignment = ContentAlignment.MiddleRight;// Different alignment between the two columns foreach (DataRow row in nwindDataSet.Customers.Rows) { this.radGridView1.Rows.Add(row.ItemArray[2], row.ItemArray[4], row.ItemArray[4]); } } Workaround: private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) { GridHyperlinkCellElement cell = e.CellElement as GridHyperlinkCellElement; if (cell != null) { cell.ContentElement.TextAlignment = ContentAlignment.MiddleRight; } }
1. Create a new project with RadGridView and setup hierarchy. 2. Run the project. 3. Select the "add new row" and click Escape key to leave edit mode. 4. Press Tab several times. You will see that the current cell is indistinguishable.
WORKAROUND: The format of the file that ExportToExcelML creates is ExcelML which is an extended XML. If you do not want to receive the message, you have to change the extension of the file to ".xml". Even though the file will have an xml extension, it will still be associated with MS Excel and will be opened by Excel.There is a possibility to turn this warning message off on the client machine. You can read more about that on the following blog post - Excel 2007 Extension Warning On Opening Excel Workbook from a Web Site (http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx) Another workaround is to use Interop to open the file and excel and save it in XLSX format. However, this would require Administrator or Power User (http://msdn.microsoft.com/en-us/library/ms173186%28v=vs.80%29.aspx). A reference from COM to the corresponding office version should be added. Here is the code for saving: ExportToExcelML exporter = new ExportToExcelML(this.radGridView1); exporter.ExportVisualSettings = true; string tempPath = Path.GetTempPath(); tempPath += "tempgrid.xls"; exporter.RunExport(tempPath); Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application(); if (app == null) { Console.WriteLine("EXCEL could not be started. Check that your office installation and project references are correct."); return; } app.Visible = false; app.Interactive = false; Microsoft.Office.Interop.Excel.Workbook wb = app.Workbooks.Open(tempPath); string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); desktopPath += "\\grid.xlsx"; wb.SaveAs(desktopPath, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault); wb.Close(); app.Quit(); Marshal.ReleaseComObject(wb); Marshal.ReleaseComObject(app); File.Delete(tempPath);
When RadGridView is displaying a self-referencing it should be able to show the data with ColumnGroupsViewDefinition and HtmlViewDefinition.
When UseCompatibleTextRendering property is set to false, the data cells overlaps the row header cells when horizontal scrolling is performed.
Steps to reproduce: 1. Place a grid on a form and add several columns. 2. Set a ColumnGroupsViewDefinition to the grid and resize the columns so the horizontal scroll bar appears. 3. Add a button and on its click call the PrintPreview method of the grid. You will see that the horizontal scroll bar of the grid will disappear. Workaround:workaround it by increasing and decreasing the width of a single column with 1 pixel right after you call the Print method of the print document. document.Print() grid.Columns(0).Width += 1 grid.Columns(0).Width -= 1
1. Create a new project with RadGridView and bind it. 2. Setup 2 level grouping. 3. Add top summary row. 4. Set the ShowParentGroupSummaries property to true. 5. Run the project and expand a group. 6. Edit a cell from a column that has a summary item attached. 7. Notice that the parent summary row is not updated properly.
If a dock window is focused programmatically, the RowValidating event is fired before selecting the new row by mouse cursor.
To reproduce: - use the code below to create an application - start it and click the Id column twice (so you will sort it first ascending and then descending) - double click the first row (with ID=9) => the BindingList current is still the row with ID 0, while it should be the row with ID 9 public partial class Form1 : Form { public Form1() { InitializeComponent(); SetDefaults(); } private void SetDefaults() { radGridView1.MasterTemplate.AutoGenerateColumns = false; radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None; radGridView1.MasterTemplate.EnableAlternatingRowColor = true; radGridView1.TableElement.AlternatingRowColor = Color.FromArgb(0xEB, 0xEF, 0xFB); radGridView1.MasterTemplate.ShowGroupedColumns = true; radGridView1.MasterTemplate.EnableGrouping = true; radGridView1.MasterTemplate.MultiSelect = false; radGridView1.EnableFiltering = true; radGridView1.EnableFastScrolling = true; radGridView1.TableElement.TableHeaderHeight = 50; } private void Form1_Load(object sender, EventArgs e) { var users = new EmployeeList(); for (int i = 0; i < 10; i++) { var user = new Employee(); user.Id = i; user.Name = "John Doe " + i; users.Add(user); } employeeListBindingSource.DataSource = users; } private void radGridView1_CellDoubleClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e) { if (e.RowIndex == -1 || e.Row.RowElementType != typeof(GridDataRowElement) || !(e.Row is GridViewDataRowInfo)) return; var selectedUser = employeeListBindingSource.Current as Employee; MessageBox.Show(selectedUser.Name); } } public class Employee { public int Id { get; set; } public string Name { get; set; } public Employee() { } } public class EmployeeList : BindingList<Employee> { public EmployeeList() { } }
There should be a way to determine if the row was deleted through the cell or row header context menu or by pressing the delete key.
Copy of cells from second level in hierarchy does not work.
To reproduce: rgvTest.BeginUpdate() For ixTest As Integer = 1 To 2000 Dim rgvrTest As GridViewRowInfo = rgvTest.Rows.AddNew rgvrTest.Cells(0).Value = "Value " & ixTest.ToString Next rgvTest.EndUpdate() rgvTest.Rows(0).IsCurrent = True MessageBox.Show(rgvTest.CurrentCell.RowIndex.ToString)
1. Create a RadGridView and setup hierarchy. 2. Add a group descriptor and several rows in the child view so that when expanding it scrollbar appears. 3. Run the project and expand the first row (there should be only one row at first level and one group at second level).
1. Create a new project with RadGridView. 2. Bind it to a business object collection without rows. 3. Add a descending sort descriptor for a date time column. 4. Add a button and on its click event add a new row to the collection. The new row should have first column with data which produces different sort results than the date time column. 5. Run the project and add some rows.
To reproduce - Have a page view with two pages - one empty and one with a grid - put some cell in the grid in edit mode and cancel its validation in the CellValidating event - at this point you cannot change the current cell in the grid (which is desired) but you are able to switch to another page in the page view, thus its SelectedPageChanging event fires (which is not desired)
Exception is thrown when a property of data bound record is changed and filtering is applied
To reproduce - bind the grid to a binding list - pin one of the rows - delete this row from the binding list - click somewhere on the grid => exception is thrown
Plese download the attached project and run it. It uses some of our internal data so plese keep it private. Once you get the GridView with the data do the following: 1. Click on "Mahine speed" Header to change sort order. 2. Open "Mahine speed" filter and deselect all and select 1 3. Open "Mahine speed" filter and deselect 1 and select 2 4. Open "Mahine speed" filter and deselect 2 and select 3 5. Open "Mahine speed" filter and deselect 3 and select 1 At this point you get the crash. The above steps are for you to be able to reproduce the issue,, in general terms, the issue happens if I reproduce the same steps in any Combobox column. This is causing crashes all along my project since most of the forms in my project are gridviews and users use a lot sorting and filtering to get to the needed data.
NullReferenceException when the Text property of RadDropDownListEditor is initialized with null value in the CellEditorInitialized event.