Archive for November, 2007

Goethe

Whatever you can do, or think you can, begin it. Boldness has power, and genius, and magic in it.

Carl Jung

Neurosis is always a substitute for legitimate suffering.

Theodore Roosevelt

Life is a great adventure and the worst of all fears is the fear of living.

Datagrid with fixed width columns

I created a dynamic calendar using a datagrid with a width of 700px with each of the seven days set to 100px. I thought this would keep days in a fixed width column, but that was not the case.

I had to add the following to my code and then the columns stayed fixed:


dgrCalendar.Style.Add("table-layout", "fixed")

Dynamically set datagrid HeaderText

I am creating a ASP .Net page to maintain all of my lookup tables, rather than creating a separate page for every 2-4 field table.

Initially I thought I would change the headertext property during the datagrids OnItemDataBound event, checking for ListItemType.Header, etc. This proved a bit convoluted with the resolution being much simpler:

dgrLookupTable.Columns(1).HeaderText = "Source"

The ASP code looks like this:

  1. <asp:TemplateColumn SortExpression="1" HeaderText="">
  2. <HeaderStyle Width="150px"></HeaderStyle>
  3. <ItemStyle Wrap="False"></ItemStyle>
  4. <ItemTemplate>
  5. <span class="dgrOverflow">
  6. <%#Container.DataItem("1")%>
  7. </span>
  8. </ItemTemplate>
  9. <EditItemTemplate>
  10. <ASP:TextBox Size="40" id="txt1" Text='<%# Container.DataItem("1")%>' runat="server" />
  11. </EditItemTemplate>
  12. </asp:TemplateColumn>

Nietzche

Men believe in the truth of all that is seen to be strongly believed in.

Slaughterhouse – The Handbook of the Eastern Front

Extraordinary detail on both German and Russian units. First part of book provides brief descriptions of the major players in the conflict. Maps and illustrated unit organization diagrams. More of a reference manual.

Slaughterhouse: The Handbook of the Eastern Front

Sledgehammers

Very detailed discussion on the many engineering flaws that handicapped the Tiger’s performance. Great first person accounts at the end of the book from Allied soldiers who faced and destroyed Tigers. Many maps and detailed statistics of Tiger combat losses. One interesting point was that the Germans never developed a mine sweeping vehicle like the British flail. Instead, they would use the Tigers to explode the mines.

Sledgehammers: Strengths and Flaws of Tiger Tank Battalions in World War II

1.1. datagrid in 2.0 .Net environment

My ISP recently migrated all 1.1 accounts to 2.0. All the 1.1 code seems to work fine. One bizarre thing was that the gridlines in all of my datagrids turned to white, which makes them invisible against a white background.

I found a couple posts that said if you made bgcolor=white, you would then be able to see the gridlines. I tried that and it did work, but obviously not a viable solution.

Turns out to be very simple. You need to set the bordercolor attribute of the datagrid in code:

dgrCalendar.Attributes.Add("bordercolor", "Black")

Initial thread

Darkness and Light

A good read. Harvey has a way of binding you to the story. Always a good sign when you look forward to picking up the book the next day. Also has the ability to let you skim sub-plots that you are not interested in. For instance, Elder, the main character, has a strained relationship with his daughter, Katherine. This does provide insight into the characters, but it really doesn’t interest me.

Darkness & Light: A Frank Elder Mystery (Frank Elder Mysteries)

« Previous Page