-
1 Attachment(s)
width on grid view
I have a grid view that take the data from the DB.
if the row is big
example:
"nd bhdjhhd jh jhfd jh gjhdf gjhgdfs jhdg jhdjhdg fhjhdgf jhsdjfh jdshfg aydufygd uyfg uysg fuy adusygjh j gjh gcdys duf gudshcghsd dcjhdfusdhgdsygusa hdgfuysagdcuy sgcuysgu ycgusychxsajhdgusycg hcghsudyfgsduyf uasygjhsc bjsjhdguhguah dyguhyyg uyf uydgf uydsg fuysgd fuysdg ufyssuyfg uygsuygfds"
(with no ENTERS)
than the width of the gridview changed,
I want that if the text is big to break the line and not to change the width.
example in the picture.
thanks
-
Re: width on grid view
I would recommend that you write your own handler for each data loading event of the data grid.
Evaluate the data in that cell and if it is larger than a certain number of characters, change the data and insert the carriage return yourself. Continue for the entire length of the data.
Optionally, if you are OK with scrolling when this occurs, you can use a CSS style to force those cells to scroll. If you want to do that, add the following style to the datagrid datacell:
style="width=XXXpx; height=XXXpx; overflow:scroll"
-
Re: width on grid view
thanks!
I think I will use the scroll
thanks again!
-
Re: width on grid view
In the ItemStyle tag of the datagrid, set Wrap="True"
-
Re: width on grid view
I got the mistake, but I dont know how to fix it.
if the paragraph is with ENTER I want to show the ENTERS
in VB I use the replace function
dim str as string
str = replace(filedName, vbcrlf, "<BR>")
but now I work with c# and I cant to replace the vbcrlf to BR then I use the HTML TAG
<pre>
<%=filedName %>
<pre>
then when I use the PRE if there not ENTER the width of the grid view changed.
how can I
from one side show the ENTERS (if there are)
from other side if there is no enters break lines.
hope to understand me
thanks!
-
Re: width on grid view
VB: "string" & vbCrLf & "string"
C#: "string\r\nstring"