Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
375
UltraTextEditor in Ultragrid Cell
posted

Mike last question of the week.

My dynamically generated Ultragrid uses an UltraTextEditor with two buttons added(one left, one right) in various cells of the first column as basically a row group label control.

I have this working great and add the editor to the cells like so.

UltraGrid1.Rows(0).Cells(0).EditorComponent = textEditor

 

Then I try and set the text value on the editor - according to other posts the cell ignores this
or the cell value on the field - and I get the correct string value in the field, but the row has the "Edit" pencil out to the left, my control with the two buttons is gone, and I just have a string value in the cell using the regular editor. 

I have tried several ways to set the value.  First, setting the textEditor.Text field but this does not get picked up by the cell, secondly, setting the textEditor.Value field, thirdly, setting the cell value after setting the editor.UltraGrid1.Rows(0).Cells(0).Value = I just get the string value and my editor control goes away, fourth I have tried to set the editor value UltraGrid1.Rows(CountRows).Cells(0).Editor.Value and I get an object reference not set to an instance of the object error

Would I need seperate controls for each instance as the text value of the control will differ with each row, i.e. Day 0, Day 1, etc.and the control can only have one instance of its text property?  Secondly, what is the syntax to get this Button"TextValue"Button in my control at the cell level, not the column level, or getting the cells value to show in the text part of the editor by default when I assign the editor to the cell, or Column, because I can do this on the column level too, and actually started this way, and then was just going to hide the cell or the control where the value = "".

Parents Reply Children
No Data