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?
AD
Administrator
Syncfusion Team
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
AD
Administrator
Syncfusion Team
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