-
How can I create a fixed width column?
Hi
I have Tornado EP.
I need to be able to apply a fixed width font to one column in a grid. This is to display an attendance pattern, each character to denote a register mark (eg, A=Absent, P=Present, L=Late, - = session not yet marked).
Is there any way of fixing the width of a single column in a grid and applying a font to it? I know it can be done with .css for all columns but what about a single defined column?
Last edited by bobc; 03-20-2003 at 05:47 AM.
-
one way is in the .dbeditupdateflds is: :
fi= your_field_name|type=Text|tag=size=4
alternatively:
fi=your_field_name|type=TextArea|tag=COLS=25 ROWS=5,
Probably a variation on that would work in the griddisplay fields but I haven't lloked into that yet. But would be interested to know as well
-
Bart,
use dbMagicCell. Try something like this:
.dbGridMagicCell = "(;![]#|~/+{}) field=1 | tag=bgcolor=BLUE align=right width=200 |macro=#1#"
I hope that helps.
Mark
-
Mark
This the MagicCell tag only seems to work if the width of the displayed columns does not exceed the width of a standard screen. To simulate this, create a page with the following code:
<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim EditAll As New Tornado.Z()
With EditAll
.dbUnit = 777
.dbSkin = "12"
.dbMode = "grid"
.dbprovider = "sql"
.dbCulture="en-GB"
.dbPageSize=15
.dbdbtype="sql"
.dbMode = "type=grid"
.dbDSN=application("nwindsql")
.dbSQL = "Select * From orders"
.dbNavigationItem = "top,bottom,prev,next"
.dbGridDisplayFlds = "0,1,2,3,4,5,6,7,8,9,10,11,12"
.dbGridMagicCell="field=1|tag=width=200|macro=#1#"
.ASPdbNET()
end with
End Sub
</script>
Bob
-
Bob,
First design a table that looks the way you want using standard HTML. Then write a MagicCell statement that generates that HTML. If YOU can't make an HTML table that works, then ASP-db won't be able to make one either.
Mark
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|