This is a migrated thread and some comments may be shown as answers.

Scrollbar inside a cell in grid

7 Answers 606 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Smitha Test
Top achievements
Rank 1
Smitha Test asked on 25 Jan 2010, 11:09 PM
Hi,

I am showing comments in the grid .
now if comments are more than 20 lines i want that scroll bars be displayed inside the textbox cell of the gridview.

I do not want to use auto rowsize or word wrap. I there a way to show a scroll bar inside the text box cell

thanks,

7 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 28 Jan 2010, 04:52 PM
Hello Smitha Test,

I am attaching a sample project which demonstrates how you can achieve the desired behavior. Basically, I am using the RadScrollViewer element to scroll the bigger RadLabels. Feel free to modify this project according to your specific requirements.

Kind regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sandhya Pochiraju
Top achievements
Rank 1
answered on 09 Mar 2010, 09:57 PM
hi nikolay,

please can you let me know how to do the same in  radgridview in wpf. 

thank u
sandy
0
Hristo
Telerik team
answered on 12 Mar 2010, 04:54 PM
Hello Sandhya Pochiraju,

RadGridView is highly customizable. You can place anything in the cell using the Column.CellTemplate property.
It is a data template and inside you can place a regular Textbox with a ScrollViewer(with a fixed height) .
More info on how to template a cell you can here.

Let me now
All the best,
Hristo
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Deepak Sharma
Top achievements
Rank 1
answered on 13 Mar 2010, 12:43 AM
Hello,

Could you please upload a sample in VB .Net for the same.

Regards,
Deepak

0
Nikolay
Telerik team
answered on 17 Mar 2010, 05:46 PM
Hello Deepak Sharma,

Please refer to the CodeChanger tool that we developed for such purposes. It will allow you to convert a C# project to VB.NET.

Regards,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ramya
Top achievements
Rank 1
answered on 02 Sep 2010, 08:28 AM
Hi,
I used the radgridviewscrolledtext.zip project taht you have uploaded but the strings taht you are using to bind in the grid uses newline string(\r\n)
If i remove it, it comes in one single line and the horizontal scroll gets anables. I tried to wrap the text in the label using label.textwrap and even grid.columns[0].wraptext property but it doesnt seem to work.

Also how to make the onMousewheel work ?

Thanks for you help
Ramya
0
Nikolay
Telerik team
answered on 22 Sep 2010, 04:12 PM
Hello Ramya,

I modified my sample project according to the specifications of the latest RadGridView version. It now follows the behavior you are after. However, we currently have a small issue that prevents you from seeing the whole text under specific circumstances. We will address this issue in one of next releases.

We plan to implement this feature in RadGridView in one of our future versions. We will consider implementing OnMouseWheel support for this feature. However, currently there is no OnMouseWheel implementation I can provide you with.

Best wishes,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Sihol
Top achievements
Rank 2
commented on 13 Jan 2025, 07:03 AM

Dear Nikolay,

I wanted to follow up on the small issue you mentioned that prevents the full text from being visible under specific circumstances. Could you please provide any updates or potential workarounds for this issue? Understanding how to manage this would greatly assist in our implementation.

Thank you for your assistance, and I look forward to your response.

Best wishes,
Sihol

Dinko | Tech Support Engineer
Telerik team
commented on 13 Jan 2025, 03:19 PM

Hi Sihol,

The discussion here is pretty old as the last reply in the forum is from 2010. The RadGridView control is constantly updated with each release and many more functionalities have been added to the control. The text inside the control can be wrapped if its length is bigger than the size of the cells.
In general, the approach shown here to add a custom scrollbar for scrolling cell content remains valid. So far, I haven’t observed any instances where the text isn’t fully visible. If you do encounter such behavior, please share the details with us so we can investigate further.

Sihol
Top achievements
Rank 2
commented on 14 Jan 2025, 06:46 AM

Hi Dinko,

Thank you for the information. I would like to inform you that I am using the gridviewmultiline.zip provided by Nikolay in the previous post. However, I am experiencing the same issue where part of the text is not visible within the cells.

For further information, I am using Telerik WinForms version 2015 Q1. Although I have tried several settings, the longer text still does not fully appear in the cells.

I am attaching an image to assist with the investigation. In the image, it can be seen that the text in the grid cell is only visible up to the word "but," while the full text can be seen in the label below the RadGridView.

If there are any suggestions or solutions that could help resolve this issue, I would greatly appreciate it. Thank you for your attention!

Best regards,
Sihol

Dinko | Tech Support Engineer
Telerik team
commented on 14 Jan 2025, 08:26 AM

Thank you for elaborating on your scenario. It seems that this behavior is already fixed and not observed in the latest version of our controls. I have used 2024.4.1113.462 version. 

When I ran the project I got the following result:

I would suggest updating the assemblies to their latest version so that you can take advantage of bug fixes, new functionalities, new controls, etc. You can download the new version from your account. Check the Download Product Files help article which described the steps to navigate to the download page.

Sihol
Top achievements
Rank 2
commented on 14 Jan 2025, 09:17 AM

I apologize for not mentioning earlier that I added the word "long" a total of 21 times, which makes it evident that the text gets cut off when scrolling. To confirm, could you please add it again and run the test to see if the text is still cut off or not ?

Additionally, is updating the Telerik version the only way to resolve this issue? Currently, we have a large application that is already running on Telerik 2015 Q1.

Thank you for your assistance!

Dinko | Tech Support Engineer
Telerik team
commented on 14 Jan 2025, 12:49 PM

To test your scenario, I have added the word "long" a total of 21 times and run the application. When I scroll down I am able to see the full text. 

The current approach that I could suggest is to update the assemblies to their latest version. I am sending you the project with a trial version of our latest assemblies to test it out. You can play with it and see if I have missed something else.

 

Tags
GridView
Asked by
Smitha Test
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Sandhya Pochiraju
Top achievements
Rank 1
Hristo
Telerik team
Deepak Sharma
Top achievements
Rank 1
Ramya
Top achievements
Rank 1
Share this question
or