I have a problem with a dynamically built Rad Grid.
It loads just fine but I had a problem where I need to maintain leading white space in
a note text field (it's 50 char data string used to print on forms).
I found a few ideas to try and fix but the only one that worked for me was to use
the DataFormatString.
Now the problem is when I do this formatting, my row height has almost doubled
in size. How can I set the row height and still keep the preformatted text from dropping
the leading white space. Any input would be great.
Dim rgOrderNotes As New RadGrid
rgOrderNotes.ID = "rgOrderNotes"
rgOrderNotes.Style("Position") = "Absolute"
rgOrderNotes.Style("Top") = (150).ToString & "px"
rgOrderNotes.Style("Left") = (50).ToString & "px"
rgOrderNotes.Visible = True
rgOrderNotes.AutoGenerateColumns = False
rgOrderNotes.Height = 500
rgOrderNotes.PageSize = 18
rgOrderNotes.ClientSettings.Scrolling.AllowScroll = True
rgOrderNotes.AllowAutomaticInserts = True
rgOrderNotes.AllowAutomaticUpdates = True
Dim boundColumn As GridBoundColumn
boundColumn = New GridBoundColumn()
boundColumn.DataField = "O5ITEM"
boundColumn.HeaderText = "LINE #"
boundColumn.HeaderStyle.Width = Unit.Pixel(120)
rgOrderNotes.MasterTableView.Columns.Add(boundColumn)
boundColumn = New GridBoundColumn()
boundColumn.DataField = "ODTEXT"
boundColumn.HeaderText = "NOTE DESCRIPTION"
boundColumn.ItemStyle.Font.Name = "Courier New"
boundColumn.DataFormatString = "<pre>{0}</pre>"
boundColumn.HeaderStyle.Width = Unit.Pixel(400)
rgOrderNotes.MasterTableView.Columns.Add(boundColumn)