I have a lot of experience developing applications using the Infragistics NETADVANTAGE for ASP.NET controls. I've recently downloaded the latest control suite and I've decided to write a series of articles on the different controls and how they are used. This article will be focused on creating Microsoft Word, Microsoft Excel, PDF, and XPS documents using the Infragistics NETADAVANTAGE for ASP.NET Controls.
Exporting PDF and XPS documents from the contents of the WebDataGrid
The Infragistics control suite is complete with two fully functional web grid controls. The WebDataGrid provides a high performance, scalable ASP.NET AJAX enabled grid with built in support for sorting, filtering, and editing tabular data. The control is designed with touch enabled devices in mind. There is also built in support for flicking and other multi-touch gestures.
Here is an screen shot of the WebDataGrid for your review
As you can see, the grid is sleek, stylish, and very pleasing to the eye. Infragistics controls have many predefined styles, as well as rich server side and client side APIs.
The second Infragistics grid control is the WebHierarchicalDataGrid. The WebHierarchicalDataGrid shares the same functionality as the WebDataGrid as well as the ability to model master-detail and self referencing data relationships. These relationships are represented by expandable rows that contain the related data inside of a parent row.
Here is a screen shot of the WebHierarchicalDataGrid.
Both of the grids feature the ability to export the contents of the grid's data source to Microsoft Excel, Microsoft Word , PDF, and XPS documents. There's also built in support for importing the contents of an Excel spreadsheet to populate the data grids.
Microsoft Office independence
One of the greatest features of the Microsoft document export functionality is the fact that there is no need to have Microsoft office installed on the server to generate the resulting documents. The Infragistics library uses 100% managed .NET assemblies to implement this functionality. This means there's no need to hack around the Word or Excel COM interop libraries to achieve the desired results. Infragistics NETADVANTAGE comes with a Word Document object model as well as an Excel Woorkbook object model which provide rich APIs for creating Microsoft Office documents for use in your applications. You can generate invoices, work orders, and receipts with very little code.
My next article will include a fully functional sample that illustrates some of the functions of the WebDataGrid as well as the document export functionality.
This concludes the article. Thanks for reading!
You can download a trial of the entire .NET NETADVANTAGE control suite by visiting the following URL:
And here are some useful videos to get you started
Export Grid Data to Excel
Export Grid Data to PDF and XPS formats
Visual Studio 2012RC and ASP.NET MVC4 Mobile sites
I've recently downloaded Visual Studio 2012 RC to experiment with the latest and greatest that .NET 4.5 has to offer. The installation took around an hour and a half.
What's new in .NET 4.5 you ask? Here's a comprehensive list from (sorry Scott!) http://msdn.microsoft.com/en-us/library/ms171868(v=vs.110).aspx .
ASP.NET MVC4 mobile sites
I started by launching VS 2012 and clicking on new project and then browsing to samples. I clicked on c#, my language of choice and I browsed through many of the interesting samples until I came across the ASP.NET MVC 4 Mobile features sample.
Once the sample loaded, I noticed a nice feature of VS 2012. The IDE allows you to choose the browser in which to debug your ASP.NET applications. Since we are dealing with an ASP.NET MVC 4 Mobile application, I thought it was only natural for me to seek out mobile device emulators to use to view the websites. It turns out Visual Studio 2012 makes this easy.
You start by clicking the browser drop down list located next to the green "play" (debug) button.
How to add custom emulators
I'm sure you've noticed from the screenshot that I have a few emulators loaded in my browser list. These aren't
there by default, however, it's easy to add them.
Opera Mobile Emulator
The Opera mobile emulator can be downloaded from the following address
Once you've installed the emulator, all you have to do is click on the browser drop down in VS 2012 and
click "Browse With"
You are then prompted with the Browse With dialog box that lists all available browsers.
Next, you click on Add and you are then prompted with the add program prompt.
You simply browse to locate the Opera Emulator executable and enter a friendly display name.
If you used the default installation settings, the executable can be found in
C:\Program Files (x86)\Opera Mobile Emulator\OperaMobileEmu.exe.
The iPhone and iPad emulators.
In order to add the iPhone and iPad emulators, you basically have to follow the same set of steps.
you must set the application arguments associated with the emulator mode that you wish to operate in.
To install the emulator, I used WebMatrix 2. You can find WebMatrix2 in the Microsoft Web Platform Installer 4.0
located at http://www.microsoft.com/web/downloads/platform.aspx
I found the following instructions under this blog entry by Scott Hanselman
From the Run menu, select Add new...From here, you'll go to the Browser Extension
area where you can add the iPhone and iPad emulators to your system.
Once you've installed the emulators, you use the same VS 2012 browse and
add directions as before to add the iPad and iPhone emulators to your VS 2012 browser list.
Here are the configurations for the iPad and iPhone.
Once you've added the emulators, you can browse the mobile site sample
application using the device of your choice.
Here are some screenshots for your reference.
Opera mobile emulator
And that's it! That's all it takes to view an ASP.NET MVC 4 mobile app in
3 different emulators. I'm very excited about VS 2012 and the possibilities that it
and the .NET 4.5 framework have created.
I plan to post more articles related to .NET 4.5 as I evaluate the framework.
I'm particularly interested in the added improvements regarding parallel computing.
I'd like to give a special thanks to Scott Hanselman for his post regarding WebMatrix 2.
Stay tuned and thanks for reading!
As per my previous post [post title here], I wanted to configure mono on my recently installed Ubuntu machine. Specifically, I wanted to be able to use the latest .NET functionality as well as ASP.NET MVC integration with Apache. In this post, I plan to provide the steps and resources in which I took to accomplish my goals.
Let's start with the Ubuntu machine....
The Ubuntu desktop specifications
The machine in which I've installed Ubuntu is an OLD machine that I had laying around the house. My Android has more horsepower than this old Dell, however, Ubuntu 10.4 seems to operate at a perfectly acceptable capacity. I plan to "refresh" my Linux skills and look for spare RAM to add to this machine before I upgrade to Ubuntu 12.04. The recommended minimum requirements for Ubuntu 12.04 are as follows;
The minimum memory requirement for Ubuntu 12.04 is 384 MB of memory for Ubuntu Desktop. Note that some of your system's memory may be unavailable due to being used by the graphics card. If your computer has only the minimum amount of memory, the installation process will take longer than normal; however, it will complete successfully, and the system will perform adequately once installed.
While the minimum memory requirement for 32bit is 384 MB, a minimum of 512 MB is needed for the 64bit installation. On systems with only the bare minimum amount of memory, it is also strongly recommended to use the "Install Ubuntu" option as it uses less memory than the full live session.
Ubuntu Desktop System Requirements for 12.04 LTS
What's with all the aPtitude?
As much as I love aptitude, I'm quite annoyed by the time it takes for source repositories to list packages as "stable". I understand that this has nothing to do with the package manager itself and that the Ubuntu version carries more of the blame, even so, I wanted to simply apt-get install mono-complete, I would be stuck with mono 2.4. Since I wanted to use some newer functionality, I had some planning to do. The overall process went a little something like this;
Find a bash script that compiles all of the mono packages that I needed to get the job done.
Execute the script and watch some T.V while I waited for the massive compile to complete.
Move the Apache mono module configuration into the "available modules" folder to enable mod-mono under Apache.
I needed to create an Apache virtual host configuration file with the mod-mono specific settings that are required.
I had to prepare my file system to serve my ASP.NET applications (c:\inetpub\wwwroot\ for all you Windows natives).
I needed to provide a simple solution to publish ASP.NET applications from Visual Studio on my Windows 7 machine to my Ubuntu web server.
Finally I needed to restart apache2, publish a web application and test the fruits of my labor.
BASHing mono into shape
As I stated before, I wasn't going to apt-get install my way into the wonderful world of mono with all of the specific details that my target installation required. Luckily, I found this post http://www.integratedwebsystems.com/2011/02/mono-2-10-install-script-for-ubuntu-fedora/ in which someone created a BASH script that would download all of the specific packages and compile the sources to produce the exact environment that I was after. I'm sure if I had used a modern PC it wouldn't have taken so long, never the less, the compilation was quite a time consuming task indeed! The script was authored very well in that if there was an error detected, the script would break execution to make it easier for you to find what went wrong. Fortunately, my compilation completed without a hitch!
Enabling mod_mono in Apache
The BASH script had installed created the mod_mono.conf configuration file but I had to find it and copy it to the enabled modules directory so that Apache would recognize it.
Here is the command that I executed from a terminal to copy the file to the proper location
sudo cp mod_mono.conf /etc/apache2/mods-enabled
Of course I had to find the configuration file before I could copy it
sudo find -name mod_mono.conf
With the configuration file in place, I restarted Apache to make sure all was well
sudo service apache2 restart
The service restarted successfully so I felt OK with what had been done so far.
Creating the mono virtual host configuration file
There is a webiste that will require you to fill in some input fields and click a button to generate this file the virtual host configuration with mono specific settings. I merely had to modify one line of the file.
The website is http://go-mono.com/config-mod-mono/
I simply used localhost as my server name and it generated the physical path of /srv/www/localhost.
I used nano to edit the file and I modified the MonoDirectory line to point to the correct path of my mono_server4 binary's path which I was able to search and find to be /opt/mono-2.10/bin .
Creating wwwroot, or /svr/www ...
It was now time to prepare my file system to setup a home for my site hosting. This basically involved creating some folders, setting permissions and creating an alias link or two.
Create the directories
sudo mkdir /srv/www
sudo mkdir /srv/www/localhost
Assign a root group to the folder
sudo chown root:www-data /srv/www/localhost -R
Change the directory attributes
sudo chmod 775 /srv/www/localhost -R
I then moved the virtual host site generated file to the appropriate path
mv ~/Desktop/localhost.conf /etc/apache2/sites-available
I then created a symbol link so I could refer to the vhost configuration file with leading zeros (Apache loads the configurations alphabetically).
sudo ln -s ../sites-available/localhost.conf "000-localhost.conf"
I restarted Apache, fired up firefox, browsed http://localhost and that's all it took... I hope you enjoyed reading this article and I hope this helps someone configure ASP.NET MVC under Apache on Ubuntu using mono. Until next time.. ~/Buddy James
I've recently decided that I wanted to install linux on an older PC in my home. Many moons ago, before most linux distributions could auto detect and configure your hardware, I had cut my teeth on Debian. I've had a soft spot ever since for the aptitude package manager. Naturally I wanted to use a distro that was based on Debian so I went with Ubuntu. The Ubuntu CD that I have is dated (version 8.04) so I did some research and decided to upgrade to version 10.04. I fired up a terminal and executed 'sudo do-release-upgrade -d' to apply an upgrade to my system.
Watching LED dry
The upgrade was a pretty long process, and I found myself watching the terminal window as all of the packages were added, upgraded, and removed. As I watched, I noticed that quite to my surprise, there were many packages that relied on mono assemblies. As a .NET consultant, of course this had sparked my curiosity. I've followed the mono project, from a distance, for a while now but I knew that there was a following, however, I had no idea that mono had made it's way into the heart of the packages that make up an Ubuntu installation.
The current state of things
I've decided to take a 1,000 feet view of the current state of the mono project. As stated by the official website;
The easiest way to describe what Mono currently supports is:Everything in .NET 4.0 except WPF, EntityFramework and WF, limited WCF.
That's quite a lot of functionality! I had no idea that there had been so much work done on the project. I can write a .NET 4.0 application, an ASP.NET MVC 2 web application and host it on a linux based Apache server. Well at least that's what the website has told me.
Perhaps I'll try to accomplish just that and write about how smooth the whole process actually is.
Here are some links for those who are interested.
The official mono homepage
The mono project compatability
The mono migration analyzer MoMA
Design apps for your iPhone or iPad using monoTouch
Design apps for your android device using mono for android
I hope you found something of interest. Until next time..