If after upgrading to a new version of Infragistics NetAdvantage you suddenly found your WHDG sprouting an extra blank row on top:

most likely it’s because grid’s ItemCssClass property is used. In theory (at least according to ever so verbose documentation) it should define what grid’s cells look like. In practice it have no effect whatsoever. Or rather had no effect until upgrade (verified in version 2011.1, perhaps even earlier). Now if your CSS class used in this property contains HEIGHT attribute – a blank row of that height will be inserted on top of the grid.
Solution? Remove ItemCssClass property. It’s useless anyway.
Infragistics Aikido WebDataMenu control has extensive (albeit poorly documented) client-side library of classes, method and properties. 2 methods addItem and removeItem supposedly allow you to add/remove menu items in JavaScript. These methods have been public since 9.2 release probably even earlier, but have a lot of drawbacks, one of the major ones – for every method call an AJAX call to server is made, which slows performance dramatically, breaks code flow and won’t let you set properties of newly added item.
Method described below is a bit of a hack, but it works purely client-side, no slow round trips, no waiting for AJAX call to return and you have full control of all menu items. Continue reading 'Infragistics WebDataMenu CSOM addItem/removeItem workaround'»
A while back I posted a method to highlight rows on mouse over in Infragistics UltraWebGrid. Over the time turned out that it had several limitations the main being: if you enable additional styling for some elements of the grid, they’re not preserved after mouse-over/mouse-out events. For example if you set a SelectedRowStyleDefault property with a different background and then move mouse over a selected row – that style will be removed.
So, here’s a complete solution to work around that limitation: Continue reading 'Ultrawebgrid: Highlight row on MouseOver with Selection enabled'»
If you’re using Infragistics UltraWebGrid and experienced an odd behavior where the grid does not display the right-most vertical border line – there’s a workaround.
By default 2 elements contribute to the grid border – border from RowStyleDefault property and border from FrameStyle property. For some reason IE6/7 (yes, some people still use those) do not render the right border of the last column, even though all 3 properties (BorderColor, BorderStyle and BorderWidth) are set. So the solution is to have FrameStyle lend that border:
- Expand RowStyleDefault -> BorderDetails property and set StyleRight to None – this is done, so the double border won’t render in IE8 and other browsers where the border is displayed correctly in the first place
- Expand FrameStyle -> BorderDetails property and set ColorRight, StyleRight and WidthRight properties to the desired color, style and width (e.g. LightGray, Solid, 1px)
As a result, the right border is displayed correctly in all versions of IE.
In one of my recent projects I needed to validate whether user’s input is a valid date, and this needed to be done client-side, in browser prior submission to the server. Lazy as I am, I Googled for a ready-to-use code snippet. There’re plenty of versions out there, but most of them offer incomplete solution and none of them take into account browser locale, you know – the language settings:
So I decided to cook something of my own Continue reading 'JavaScript IsDate(): Validate date according browser locale'»
This is probably a very obscure situation, but it happened to me, it could happen to someone else. Scenario: an ASP.NET page with Infragistics UltraWebGrid inside of a WARP panel. A button outside the WARP serves as a trigger for partial postback. First click on the button causes expected partial postback, but on the second click page does full postback and is screwed after that. The issue happens only in IE6/7, page works correctly in IE8.
Another condition – page contains ASP.NET AJAX ScriptManager control with ServiceReference path pointing to an ASMX WebService.
Turned out the issue was caused by project being left in debug mode (in web.config debug=”true”). Which caused WebService page to be loaded with parameter “jsdebug” in query string. Which apparently IE6 and 7 didn’t like very much. Switching to debug=”false” in web.config solved the problem.
ASP.NET, HTML/CSS, Infragistics, Javascript, Rant
|
browser, bug, dotnet, Error, html, Internet Explorer, Microsoft, solution
Hyperlinks are designed for clicking, to lead you somewhere else, but sometimes this behavior is undesired. In my case a grid control displayed some HTML data in its cells (including hyperlinks) and clicking on those links caused some undesired effects. I still wanted to display HTML and allow clicking on other grid elements (e.g. checkboxes) just needed a way to prevent hyperlinks clicks.
Remember that events bubble? That gave me an idea to wrap the grid control in a DIV to catch click events. This way I can check event source and if it’s a hyperlink – cancel the event, otherwise allow it. Well that’s pretty much it. Here’s a stump for the DIV wrapper:
<div onclick="return checkClickSrc()">
<!-- Controls to check go here-->
</div>
and here’s the JavaScript code that does the check:
function checkClickSrc() {
return event.srcElement.tagName != 'A'
//for firefox: return event.target.tagName != 'A'
}
Infragistics UltraWebGrid offers rich set of features, among which paging of large sets of data. But if your total-number-of-records/records-per-page ratio is too high you will end up with way too many page links. And it doesn’t look pretty:

UltraWebGrid offers some out-of-the-box solutions for this problem. Continue reading 'Create enhanced pager for Infragistics UltraWebGrid'»
Recently I upgraded an ASP.NET project from ancient 6.3 version of Infragistics to current (at the moment) 9.2. Suddenly UltraWebGrid control began to display an unpleasant effect – columns that used to have no caption now showed what appeared to be default captions:

Looking at grid’s HTML markup I noticed that it set the caption to an empty string (showing code for one column):
<igtbl:UltraGridColumn HeaderText="">
<Header Caption="">
</Header>
</igtbl:UltraGridColumn>
Apparently it’s a new behavior in Infragistics 9.x to substitute empty captions with default column names. The solution is to set caption to a single space which, while invisible, is considered a real text caption and is not substituted by anything:
<igtbl:UltraGridColumn>
<Header Caption=" ">
</Header>
</igtbl:UltraGridColumn>
The result:

If you get the following error while browsing a page in Internet Explorer:
The value of the ‘method’ attribute may not be ‘html’
chances are MSXML registration is corrupted on your machine. To fix this, open DOS prompt and type following commands:
regsvr32 msxml.dll
regsvr32 msxml2.dll
regsvr32 msxml3.dll
This will re-register MSXML and the error will go away.