Hi,
I am trying to figure out a way to do the follow:
I have an UltraGrid with 1 hidden primary key column and 5 visible data columns.
Column 1 and 2 are drop down lists.Column 3 is a dynamic cell.Column 4 is a text fieldColumn 5 is a drop down list.
I have an ultra data source, a DataSet, and DataTable. The DataTable matches the ultraDataSouce:string, string, object, double, string. I can data bind the Columns 1, 2, 4, and 5. But column 3 is the tricky one.
When the user makes a selection on column 2, the cellListSelected event is fired, and its event handler should analyze the selection, and make column 3 a text field, edit field with an edit button, default text with an edit field and edit button, or a drop down list for other selections.
My question is, how does data binding work with such a situation? Is it even possible?
Thanks
hi i have also ultra grid with some column and i bind that ultra grid with ultra textediter please check the below my source code i m sure that will be helpful to u
http://ahmadkhalid44.blogspot.com/2013/05/work-on-ultra-grid.html
thanks
I'm not sure I am following you. What event are you using to set the Activation on the cell?
You are correct, that setting this property after the cell is already in edit mode will not work. But setting the Selected property on some other cell doesn't seem like the best way to get around that. What you should do is set the property in an event that fires before that cell gets activated, such as InitializeRow of the BeforeCelldeactivate or BeforeCellUpdate of some other cell.
Mike,
In addition to using cell.Activation = Infragistrics.Win.UltraGrid.Activation.NoEdit, I used a this.Rows[cell.Row.ListIndex].Cells[0].Selected = true;
Why? Because when the Edit button is clicked, the event is fired, and the Activation property is set, however, since the cell is already in edit mode, the change to NoEdit doesnt take place till after you tab out of the cell. Therefore, it was necessary for me to select another cell so that its NoEdit property is reflected immediately.
Yep, that works. I found an example online and went with it. Thanks for the response Mike!
DCSteve said:Is there any way to make the text read only when you use the ColumnStyle.EditButton?
Take a look at the options for the Activation property on the cell. I forget which one is which, but there is an option which allows the cell to enter edit mode and get a cursor so the user can select text and even copy, but not modify the text. This setting is either NoEdit or ActivationOnly, I forget which one.