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'»
Lately I’ve been posting a lot about Kindle Fire and no wonder – I love this tablet and tweaking with it.
Today I went to tweaking extreme – installed a custom ROM, namely CyanogenMod. CyanogenMod is famous for being a better replacement ROM for a wide multitude of Android devices from Droid phones to Nook tablets. And finally it made its way to Kindle Fire. Installing it turned out to be surprisingly easy – first, using Kindle Fire Utility root your Fire and install TWRP Recovery – very useful instrument not only for installing new ROMs but also for backing up and restoring your existing one in case something goes wrong. Second, download latest CyanogenMod in form of “update.zip” and place into temp/download folder of your Fire. And lastly reboot into TWRP recovery, browse for the ZIP and install it.
CyanogenMod didn’t let down, it was perfect as usual – fast, highly customizable, this one specifically build for Fire with its lack of hardware buttons. It has many wonderful features (for example picture in this post is, unlike previous posts, is a direct screenshot from my Fire, “take a screenshot” is one of the options appearing in menu when you press and hold power button).
It has everything. The only drawback for me is, for the love of it, I couldn’t make Amazon Instant Video app work in this mod. The issue is widely discussed on the Interwebs, multiple possible solutions are offered, but none worked for me. And since Prime Instant Videos is the only original Fire feature that I use – I had to return back to rooted stock Amazon ROM with ADW launcher (thanks TWRP for making ROM backup and recovery a very simple experience). Until working version of Amazon Instant Video is bundled with Cyanogen – I am keeping the stock.
Continue reading 'CyanogenMod on Kindle Fire'»
Submitted for your approval an UltraWebGrid with CellClickActionDefault=”RowSelect” and SelectTypeRowDefault=”Single” – an ordinary down-to-earth grid. It also posses event handler AfterSelectChangeHandler, also nothing out of the ordinary. But in a minute the aforementioned grid will exhibit properties most unusual. As the alert message ahead reads: Infragistics Bug Continue reading 'UltraWebGrid bug: Row is selected on mouse move'»
This was one weird mystery. I have used ASP.NET’s method ClientScript.RegisterStartupScript countless times to inject client-side JavaScript into page’s markup from the server-side code and it always worked perfectly. This time I created a very basic page from scratch:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>My Page</title>
<script type="text/javascript" src="script1.js" />
<script type="text/javascript" src="script2.js" />
<script type="text/javascript" src="script3.js" />
</head>
<body>
<form id="xfrmMain" runat="server">
</form>
</body>
</html>
And then injected client-side script into it:
ClientScript.RegisterStartupScript(Me.GetType, "JSCode", "ProcessData();", True)
where ProcessData() is function from one of the scripts, loaded in the HEAD tag. The script injected just fine, I got a beautiful insert at the bottom of the rendered page:
<script type="text/javascript">
//<![CDATA[
ProcessData();//]]>
</script>
The problem was – it didn’d do squat – the script did not execute. Why? Continue reading 'ClientScript.RegisterStartupScript: script injected, but not executed'»
I’ve been successfully using manual load on demand in WebHierarchicalDataGrid for a while now, but recently noticed strange thing. The deeper in grid’s hierarchy I expanded the children – the slower it went.
In my case every time user clicks [+] to expand a row, VB.NET code calls an SQL Server Stored procedure to bring in child rows. I grew suspicious and fired up SQL Profiler. What I saw surprised me. Number of calls to the stored procedure increased the deeper in grid’s hierarchy I expanded the children. When I clicked [+] on the root level it resulted in 1 SP call. Clicking [+] on the child to expand grandchild – 2 calls. Expanding grandchild to see grand-grandchild rows – 3 calls, etc. Continue reading 'WHDG: RowIslandsPopulating event fires multiple times'»
This is the second post in saga titled Upgrading Infragistics Controls to a new version. Chances are that your WebDataMenu looks weird after upgrade to 2010+ version. In my case the menu had following options/features:
- It was a context popup menu, called on right mouse click
- Text of menu items was assigned dynamically at runtime in JavaScript Client code
After upgrading NetAdvantage from version 2009.2 to 2011.1 strange things started to happen. Text of the menu items was cut short, submenues appeared at wrong places it looked like something from a Dali’s painting.
Numerous experiments later I found out that the problem was with EnableScrolling property of the menu control. Setting it to False returned menu to realm of realism.
Upgrading 3rd party library to a new version is bound to have problems and Infragistics is no exception. In my case I was upgrading NetAdvantage for ASP.NET from version 2009.2 to to 20011.1 and right away WebHierarchicalDataGrid started to crash client-side. If ScriptManager was in debug mode I’d get error:
Microsoft JScript runtime error: Sys.ArgumentUndefinedException: Value cannot be undefined.Parameter name: type
With ScriptManager in Release mode it’d be:
Microsoft JScript runtime error: Object expected
But always in Sys.Component.Create – it looked like grid’s client-side scripts weren’t loading at all. After A LOT of digging I found out that the culprit was grid’s server-side Bands.Clear() method. When called, it caused client-side WHDG JavaScript not to load. When that method was commented – JavaScript errors disappeared. So until Infragistics comes out with a bug fix – if you experience similar problem, try to avoid Bands.Clear() method.
This was driving me nuts. I have a very basic SQL code similar to
ALTER PROCEDURE Proc1(@val1 NVARCHAR(max))
AS
BEGIN
-- some code
EXEC Proc2 @val2 = @val1
-- some other code
END
I was getting error “String or binary data would be truncated”, but only when 2 conditions were met:
- @val1 is quite large
- Either SQL Server/computer just restarted or stored procedure Proc2 was just updated (ALTER)
Error happened just by the fact of the EXEC Proc2 being there it didn’t even had to do anything, it could RETURN straight away. Both @val2 an @val1 are of a type NVARCHAR(max) so there is no reason for the error. The error happened only once, after that I can pass data of any size – and no error would happen. Like I said – nuts. Continue reading 'Elusive “String or binary data would be truncated” error'»
I have been using WebHierarchicalDataGrid with manual load on demand bands with a pretty good success until I hit this snag.
The WHDG has correctly displayed HTML fields before, but this time a column with HTML data (an HREF link to be precise) is needed as one of the grid’s DataKeyFields to provide uniqueness of the row:
Continue reading 'WebHierarchicalDatagrid: Sys.ArgumentException: Cannot deserialize on Row Expand'»
While connecting from an ASP.NET application to an Oracle database via OLEDB I got following error:
OraOLEDB.Oracle Provider is not registered on the local machine
Now I know that the driver was installed and registered. I downloaded an official driver from Oracle WebSite. In my case it was ODAC112021Xcopy_x64.zip 64-bit version for XCopy deployment. It installs in 2 easy steps:
- Unzip downloaded file into any folder
- Run (as administrator) command: INSTALL TYPE PATH NAME DEPENDANCIES
Where
- TYPE – type of installation (e.g. OLEDB, basic etc.)
- Path – where you want driver installed
- Name – Oracle home name
- Dependencies – true/false whether to install dependencies (e.g. instant client)
So my command was
INSTALL ALL “C:\Program Files\Oracle64Driver” Oracle64Driver TRUE
Which copied the files and created correct Registry entries (I checked). And still I was getting the error. I Googled it (a lot) but majority of suggestions was that the error is due to Windows ACL and correct permissions should be set on the driver folder. Didn’t help me.
So I fired up trusted ProcessMonitor and it showed that W3WP.EXE (ASP.NET process) was trying to access missing OCI.DLL file in the path C:\Program Files\Oracle64Driver\Bin, e.g. in the Bin folder of the path were the driver was installed. Looking back at the place were I unzipped the original driver files I found that DLL inside of “instantclient” folder. So I copied entire content of that folder into Bin folder at the destination. And Voila! The error disappeared.
Apparently Instant Client files aren’t copied by the installer even when Dependencies option is set to true.