Author Archives: Yuriy

Solution: eventArgs.get_type() incorrectly detects header of WebDataGrid in FireFox as cell

If you use CSOM of Infragistics WebDataGrid you may encounter a bug in client-side event handlers. Let’s say some action is needed on double clicking of a grid cell. The handler looks something like this:

function xMyGrid_DoubleClick(sender, eventArgs) {
   if (eventArgs.get_type() == "cell") {
      //perform action
   }
}

IF condition on line 2 makes sure that action is executed only if actual grid cell is double clicked. If you double click column header, eventArgs.get_type() would return "header" and the action would be skipped.

But not in FireFox. In that browser eventArgs.get_type() returns "cell" even when header is clicked. So an additional condition is needed. Grid column header is rendered as a TH HTML element and this is what we can check:

function xMyGrid_DoubleClick(sender, eventArgs) {
   if (eventArgs.get_type() == "cell" &&  eventArgs.get_item().get_element().tagName != 'TH') {
      //perform action
   }
}

This solution works universally in all browsers.

ABCMouse.com contact number is 800-633-3331

ABCMouse.com offers teaching games for kids. Some like them, some don’t – it’s a matter of taste and preference. What really sucks about the site is their contacts – they never respond to emails, and online contact form isn’t of much use either. And nowhere on the site they list phone number for a contact.

Fortunately such number does exist:

1-800-633-3331

And when you call it, surprisingly, you get to speak to a live person, who resolves your problems pretty quickly.


DISCLAIMER

I feel really silly posting this disclaimer, but due to numerous comments here it is: I am in no way associated with ABCMouse.com. I myself had a bad experience with their service and when I found their direct phone number I decided to share it with the others to spare them the frustration I went through. So, again, I am not charging your card, I cannot cancel your account, please CONTACT THE COMPANY VIA NUMBER ABOVE!


UPDATE

Since visitors here continue to complain and ask advice, I decided to open a message board (forum) where users can exchange experiences and ask for advice.

  1. Please register first: http://forum.galanter.net/ucp.php?mode=register
  2. And login to post question/answers here: http://forum.galanter.net/viewforum.php?f=4

Never mind.

Implement “onVisible” event for HTML DOM element in JavaScript

Well, not exactly, but method described in this particular scenario can be expanded to other cases. Imagine you have a clickable element, let’s say a SPAN and when user clicks this element – it is covered by an absolutely positioned DIV with a higher z-index. In other words a dialog is displayed:

<span onclick="showDialogDiv()">Click here</span>

When user closes the dialog – your SPAN needs to detect this event, to perform some functions (refresh data on the page etc.) but you have no control over function that closes the DIV, so you can’t hook into it. All you know is that DIV’s display style is set to “none” when this happens. It would be cool if there was an “onvisible” event so you could do something like

<span onclick="showDialogDiv()" onvisible="performAction()">Click here</span>

but there’s no such event, so we need to simulate it. Which is surprisingly easy:

<span onclick="showDialogDiv(); var i=setInterval(function(){if ($('xdivDialog').style.display=="none") {clearInterval(i);performAction()}},1000)">Click here</span>

Basically when user clicks the SPAN to show the dialog – at the same time a timer is started that regularly checks visibility of the dialog DIV (whether it’s style display became “none” again). Once this is detected, that means opener SPAN is visible again – timer is stopped and function to handle event is called.

Solution for Infragistics WebDataGrid filtering error “Length cannot be less than zero”

Infragistics WebDataGrid/WHDG controls for ASP.NET offer nice filtering features. Out of the box you just have to enable the behavior and badabingo:

WebDataGrid filtering

There is one glitch though in the way text filtering is implemented: If you enter an empty string as a filter value – an error is thrown:

Async refresh failed. Length cannot be less than zero

Apparently internal grid code cannot handle empty strings (as of version 12.2) so we have to take matter in our own hands.
Continue reading →

It’s confirmed: Apple sucks!

I long suspected that Apple played dirty, just didn’t know to what extent. Today I got a chance to find out.

