Wednesday, January 30, 2013

ASP.Net Controls Visible = False Problem

   If you have a control, such as a label, that you set the "VISIBLE" property to false in the designer, then the control is not rendered to the client. This means you cannot use javascript to manipulate the control, because it is not there. So, if you want to make a label visible that has the visible property set to false in the designer, you cannot do it directly.
    In order to have the control rendered, use the style attribute: display:none to make the control invisible on startup. Then, you can use javascript to set the element.style.display="inline" to make it visible when the program is running.

    Just a little annoyance until you figure out how to get around it.


Tuesday, January 29, 2013

Working with UpdatePanels and javascript

     I created some file maintenance programs that utilized the Updatepanel functionality on the forms. It was necessary to hook up some javascript to get the functionality I wanted in the program. So look at the fmCarrierDealerGroup program to see how I did it.
   While utilizing the updatepanel, I found that I needed to hook up an event handler to get control after ASP.net did its own updates.  I could then do what I needed to do in Javascript in order to manipulate and highlight gridview selectors and other things.


Wednesday, January 23, 2013

Crystal Reports : Turning Off Snap to Grid



This is something that occasionally drives me nuts. It is very typical to have a report that mimics the look of a spreadsheet (you actually just format each field to have a Border around it like cells in Excel). However, arranging precise items like individual rows and columns may not be the easiest thing in the world. What you usually get is one or two items that for whatever reason don't want to play nice and line up perfectly.

The first thing I learned to do was move Report items by using my arrow keys, not the mouse. Select any Crystal object and try it. You'll feel a lot more control over how things line up this way.

The second thing I learned to do was occasionally turn off my Snap. Simply right-click within the designer and select (de-select, actually) "Snap to Grid". When Snap is turned off, you'll find that you can now move your objects with the finest precision. Don't forget to turn Snap back on before you add any new objects to the Layout; they will behave erratically once Snap is turned back on. A good rule of thumb is to Design with Snap On, Fix with Snap Off.

These two tips can save you a lot of grief and aggravation, especially when modifying cosmetically complex reports. (Adding a column in to stack of columns, etc.)

Friday, January 11, 2013

MYSQL Location of Data Files

  You can look in this file to find which directories are used by MYSQL, including the physical path for the data files.

Go into your C:\Program Files\MySQL\MySQL Server 5.5\my.ini and find the variable "datadir". This is your Data dir ;)