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
92
Displaying details in popuptextbox/Multiline textbox on ultragrid Editbutton click event
posted

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.

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    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: 

    • Don't change the Style of the column, leave is set to default. 
    • Place an UltraTextEditor control on the form with the grid.
    • Use the ButtonsRight collection to add a DropDownEditorButton to the UltraTextEditor.
    • Set the Control property of this button to whatever control you want dropped down. You can use a TextBox or another UltraTextEditor or maybe an UltraFormattedLinkLabel or UltraFormattedTextEditor if you want to get fancy.
    • Set the EditorControl property of the grid column to the UltraTextEditor.

    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. 

     

Children