I would like to use a rendering control which has reference to two different cells.
If I override the the ControlContainerEditor class, the RendererValue property set the value from one cell.
If I would like to represent for example an interval, set on 2 different column, is there any possiblity to have a reference to the value from an other column cell?
The ControlContainerEditor is designed for a single value. So what I would do is create an unbound column in your grid that contains both pieces of information you need. You could create the column with a DataType that is some object that has two properties on it. Then assign the ControlContainerEditor to that unbound column.
This might be a bit tricky, especially if you need to make the column editable, because the object you use will need to raise notifications like INotifyPropertyChanged in order to work correctly.
I 've implemented the http://help.infragistics.com/Help/Doc/WinForms/2014.2/CLR4.0/html/WinControlContainerEditor_Embed_Any_Control_within_WinGrid_Cell_using_ControlContainerEditor_Object.html
example.
In the renderer control(gauge) I've implemented the RendererValue property.The question is: Do I have in this set method of property, or any other possibility to access the value from other column.It would be very helpful if in this embedded control could read the values from other columns.
Hello Iacos ,
To have a reference to the value from another column cells, you could either use the GetCellValue Method or reference the Cell Values Directly.
You can get the cell value using GetCellValue like this :
UltraGridColumn Col2Column = e.Row.Band.Columns["Col1"];e.Row.Cells["Col2"].Value = (string)e.Row.GetCellValue(Col2Column);
You can get the cell value directly like this : e.Row.Cells["Col2"].Value = e.Row.Cells["Col1"].Value;
Here I am trying to get the cell values of Col1 and assign it to Col2.
You can also refer this online document for more information and a sample.
https://ko.infragistics.com/help/winforms/wingrid-memory-usage
Please let me know if you need further assistance.