upgrade issue-GGC new row behavior changes
Hi,
Upgrade our product application from V3.3.0.0 to V4.4.0.51 in VS2003. GroupingGridControl's new row display behavior has been changed.
In V3.3.0.0 the new GGC row is empty for all columns, but in V4.4.0.51, it looks like that it assigned '' for string-type-field's null value, 0 for numeric-type-field's null value. So the new row is not empty for those column with combobox pickup list. Please see my attached screen short-cut.
How can I make the new row totally emptry like in V3.3.0.0 before?
Thanks,
Lan
Here is my code for setup ComboBox pickup column:
dvLookUp=dtLookUp.DefaultView;
dvLookUp.Sort=sExpFlds;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.CellType ="ComboBox";
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.DataSource=dvLookUp;//tbLookup;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.DisplayMember=lookup_desc;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.ValueMember=lookup_field;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.ShowButtons=GridShowButtons.ShowCurrentCell;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.HorizontalAlignment=GridHorizontalAlignment.Left;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.DropDownStyle=GridDropDownStyle.Exclusive;
combobox_default.zip
Upgrade our product application from V3.3.0.0 to V4.4.0.51 in VS2003. GroupingGridControl's new row display behavior has been changed.
In V3.3.0.0 the new GGC row is empty for all columns, but in V4.4.0.51, it looks like that it assigned '' for string-type-field's null value, 0 for numeric-type-field's null value. So the new row is not empty for those column with combobox pickup list. Please see my attached screen short-cut.
How can I make the new row totally emptry like in V3.3.0.0 before?
Thanks,
Lan
Here is my code for setup ComboBox pickup column:
dvLookUp=dtLookUp.DefaultView;
dvLookUp.Sort=sExpFlds;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.CellType ="ComboBox";
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.DataSource=dvLookUp;//tbLookup;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.DisplayMember=lookup_desc;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.ValueMember=lookup_field;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.ShowButtons=GridShowButtons.ShowCurrentCell;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.HorizontalAlignment=GridHorizontalAlignment.Left;
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.DropDownStyle=GridDropDownStyle.Exclusive;
combobox_default.zip
SIGN IN To post a reply.
3 Replies
AD
Administrator
Syncfusion Team
January 18, 2007 11:18 PM UTC
Hi Lan,
You can handle the TableControlPrepareViewStyleInfo event and set the e.Inner.Style.CellValue to System.DBNull for AddNewRowRecord. Here is a code snippet
private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if(style.TableCellIdentity.TableCellType == GridTableCellType.AddNewRecordFieldCell
&& e.Inner.RowIndex != e.TableControl.CurrentCell.RowIndex )
{
e.Inner.Style.CellValue = System.DBNull;
}
}
Best Regards,
Haneef
You can handle the TableControlPrepareViewStyleInfo event and set the e.Inner.Style.CellValue to System.DBNull for AddNewRowRecord. Here is a code snippet
private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if(style.TableCellIdentity.TableCellType == GridTableCellType.AddNewRecordFieldCell
&& e.Inner.RowIndex != e.TableControl.CurrentCell.RowIndex )
{
e.Inner.Style.CellValue = System.DBNull;
}
}
Best Regards,
Haneef
AD
Administrator
Syncfusion Team
January 22, 2007 03:16 PM UTC
I am sorry. Your code doesn't work. The new row is still not empty.
AD
Administrator
Syncfusion Team
January 22, 2007 06:57 PM UTC
Hi Lan,
Please try the attached sample and let me know if you are looking something different.
GGC_Sample.zip
Best Regards,
Haneef
Please try the attached sample and let me know if you are looking something different.
GGC_Sample.zip
Best Regards,
Haneef
SIGN IN To post a reply.
- 3 Replies
- 1 Participant
-
AD Administrator
- Jan 18, 2007 09:35 PM UTC
- Jan 22, 2007 06:57 PM UTC