473,809 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Rotated text in a datagrid

Jae
Does anyone know of a way to rotate text in a datagrid?

I have tried this :
http://msdn.microsoft.com/workshop/s...ritingMode.htm
but this technique did not work for me.

I can create a Drawing.Image.G raphic but once you do that how do you add the
image to the page? Any help would be greatly appreciated

Jae
Nov 18 '05 #1
2 2090
Maybe this will help. You need to use a style.

<%@ Page Language="VB" Strict=True %>

<%@ import Namespace="Syst em.Data" %>

<script language="VB" runat="server">
Sub Page_Load(byVal obj As Object, byVal e As EventArgs)
if not IsPostback
BindData()
end if
End Sub

sub BindData()
Dim dt As New DataTable()
Dim dr As DataRow
dt.Columns.Add( New DataColumn("Str ingValue", GetType(String) ))
Dim i As Integer
For i = 0 To 9
dr = dt.NewRow()
dr(0) = "Item " & i.ToString()
dt.Rows.Add(dr)
Next i
Dim dv As New DataView(dt)
os0.datasource = dv
os0.databind

End sub
</script>
<style>
..sideway { writing-mode:tb-rl}
</style>

<html>
<body>
<form runat="server">
<asp:DataList id="os0" repeatcolumns=" 2" repeatDirecttio n="horizontal "
runat="server">
<ItemTemplate >
<asp:label class="sideway" text='<%#
(DataBinder.Eva l(Container.Dat aItem, "StringValu e")) %>' runat="server" />
</ItemTemplate>
</asp:DataList>

</form>
</body>
</html>
"Jae" <ak*********@ea rthlink.net> wrote in message
news:22******** *************** ***@posting.goo gle.com...
Does anyone know of a way to rotate text in a datagrid?

I have tried this :
http://msdn.microsoft.com/workshop/s...ritingMode.htm but this technique did not work for me.

I can create a Drawing.Image.G raphic but once you do that how do you add the image to the page? Any help would be greatly appreciated

Jae

Nov 18 '05 #2
For a datagrid you will need to do something like this.

<%@ Page Language="VB" Strict=True %>

<%@ import Namespace="Syst em.Data" %>

<script language="VB" runat="server">
Sub Page_Load(byVal obj As Object, byVal e As EventArgs)
if not IsPostback
BindData()
end if
End Sub

sub BindData()
Dim dt As New DataTable()
Dim dr As DataRow
dt.Columns.Add( New DataColumn("Str ingValue", GetType(String) ))
Dim i As Integer
For i = 0 To 9
dr = dt.NewRow()
dr(0) = "<span class=" & chr(34) & "sideway" & chr(34) & ">Item
" & i.ToString() & "</span>"
dt.Rows.Add(dr)
Next i
Dim dv As New DataView(dt)
os0.datasource = dv
os0.databind

End sub
</script>
<style>
..sideway { writing-mode:tb-rl}
</style>

<html>
<body>
<form runat="server">
<asp:DataGrid id="os0" runat="server">
<ItemStyle cssclass="sidew ay">
</ItemStyle>
<columns>
<asp:BoundColum n DataField="Stri ngValue" />
</columns>
</asp:DataGrid>

</form>
</body>
</html>
"Jae" <ak*********@ea rthlink.net> wrote in message
news:22******** *************** ***@posting.goo gle.com...
Does anyone know of a way to rotate text in a datagrid?

I have tried this :
http://msdn.microsoft.com/workshop/s...ritingMode.htm but this technique did not work for me.

I can create a Drawing.Image.G raphic but once you do that how do you add the image to the page? Any help would be greatly appreciated

Jae

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
8510
by: rzed | last post by:
I'm using PIL to generate some images which may be rotated at the user's option. When they are rotated, the original image is cropped in the new image (which is fine), and the corners are black (which is not, in this case). I can't find any documented way to change the default fill color (if that's what it is) for the corners, and PIL also doesn't seem to support a flood fill. I have created a flood fill in Python, which works but which...
6
61777
by: charsh | last post by:
Hi, I using the code below to draw a text in a pictureBox1. //Start--------------------------------------------------------------- private void button1_Click(object sender, System.EventArgs e) { Graphics g; g = pictureBox1.CreateGraphics(); g.FillRectangle(Brushes.White,0,0,160,160);
1
2177
by: kurt sune | last post by:
I am trying to do a rotated font. I get a handle alright which I convert to a font-object by Font2 = Font.FromHfont(handleFont) g.DrawString(Text-to draw, Font2, Brush, CurrentX, CurrentY) However the font doesnt get rotated. Anybody any tips? /k
1
7798
by: Eric Apperley | last post by:
How do I draw rotated text in a Tkinter widget using the draw.text method? Alternatively, if I draw text as normal, how can I then subsequently rotate it about its start point?
2
5795
by: Tilo Pätzold | last post by:
Hi Everybody (especially Microsoft), we build EMF files with rotated text for export to office (powerpoint, word). It is planned that the text can be edited in the office document. Without the rotate transformation the text stays as a block and can be edited in the office document after ungrouping. But a rotated text leads to single charackters when ungrouping. The following sample code creates an emf file. The file can be dragged to...
0
1742
by: Khadim | last post by:
Hi, I am facing a problem in my application. I have an image on which there are many numbers present. I can find the pixel position of the center of those numbers. Now I have the names of those numbers in seperate file which I have to write to corresponding numbers. I rotate my image on 45 degrees with point to rotate 30 pixels on top left which shows my text on 45 degrees on top left. Writing this doesn't gives my much trouble.
5
64260
by: austincollins | last post by:
I have been searching for hours to find a solution to display text rotated at 90 degrees in firefox, and could not find one. css3 and IE has the css command "writing-mode: tb-rl;" but this does not work in firefox. i came to conclusion that SVG is the solution. I have been playing with SVG for few hours now and it is brilliant, you can do graphics and animation like flash but text and javascript based!. anyway check this out, this is one...
7
2194
by: halo combat22 | last post by:
I need help on a project i was assigned. I need a way to recognize these numbers. Any help is appreciated.
0
9722
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10643
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10391
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.