I have added a column in ultrawingrid and set the style to ColumnStyle.EditButton.In the cell am displaying data from the database.as the data is too long to display in the cell, when the user clicks on the edit button of the cell,i need to display in a popup kind of control(may be multi line textbox).
Please suggest me how can i implement this functionality.
Hi,
It might be possible to do this with an EditButton, but it would be much easier with an EditorButton. The distinction is pretty subtle, but they are two totally different things.
Here's what you do:
That's it. Instant dropdown textbox in a grid cell.
You will probably want to handle the AfterEditorButtonDropDown event of the UltraTextEditor and use the e.Context to determine which grid cell is dropping down and then populate the dropdown control accordingly.
Mike Saltzman
Manager - Windows Forms Development
Infragistics, Inc.
Thnx Mike ,it helped me solving my problem like in 2 mins.Thnq once again.
Hi all, I know this is an old question I know, but is it at all possible to make the editor textbox (the one that's being dropped down), resizeable? I think I'm either missing something obvious or it's not easily possible.
Thanks, Tom
Hi Tom,
Resizable dropdowns is a new feature we just recently added. I beleive it was added in NetAdvantage v10.2.
So if you are user that version (or higher), you can make the dropdown resizable by setting the DropDownResizeHandleStyle property on the DropDownEditorButton.
Thanks Mike! Yet another reason Infragistics is the best toolkit out there!
Erm one thing though it doesn't appear to work (in 10.2). Is it something to do with the fact it's called from an UltraGridCell? The editor I'm dropping down is an UltraTextBox that's been set to True for MultiLine, AcceptsTab and WordWrap is defaulted to True. Also scrollbars are disabled just in case.
UPDATE: I knocked up a test harness to see if it was indeed the cell, and editor alone shows the expansion area, whereas if it's dropped from a cell it doesn't show it
Here are some pics
And one from the cell itself:
I don't see anything wrong with your code. It's possible that this is a bug that was fixed. Try getting the latest service release and see if that helps:
How to get the latest service release - Infragistics Community
If that does not help, post your sample project here (you can attach a zip file under the Options tab) and I will take a look.
Ok I downloaded the latest version (10.3) and tried that. No luck here. I must have missed an obvious property or something. I've attached the project (for 10.3, I'll have to use 10.2 though for our main project) that I screenshotted earlier.
Thanks for your help, Tom
If you are missing something obvious, then I must be missing it, too. This looks like it should be working. I think there's probably a bug here. It looks to me like the DropDownResizeHandleStyle on the button is not getting copied from the button in the Editor control to the external editor that it's supplying to the grid. I'm going to forward this thread over to Infragistics Developer Support so they can check it out and get it fixed.
In the mean time, you can work around this by explicitly setting the property on the button in the grid like so:
private void ultraTextEditor1_BeforeEditorButtonDropDown(object sender, Infragistics.Win.UltraWinEditors.BeforeEditorButtonDropDownEventArgs e) { DropDownEditorButton button = (DropDownEditorButton)e.Button; button.DropDownResizeHandleStyle = Infragistics.Win.DropDownResizeHandleStyle.DiagonalResize; UltraGridCell c = e.Context as UltraGridCell; if (c != null) ultraTextEditor2.Text = c.Text; }
Hello Tom,
I have logged this as a development issue.
Dave F
Developer Support Engineer
http://www.infragistics.com/support
Mike & Dave,
Sorry I have been caught in other stuff for the last few days. Thanks very much for figuring this out and providing a workaround, I never thought it'd actually be a bug (first one I've encountered so far!).
Little things like this make all the difference!
Thanks again, Tom
Hi Mike,
I applied your code and it work fine but I need to block user from editing the text in cell itself , mean I don't want to allow user to edit the text in cell it self. Do you know , how I can achieve it.
Please excuse me if it is a silly question as I am using infragistic component for only 2 weeks. Posting on the forum are helping me a lot and bringing me upto the speed. Heads off to every one.
Regards
Hi Jeev,
This is a pretty long thread, and I'm not sure exactly what you are asking or if it's related to the topic of this thread.
To make an UltraTextEditor control read-only, you can use the ReadOnly property.
If this is a grid column, then you would use the column's CellActivation property.
In ultraTextEditor's ButtonsRight collection, i can see only EditorButton, not DropDownEditorButton. pls help.
when i am setting cell value on ultrsTextEditor1_AfterEditButtonCloseUp event , it set null value even though ultraTextEditor2 contains Text.
my code :
private
void ultraTextEditorOptField_AfterEditorButtonCloseUp(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e){
UltraGridCell c = e.Context as UltraGridCell;
if (c != null)
c.Value = ultraTextEditor2.Text; }
}