I have noticed some strange behaviour when adding and editing records in a hierarchical radGridview. I have attached a Visual Studio Sample solutions to help illustrate this issue. Follow these steps to recreate the issue: 1.Run the attached sample solution. Form1 will load with a radGridview containing hierarchical data. 2. Expand the region record to show it's child records. 3. Click on "Click here to add new row" directly underneath the Field_Value column and enter any value. 4. Try and click on the Operator column on the same row to add a value. You will notice that nothing happens. 5. Expand the Sub_Region record to show it's child records. 6. Click on "Click here to add new row" directly underneath the Operator column and enter any value. 7. Try and click on the Field_Value column on the same row to add a value. You will notice that nothing happens. I have noticed that this behaviour happens not only when you are adding a new row, but in existing rows as well. If you move around between records after expanding the nodes this issue happens allot (but not always). If you try a few different scenarios by collapsing and expanding the nodes and adding or editing records in different orders you should be able to reproduce the error allot. If you use the TAB key then it does not seem to be an issue, only when you are trying to click into the adjacent column on the same row. It does not seem like correct behaviour. Is this a bug or am I doing something wrong? Please let me know if there is a way to correct this behaviour?
if you group by diffrent columns - change a grouping - delete a grouping - add another one - you'll see that pretty soon the count goes off.
I have create a model Entity with two table on sql 2008 . Order and detailorder ( one to many related) In detailorder Class in have create a custom property public readonly property Amount as decimal get return qta * price end get end property In order Class in have create a custom property public property TotalAmount as decimal get M_TotalAmount end get set (value as decimal) M_TotalAmount =value end set end property in the orderdetail class i have added the code private sub onqtaChaged me.Order.RicalculateTotalAmount end sub in the Order class I have added private sub RicalculateTotalAmount Dim total as decimal=0 for each orderdetail in me.orderdetails total =total + orderdetail.Amount net end sub Well. I have put inside the form a Bindingsource component (Bindingsource1) and i set a datasource of the OrderEntity then I have put inside the form a Bindingsource component (Bindingsource2) and i set a datasource of the Orderdetails Entity of OrderEntity I have put into form some control of Order in binding on Bindingsource1 Then i put a radgridview ad the datasource property set to Bindingsource2 Ok now i run the project Now i enter in the cell Qta of radgridview and i change the current value. With mouse i change focus on the another textbox out the Gridview Radgridview Crash!! I olso try to : After run project Now i enter in the cell Qta of radgridview and i change the current value. With mouse i change focus on the another textbox inside the same datagridrow then i change focus inside the another radtextbox out of radgridview the radgridview work fine.
Relation is defined in DataSet bound to RadGridView control
related to fitering functionality of RadGridView control Comment: Refreshing the master template of RadGridView in the CellEndEdit event handler is not allowed from the current architecture of the control. Use radGridView1.TableElement.Update(GridUINotifyAction.DataChanged) instead.
Makes RadGridView to be thread safe by using from BackgroundWorker
Workaround: the MasterTemplate has Copy method, which allows overriding in its descendants. Thus, it is possible to modify the copied data according to the specific requirements: public class CustomGrid : RadGridView { protected override RadGridViewElement CreateGridViewElement() { return new CustomRadGridViewElement(); } public override string ThemeClassName { get { return typeof(RadGridView).FullName; } } } public class CustomRadGridViewElement : RadGridViewElement { protected override MasterGridViewTemplate CreateTemplate() { return new CustomMasterGridViewTemplate(); } protected override Type ThemeEffectiveType { get { return typeof(RadGridViewElement); } } } public class CustomMasterGridViewTemplate : MasterGridViewTemplate { public override void Copy() { base.Copy(); if (Clipboard.ContainsData(DataFormats.Text)) { string data = Clipboard.GetData(DataFormats.Text).ToString(); if (data != string.Empty) { StringBuilder sb = new StringBuilder(data); //modify the copied data and replace it in the clipboard Clipboard.SetData(DataFormats.Text, sb.ToString()); } } } }
To reproduce: Add a RadGridView with a GridViewComboBoxColumn and add 70000 items as datasource. You will notice that openning it is slow. Workaround: Use the following custom editor: public class MyEditor : RadDropDownListEditor { protected override RadElement CreateEditorElement() { return new MyEditorElement() { SyncSelectionWithText = false }; } } public class MyEditorElement : RadDropDownListEditorElement { public override void NotifyOwner(PopupEditorNotificationData notificationData) { if (notificationData.notificationContext == PopupEditorNotificationData.Context.TextChanged && !this.SyncSelectionWithText) { return; } base.NotifyOwner(notificationData); } }
If SqlDataReader object has been used for loading data in RadGridView, column expressions does not work.
To reproduce: add a RadGridView and bind it to the Northwind.Products data table. Use the following code: private void Form1_Load(object sender, EventArgs e) { this.productsTableAdapter.Fill(this.nwindDataSet.Products); RadMessageBox.Show(string.Format("TOTAL2 = {0}", NewExpression())); } public string NewExpression() { this.radGridView1.Columns.Add(new GridViewDecimalColumn("TOTAL1") { Expression = "ReorderLevel + UnitsOnOrder" }); this.radGridView1.Columns.Add(new GridViewDecimalColumn("TOTAL2") { Expression = "TOTAL1 + UnitPrice" }); //uncomment to get the value of "TOTAL2" // var total1 = this.radGridView1.Rows[2].Cells["TOTAL1"].Value; var total2 = this.radGridView1.Rows[2].Cells["TOTAL2"].Value; return total2.ToString(); } It is not possible to access the column value ("TOTAL2") before firstly to access the column "TOTAL1" value.
To reproduce: - Add grid with enabled paging and filtering to a blank form. - Select the second page and apply a filter.
IMPROVE. RadGridView - add the current selection and the new selection to the SelectionChanging event.
Provide calculation of the 'Ceiling' function in a column expression: column.Expression = "Ceiling(ColumnName)";
Replacing the RadTextBoxItem with RadTextBoxElement in the RadGridView editor will provide richer theming capabilities.
The HeaderText of the RadGridView column should be set to the caption of the DataTable column Caption when it is provided.
The property will have higher priority than the theme and will be more convenient for using than the ViewCellFormatting event.
Provide options for customization of the columns RadComboBox items. Added new event in the RadGridView control ConditionalFormattingFormShown fired when the conditionalformattingform is shown. Added new customization options to ConditionalFormattingForm dialog: property: SelectFromVisibleColumnsOnly - filter the column selector to display only visible columns in RadGridView property: ColumnDisplayStyle - display Name or HeaderText or both in column selector Example: using System.Data; using System.Drawing; using System.Windows.Forms; using Telerik.WinControls.UI; namespace Lab.Grid { public partial class GridConditionalFormattingForm : Form { private RadGridView gridView = new RadGridView(); public GridConditionalFormattingForm() { InitializeComponent(); gridView.Dock = DockStyle.Fill; gridView.Parent = this; gridView.MultiSelect = true; gridView.ConditionalFormattingFormShown += gridView_ConditionalFormattingFormShown; } void gridView_ConditionalFormattingFormShown(object sender, System.EventArgs e) { ConditionalFormattingForm form = sender as ConditionalFormattingForm; form.ColumnDisplayStyle = ColumnDisplayStyle.Name | ColumnDisplayStyle.HeaderText; form.SelectFromVisibleColumnsOnly = true; } protected override void OnLoad(System.EventArgs e) { base.OnLoad(e); DataTable data = new DataTable(); data.Columns.Add("ID"); data.Columns.Add("Name"); data.Columns.Add("Test3"); data.Rows.Add(1, "Name1", "Test1"); data.Rows.Add(2, "Name2", "Test2"); data.Rows.Add(1, "Name3", "Test3"); data.Rows.Add(4, "Name4", "Test4"); data.Rows.Add(1, "Name5", "Test5"); gridView.DataSource = data; gridView.Columns[2].IsVisible = false; gridView.Columns[2].HeaderText = "AlaBala"; ConditionalFormattingObject format = new ConditionalFormattingObject("MyCondition", ConditionTypes.Equal, "1", "", true); format.CellBackColor = Color.Red; format.ApplyOnSelectedRows = false; gridView.Columns[0].HeaderText = "FirstName"; gridView.Columns[0].ConditionalFormattingObjectList.Add(format); } } }
Steps to reproduce: 1) Add RadGridView control 2) Use GridViewDecimalColumn: DataTable customDataTable = new DataTable(); sampleDataTable.Columns.Add("Column name", typeof(double)); 3) Set the right-to-left property of the control to true: this.radGridView1.RightToLeft = System.Windows.Forms.RightToLeft.Yes; 4) Set the following CellElement properties using CellFormatting event: void radGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e) { if (e.CellElement is GridDataCellElement) { e.CellElement.RightToLeft = false; } } 5) Re-size the form manually until the horizontal scroll-bar disappears 6) Resize a GridHeaderCellElement in left direction and you will notice that the GridDataCellElements from this columns are resized to the right direction Whenever I'm trying to expand any column the header expands as expected but the column itself is expanding in the other direction so the headers and columns content are not aligned. Expected result: expand the column content properly Actual result: the GridDataCellElements from this columns are expanding incorrectly
Typo error - "Lenght" instead of "Length", located under "Text" in the GridView expression editor