Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Rotated text in a datagrid

Reply
Thread Tools

Rotated text in a datagrid

 
 
Jae
Guest
Posts: n/a
 
      11-21-2003
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.Graphic but once you do that how do you add the
image to the page? Any help would be greatly appreciated

Jae
 
Reply With Quote
 
 
 
 
vMike
Guest
Posts: n/a
 
      11-21-2003
Maybe this will help. You need to use a style.

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

<%@ import Namespace="System.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("StringValue", 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">
<aspataList id="os0" repeatcolumns="2" repeatDirecttion="horizontal"
runat="server">
<ItemTemplate>
<asp:label class="sideway" text='<%#
(DataBinder.Eval(Container.DataItem, "StringValue")) %>' runat="server" />
</ItemTemplate>
</aspataList>

</form>
</body>
</html>


"Jae" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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.Graphic but once you do that how do you add

the
> image to the page? Any help would be greatly appreciated
>
> Jae



 
Reply With Quote
 
 
 
 
vMike
Guest
Posts: n/a
 
      11-22-2003
For a datagrid you will need to do something like this.

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

<%@ import Namespace="System.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("StringValue", 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">
<aspataGrid id="os0" runat="server">


<ItemStyle cssclass="sideway">
</ItemStyle>
<columns>
<asp:BoundColumn DataField="StringValue" />


</columns>
</aspataGrid>

</form>
</body>
</html>


"Jae" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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.Graphic but once you do that how do you add

the
> image to the page? Any help would be greatly appreciated
>
> Jae



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rotated text - problem solved thedarkman HTML 24 10-27-2010 10:42 AM
rotated text - problem solved thedarkman HTML 1 10-16-2010 09:36 PM
Tkinter - Drawing rotated text in a widget Eric Apperley Python 1 03-12-2006 08:08 PM
rotated text go_to Javascript 0 11-26-2004 05:10 AM
Text rotated 90 - deg. is it possible ? msorion HTML 5 07-22-2003 08:27 PM



Advertisments