Showing posts with label web development. Show all posts
Showing posts with label web development. Show all posts

Tuesday, May 18, 2010

C#.Net: Dynamic Gridview Header from Resource

Here is something helpful for you guys. I modified the solution that I found on the web since what I found used a different method of setting the column headers. Here is the scenario:

You have a Gridview which is populated dynamically by databinding it to a dataset and you have a resource file (we will call it fielders) which consists of the list of field names used in the dataset. The question is how you can related them to each other? Here are the steps:

Select your Gridview and look for the event RowDataBound and double click on it.
Type the following code.

if (e.Row.RowType == DataControlRowType.Header)
{
     foreach (Tablecell tc in e.Row.Cells)
     {
          tc.Text = Resources.fielders.ResourceManager.GetString(tc.Text);     }

}

Hope this helped you guys. Remeber to put this code in your Gridview's RowDataBound.

Monday, May 10, 2010

Visual C#.Net: Optional Parameters

I've been developing desktop applications in VB6 before and been using the OPTIONAL class where a parameter is not totally required in your function. However, upon developing applications in Visual C#.Net, I didn't find that option. After googling around I found out that you can also do optional parameters on your function. Here is how you can do it.

in the declarations, add this:

using System.Runtime.InteropServices;

After doing it, you may be able to use Optional class like how I used it below;

public string WhatsUp (string UrMessage, [Optional] string Name)
{
     if (Name != "")
     {
          return UrMessage + ", " + Name;
     }
     else
     {
          return UrMessage;
     }
}


Enjoy developing applications people.

Saturday, October 17, 2009

To CSS or Not to CSS?

I am developing websites for a long time but I never really knew CSS that much. I know CSS and how I can do it, I've actually made some but my knowledge is only up to it's crust, but going deeper is a different thing so I've tried looking for an example. I was staring at the codes when I finally realized that I don't understand some of it and how and what it does.

I saw some great samples like the one making sub-menus and horizontal menu, vertical menu, etc.. and I was mesmerized to its capability. So now, I am compelled to study CSS - I hope I can comprehend. Wish me luck guys. By the way, I found some interesting sites that has truly great samples.

Dynamic Drive - feast your eyes upon CSS heaven.

I'll share more once I stumble into something great.

Some Great Finds!

Finders creepers! I found some pretty interesting tools for all Joomla fanatics out there. I'll try to update this article once in a while.

For Joomla Users
Multiple Adsense Account - I tried looking for this option in the official Joomla Forum but I was disappointed to find a commercial product which is sold for $10. Okay, before you find me cheap, I was about to purchase it but I tried my luck with Google and look for the keywords "revenue sharing adsense joomla" and found a FREE solution - kaching!. Why settle for a cheap solution when you can have it for FREE haha!. Thanks Justin Cook, you can download it at his site - CLICK ME!

COOL Comments - Now, here is a cool way to let users interact with every article you post in your Joomla site. BUT it comes with a price - BANG!. Price is $19.99 for standard and for Pro, a banging $34.99. THE COOL DEMO! - I won't be needing this for now - I think forever. I don't see and feel my need for such thing, I just found it CUTE and COOL.

Simple Image Gallery - Here is another cool and FREE plugin for you. CHECK THE DEMO. To download, just go to their site, don't wanna hog the traffic. You'll find some other usefull and FREE stuffs on their site. Grab it while it's hot - grab it while it's FREE! Why do I emphasize FREE so much, coz it's FREE! It's from JOOMLAWORKS.


Simple Image Rotator - Here is another one from JOOMLAWORKS. Makes your frontpage look like a professional news portal. CHECK THE DEMO. Again, it's FREE!

ALLVideos -Are you a Youtube fanatic or likes to post videos. You might want this stuff, it is from JOOMLAWORKS as well. Ah JOOMLAWORKS, makes your dreams come true. It's also FREE by the way. Just go to the site for demo, I'm tired of copying and pasting of urls.

That's it for now. Thanks for the visit.

Please check out my other sites:
Baul ni Noel - a chestful of original articles by me, just a warning - I am not a professional - am just an inspired and aspiring artist.