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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting a referenced column to display and refresh constantly

Thread ID:

Created:

Updated:

Platform:

Replies:

57388 Mar 2,2007 04:42 PM UTC Mar 6,2007 12:35 AM UTC WinForms 2
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On March 2, 2007 04:42 PM UTC

Hi

Thanks again.

Another issue I am having is that I have two grids. The second grid has several rows, and for each row, there is a column (PRICE) that updates its values constantly (like the trading application demo).

I would like to select the row with a cell value of "PRIM" in the formula column, and then take the value in the PRICE cell and display it in the first grid on the appropriate row, in an unbound/design time added column. This must then update the value constantly aswell to match the second grid.

I have managed to do the following:

this.gridGroupingControl1.TableDescriptor.Columns.Add("PrimPrice");
GridColumnDescriptor d1 = this.gridGroupingControl1.TableDescriptor.Columns["PrimPrice"];
DataView dv = new DataView(this.gridGroupingControl2.DataTable);
dv.RowFilter = string.Format("[Formula] = '{0}'", "PRIM");
d1.Appearance.AnyRecordFieldCell.DataSource = dv;
d1.Appearance.AnyRecordFieldCell.DisplayMember = "Price";
d1.Appearance.AnyRecordFieldCell.ValueMember = "SpotPrice";
d1.AllowBlink = true;

This fails to show the value.

However, if i change the cell type to a combo box, using d1.Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.ComboBox;

When i click the drop down button, the prim price value appears in the list and also updates accordingly. Can you please explain why i cannot use a standard call type and how i can overcome this issue?

Administrator [Syncfusion]
Replied On March 2, 2007 11:36 PM UTC

Hi George,

We will update you on Monday regarding this issue. We sincerely apologize for this time delay.

Thanks for using Syncfusion Products.

Best regards,
Haneef

Administrator [Syncfusion]
Replied On March 6, 2007 12:35 AM UTC

Hi George,

The reason for getting this behavior is that standard "TextBox" celltype does not care about the cell datasource( StyleInfo DataSource property is used only for specific cell type like combobox, gridlistcontrol and etc). But one way you can overcome this problem by setting the CellType to "ComboBox" andalso set ShowButton property to GridShowButtons.Hide. Please find the code snippet below and let me know if this helps.

this.gridGroupingControl1.TableDescriptor.Columns.Add("PrimPrice");
GridColumnDescriptor d1 = this.gridGroupingControl1.TableDescriptor.Columns["PrimPrice"];
DataView dv = new DataView(this.gridGroupingControl2.DataTable);
dv.RowFilter = string.Format("[Formula] = '{0}'", "PRIM");
d1.Appearance.AnyRecordFieldCell.DataSource = dv;
d1.Appearance.AnyRecordFieldCell.DisplayMember = "Price";
d1.Appearance.AnyRecordFieldCell.ValueMember = "SpotPrice";
d1.AllowBlink = true;
d1.Appearance.AnyRecordFieldCell.CellType = "ComboBox";
d1.Appearance.AnyRecordFieldCell.GridShowButtons.Hide

Thanks for your patience.

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

;