Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select a cell in a datagrid (Detail)...

Status
Not open for further replies.

todd666

IS-IT--Management
Dec 3, 2001
61
CA
I have a datagrid.

When I click on a cell, it select the text. (By default, Kind of blue marine rectangle that frame the text.)

If the length of the text is higher than what's is display at the screen, only a part of the cell become "BLUE" and the rest is not display.

Exemple:
Cell1 123
Cell2 123 123 123 123 123

If I click into the cell:
Cell1 123 (123 is selected)
Cell2 123 (123 is selected and the rest not appearing)

I would like to know it it's possible to prevent this case.
I would like that all the text in the cell is "Rectangle Blue", with no truncation. Is it possible?
 
Are you trying to mimmick the Excel functionality that if a cell's contents is wider than the cell and the cells to the right are blank, the cell that goes over extends?

I believe that you would have to manually change the width of the cell based on the contents of the cell. It has been discussed many times here how to change the width of a column based on the widest text.

You might also want to consider using a tool-tip... which, conveniently, has also been discussed here before.
 
For answering your first question, No.

I re-take my example:
Exemple: (The | is the width of the cell display at the screen.)
Cell1 content: 123 123 |
Cell2 content: 123 123 | 123 123 123

If I click into the cell:
Cell1 123 123 (123 123 is selected)
Cell2 123 (Only one "123" is selected and the rest not appearing)

In the case of Cell2, I just want that "123 123" is selected and display, not only "123". In other words, I just want that what is display at the screen before click into it, stay display at the screen after click, not truncated.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top