An iPad mini came into my possession, so I registered an online “AppleID” account. This required all kinds of contact information, including cell phone number which I provided. Soon after registration I began to receive spam calls and text messages. No, not from Apple, oh no. These came from auto insurances, money making schemes and other such scum. Wherever did they get my number? I have had it for several years and NEVER received any spam until this fateful day.

But this is just a beginning. I decided – to hell with it, I was willing to give Apple a chance and they blew it. So now I wanted to delete my account and all associated data. Surprise! You can’t do this online. At http://appleid.apple.com you can only change some contact info, but that’s about it.

So I called support. They requested my device serial number. That made me really wonder – why? If I want to cancel my Google account – they don’t request my Droid phone s/n. Ditto Amazon & Kindle. So why, Apple, why?

The support agent enlightened me. This is needed so I could be charged for this paid support call! I needed to pay to get information on how to cancel my account.

Well, this is really it. Back to Android. Oh and by the way, I don’t see what’ s the fuss is about. As a tablet iPad is pretty average, it does pretty much what any other tablet on the marked does. A few years ago when it was the only thing – maybe it was something. But now – Apple lost it.

FusionCharts.RenderChart and ASP.NET UpdatePanel

Fusion Charts

FusionCharts is a very cool cross-platform charting library – it offers huge variety of chart types and mind-blowing special effects. It also offers wide variety of chart rendering options both client- and server-side.

One such option is to render chart in an ASP.NET application. FusionCharts.dll that you get with the package offers handy FusionCharts.RenderChart method that generates all the client-side code you need to display a beautiful chart. Usually it is used something like this:

xLabel1.text = FusionCharts.RenderChart("FusionCharts/Pie2D.swf", "", sChartXmlData, sChartID, iChartWidth, iChartHeight, False, True)

where xLabel1 is a Label or Literal control in your ASPX page and FusionCharts.RenderChart is a function that accepts number of parameters, like chart type, chart XML data, dimensions etc.

It works very well until you want to render the chart inside of Microsoft Ajax UpdatePanel – then nothing works. This happens because FusionCharts.RenderChart function emits some HTML along with JavaScript that do not work during partial postback. FusionCharts suggest hooking up to UpdatePanel life-cycle events, but it’s seems like an overkill, and often doesn’t work (especially if you have a complex project, which this hookup can interfere with). But there’s an alternative solution.
Continue reading →

Infragistics WebDataMenu last item disappears

While using Infragistics WebDataMenu control from their NetAdvantage for ASP.NET Suite (version 2012.2, current as of this post) I noticed that last menu item in horizontal menu disappears. To me this only happened in Firefox.

Disappearing Act

This post suggested to set EnableScrolling menu property to False as a solution. Which is fine and well, but did not work for me since I need my menu to scroll (it has limited width available and menu items are added programmatically in code-behind so total items width can be wider than width available for the menu).

Continue reading →

Infragistics WebDataGrid: Hidden columns become visible after AJAX postback

A recent update to .NetAdvantage for ASP.NET v12.2 introduced a weird bug – hidden columns of WebDataGrid and WHDG become visible after postback. Service release 12.2.20122.2031 fixed that issue – but only for full postback. Under some circumstances if grid performs an AJAX call (sorting, paging etc.) hidden columns become visible again. This does not happen in IE, but other browsers, such as Chrome and FireFox do exhibit the issue.

This is happening because hidden columns lose “display:none” property in their style. If this happens to you – you have to take matter in your own hands. Continue reading →

Infragistics WebDataMenu: Enable client-side resize with scrolling

Infragistics WebDataMenu control for ASP.NET has a neat feature: if items for horizontal menu don’t fit in allocated width – it automatically adds scroll buttons:

Scrolling in WebDataMenu

Unfortunately this works only if you set menu width in ASPX markup or server-side code. But what if menu is built dynamically and you don’t know in advance how many items there will be. Or if user resizes browser window and available width changes?

We need to be able to set menu width in client-side JavaScript code. Also we need to check whether all items fit into menu width and if not – enable scroll buttons – on demand. The code below does just that. Continue reading →