BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
this.groupingGrid1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(groupingGrid1_QueryCellStyleInfo);
this.groupingGrid1.TableControlCurrentCellChanged += new GridTableControlEventHandler(groupingGrid1_TableControlCurrentCellChanged);
private void groupingGrid1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { if(e.TableCellIdentity.TableCellType == GridTableCellType.FilterBarCell) { e.Style.ShowButtons = GridShowButtons.Hide; e.Style.BackColor = Color.LightGoldenrodYellow; e.Style.DropDownStyle = GridDropDownStyle.Editable; e.Style.CellType = "TextBox"; } } private void groupingGrid1_TableControlCurrentCellChanged(object sender, GridTableControlEventArgs e) { GridCurrentCell cc = e.TableControl.CurrentCell; GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex] as GridTableCellStyleInfo; if (style.TableCellIdentity.TableCellType == GridTableCellType.FilterBarCell) { string s = string.Format("[{0}] LIKE ''{1}*''", style.TableCellIdentity.Column.MappingName, cc.Renderer.ControlText); this.groupingGrid1.TableDescriptor.RecordFilters.Clear(); this.groupingGrid1.TableDescriptor.RecordFilters.Add(s); } }
private void gridGroupingControl1_TableControlCurrentCellMoving(object sender, GridTableControlCurrentCellMovingEventArgs e) { GridCurrentCell cc = e.TableControl.CurrentCell; GridTableCellStyleInfo style = e.TableControl.Model[cc.MoveToRowIndex, cc.MoveToColIndex] as GridTableCellStyleInfo; if (style.TableCellIdentity.TableCellType == GridTableCellType.FilterBarCell) { this.gridGroupingControl1.Table.CurrentRecord = null; } }
>private void gridGroupingControl1_TableControlCurrentCellMoving(object sender, GridTableControlCurrentCellMovingEventArgs e) >{ > GridCurrentCell cc = e.TableControl.CurrentCell; > GridTableCellStyleInfo style = e.TableControl.Model[cc.MoveToRowIndex, cc.MoveToColIndex] as GridTableCellStyleInfo; > if (style.TableCellIdentity.TableCellType == GridTableCellType.FilterBarCell) > { > this.gridGroupingControl1.Table.CurrentRecord = null; > } >} >
string s1 = cc.Renderer.ControlText;
this.gridGroupingControl1.TableDescriptor.RecordFilters.Clear();
//this.gridGroupingControl1.TableDescriptor.RecordFilters.Clear();
//string s1 = cc.Renderer.ControlText;
private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, GridTableControlEventArgs e) { GridCurrentCell cc = e.TableControl.CurrentCell; GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex] as GridTableCellStyleInfo; if (style.TableCellIdentity.TableCellType == GridTableCellType.FilterBarCell) { string s1 = cc.Renderer.ControlText; if ((s1 != null) && (s1 != string.Empty)) { string s = string.Format("[{0}] LIKE ''{1}*''", style.TableCellIdentity.Column.MappingName, s1); cc.Lock(); if(this.gridGroupingControl1.TableDescriptor.RecordFilters.Count == 0) this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(s); else this.gridGroupingControl1.TableDescriptor.RecordFilters[0].Expression = s; cc.Unlock(); } } }
>private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, GridTableControlEventArgs e) >{ > GridCurrentCell cc = e.TableControl.CurrentCell; > GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex] as GridTableCellStyleInfo; > if (style.TableCellIdentity.TableCellType == GridTableCellType.FilterBarCell) > { > string s1 = cc.Renderer.ControlText; > if ((s1 != null) && (s1 != string.Empty)) > { > string s = string.Format("[{0}] LIKE ''{1}*''", style.TableCellIdentity.Column.MappingName, s1); > cc.Lock(); > if(this.gridGroupingControl1.TableDescriptor.RecordFilters.Count == 0) > this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(s); > else > this.gridGroupingControl1.TableDescriptor.RecordFilters[0].Expression = s; > cc.Unlock(); > } > } >} >
private Hashtable saveValues = new Hashtable(); private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { if(e.TableCellIdentity.TableCellType == GridTableCellType.FilterBarCell) { e.Style.ShowButtons = GridShowButtons.Hide; e.Style.BackColor = Color.LightGoldenrodYellow; e.Style.DropDownStyle = GridDropDownStyle.Editable; e.Style.CellType = "TextBox"; e.Style.CellValue = saveValues[e.Style.TableCellIdentity.Column]; } } private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, GridTableControlEventArgs e) { GridCurrentCell cc = e.TableControl.CurrentCell; GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex] as GridTableCellStyleInfo; if (style.TableCellIdentity.TableCellType == GridTableCellType.FilterBarCell) { string s1 = cc.Renderer.ControlText; if ((s1 != null) && (s1 != string.Empty)) { string s = string.Format("[{0}] LIKE ''{1}*''", style.TableCellIdentity.Column.MappingName, s1); cc.Lock(); if(this.gridGroupingControl1.TableDescriptor.RecordFilters.Count == 0) this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(s); else this.gridGroupingControl1.TableDescriptor.RecordFilters[0].Expression = s; if(saveValues.ContainsKey(style.TableCellIdentity.Column)) saveValues[style.TableCellIdentity.Column] = s1; else saveValues.Add(style.TableCellIdentity.Column,s1); cc.Unlock(); } } }