Infragistics UltraWebTab control offers multiple styling options, many of them can be set via external CSS classes. As a matter of fact about only element you cannot style via external stylesheet is rounded corner images. Or can you?
By default images used to give the tabs rounded-corner look are referenced directly in UltraWebTab ASPX markup:
Would set style of grid header and rows via external CSS class. You would expect that simple defining classes like this:
.HeaderStyle { /* style definition goes here */ }
.RowStyle { /* style definition goes here */ }
should do the trick, but you may experience some unwanted, erratic behavior: styles getting lost, styles getting mixed up (row would get a header style and vise versa).
To fix this we should let grid know that header style should apply only to header row (THEAD/TH HTML elements) and row style applies only to rows with data (TBODY/TD elements). This is done via slight adjustments of the above CSS to point it to specific elements:
This way there’s no confusion, styles apply exactly were they belong. Also you may need to set grids MergeStyles property to False and make each class fully define it’s element (including fonts, colors, backgrounds etc.)
If you’re still using classic Infragistics Controls and want to make them work in modern browsers, sometimes a little additional work is required. Hopefully this little trick will save you some time.
UltraWebGrid has a neat property TopItemSpacing, when set to Auto it automatically spreads top level menu items across the menu control, giving them nice spacing in between. Unfortunately this property seems to work in Internet Explorer only, in Firefox (and Chrome and etc.) it is ignored, rendering menu in Compact mode giving top level items crowded “too-close-for-comfort” look.
The solution is to take spacing in our own hands. Set TopItemSpacing to Compact and instead add right padding to TopLevelParentItemStyle and TopLevelLeafItemStyle elements of the menu. For example (from the markup point of view):
Actual pixel value of the padding is up to your particular scenario, but the final result is top level menu items will be nicely spaced both in IE and in Firefox.
Often, when drawing a chart, there’s a need to show a threshold – basically a line that indicates whether your values are going above or below it. Take for example this ColumnChart:
If you working with Infragistics Aikido controls and your WebDataGrid or WHDG is too long – a common approach to make content scrollable is to place grid control inside of a DIV with fixed dimensions and overflow set to auto:
It works fine, but there’s one drawback: if you scroll your grid horizontally and then select a row – grid’s scroll position snaps back to the leftmost position. Infragistics says that it’s a browser bug and we need to talk to browser vendor about it. Wanting to solve the problem in this century I looked for alternatives and this is what I found. Continue reading 'WebDataGrid: Prevent scrolling on row selection'»
HelloTXT is a very cool service that can post your updates to multiple social networks with a single click. You can feed it data in multiple ways from RSS feeds to Android phones. One such way is a small neat WordPress plugin by Matthew Phillips. Once installed in your blog it will ping HelloTXT whenever you write a new post, notifying all your connected services from Facebook to Twitter.
One small drawback of v1.0.1 of this plugin (current as of this writing) – if permalink URL of your post is very long (pretty ones tend to be) – it gets cut off during HelloTXT notification, since status update has to be within 140 characters length. But there’s an easy solution. Open PHP source of the plugin in any text editor and in function hellotxt_notification locate line:
$link = get_permalink($post->ID);
This is the line that gets permalink of your post. To replace it with shortened URL we can call API of TinyURL service:
It’s a common scenario: user needs to download a file from the server by clicking link or a button in your ASPX page. The server-side code for this is pretty straightforward and looks something like this:
Sub DownloadFile(ByVal i_sServerPath As String, ByVal i_sDisplayName As String)
Dim oFile As FileInfo = New FileInfo(i_sServerPath)
With Response
.Clear()
.ClearHeaders()
.AddHeader("Content-Length", oFile.Length.ToString())
.ContentType = ReturnContentType(oFile.Extension.ToLower())
.AddHeader("Content-Disposition", "attachment; filename=" & i_sDisplayName)
.TransmitFile(oFile.FullName)
.End()
End With
End Sub
The code accepts 2 parameters: i_sServerPath – full path to the file on the server and i_sDisplayName – file name that will be displayed to the user in the “Save As” dialog. Code also populates response headers based on file information. I use this handy function to populate ContentType based on file extention:
Function ReturnContentType(ByVal i_sfileExtension As String) As String
Select Case i_sfileExtension
Case ".htm", ".html", ".log" : Return "text/HTML"
Case ".txt" : Return "text/plain"
Case ".doc" : Return "application/ms-word"
Case ".tiff", ".tif" : Return "image/tiff"
Case ".asf" : Return "video/x-ms-asf"
Case ".avi" : Return "video/avi"
Case ".zip" : Return "application/zip"
Case ".xls", ".csv" : Return "application/vnd.ms-excel"
Case ".gif" : Return "image/gif"
Case ".jpg", "jpeg" : Return "image/jpeg"
Case ".bmp" : Return "image/bmp"
Case ".wav" : Return "audio/wav"
Case ".mp3" : Return "audio/mpeg3"
Case ".mpg", "mpeg" : Return "video/mpeg"
Case ".rtf" : Return "application/rtf"
Case ".asp" : Return "text/asp"
Case ".pdf" : Return "application/pdf"
Case ".fdf" : Return "application/vnd.fdf"
Case ".ppt" : Return "application/mspowerpoint"
Case ".dwg" : Return "image/vnd.dwg"
Case ".msg" : Return "application/msoutlook"
Case ".xml", ".sdxl" : Return "application/xml"
Case ".xdp" : Return "application/vnd.adobe.xdp+xml"
Case Else : Return "application/octet-stream"
End Select
End Function
If you tried to use Infragistics classic UltraWebMenu control in IE9 you may experience issue (even in the latest version, 11.2 at the time of this post) whereby menu items don’t change background on mouse hover even though background is specified in menu’s HoverItemStyle property.
The solution is specify BorderStyle in HoverItemStyle. It can be any value besides NotSet, but the actual attribute has to be there. So for example if you want your hover style to have no borders and your original style looks like:
I don’t know why border style affects showing of the background, but there you have it. Adding BorderStyle to HoverItemStyle will enable displaying of background color on hover.
It’s a Visual Basic IDE environment for developing Android apps. But unlike other similar solutions it does not require bloated runtime running on the device, Basic4Android easily compiles native APK app.
Don’t learn Java, utilize your existing Visual Basic skills instead. And the community of thousands of developers can be a huge help as well.
Also you’re in luck today. Download the trial, play around with it and if you like it - use discount code “bvqbet” to get 50% off any version! Here’s how: