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

upgrade issue-GGC new row behavior changes

Thread ID:

Created:

Updated:

Platform:

Replies:

54863 Jan 18,2007 09:35 PM UTC Jan 22,2007 06:57 PM UTC Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 18, 2007 09:35 PM UTC

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

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On January 22, 2007 03:16 PM UTC

I am sorry. Your code doesn't work. The new row is still not empty.

Administrator [Syncfusion]
Replied On 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

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

;