We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Reg: GroupingGrid(Nested Table)

Thread ID:

Created:

Updated:

Platform:

Replies:

46020 Jul 4,2006 11:18 AM UTC Jul 4,2006 04:23 PM UTC Windows Forms 1
loading
Tags: GridControl
Anna Srinivasan
Asked On July 4, 2006 11:18 AM UTC

Hi, I have a grouping grid with one nested table on my application. Nested table contains date column, double column and string column. Requirements: 1) I want to edit the nested table column on the grid. 2) I want to validate the date and double column when the user modifies the value. Kindly give me a sample app which meets my requirements. Regards, Anna

Administrator [Syncfusion]
Replied On July 4, 2006 04:23 PM UTC

Hi Anna, You can edit the nested table cell value using the following code snippet. // To Edit a cell in the nested table GridTableControl mytable = this.gridGroupingControl1.GetTableControl("Salary"); foreach( Record r in mytable.Table.Records) { if((int)r.GetValue("Numeric") > 50) r.SetValue("Des","New"); } If you want to validate the changed value as your user leaves the cell, then you can use the TableControlCurrentCellValidating event. In it, you can use e.TableControl.CurrentCell.Renderer.ControlText to get the proposed text, and you can set e.Cancel to prevent your user from leaving the cell. // TableControlCurrentCellValidating Event private void gridGroupingControl1_TableControlCurrentCellValidating(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCancelEventArgs e) { Element el = this.gridGroupingControl1.Table.CurrentElement; if(el != null && el.Kind == DisplayElementKind.NestedTable) { GridTableControl mytable = this.gridGroupingControl1.GetTableControl("Salary"); GridCurrentCell cc = mytable.CurrentCell; if(cc != null && cc.Renderer.ControlText != null) { GridTableCellStyleInfo sinfo = (GridTableCellStyleInfo)mytable.CurrentCell.Renderer.StyleInfo; GridTableCellStyleInfoIdentity style = sinfo.TableCellIdentity; if( style.Column.Name == "Salary" && !(Convert.ToInt32(cc.Renderer.ControlText) >= 50)) e.Inner.Cancel = true; } } } Sample : AccessingNestedTables Best regards, Madhan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;