Below are some code snippets that I have prepared initially, if you do not find one that you are looking for, just [ drop me an E-mail ] or just a comment below would suffice. Also please note that a demo illustrated in SQL server should also work with MySQL & vice-versa.
|Populate gridview programmatically using MySQL||Loading the gridview programmatically using C# from database||zip|
|Gridview with a drop-down filter in the header||Filter your gridview with a drop down in the table header||zip|
|Adding controls on the fly in GridView||(Esp. with custom user control,) add hyper-link check-boxes dynamically||zip|
|Paging & Sorting in Gridview||Programmatically handle paging and sorting events of gridview||zip|
|Insert/Update/Delete||using Button field of the DataGridView(Accessing the cell values of the row containing the button clicked) if you want to retrieve the cell values of the row after the button from that row has clicked and to fire database queries||zip|
|Export Gridview to …||MS ACCESS / MS EXCEL / CSV||zip|
|Combobox hard-coded values & Database records to gather||Loading a combobox, with static items as well as items from database||zip|
|Sending plain text E-mail message from web app to Gmail||You can specify from, password, to, subject and message to send an email||zip|
|Caching 1||Simple Page Level Caching||zip|
|Caching 2||Caching SQL Server Caching for certain amount of time||zip|
|Caching 3||SQLServer Automated Caching and Updating Cached version at Regular Intervals and upon Create/Update/Delete operations||zip|
|Caching 4||Partial Page Caching, Multiple & Multi-Level Page caching and … Clearing the cache||zip|
|Shortening GUID||Sometimes we want to get the shortest GUID for building URLs or for dynamic file names, So I created a slight variant of GUID||zip|
|Parsing Uri (Query Params)||When one has the URL of the page from which QueryParams are wanted but can not use Request.QueryString (when the URL is not of current page, stored in a object in a memory etc)||zip|
|Nested GridViews||A basic example of how a grid can become a part of data row of some master table (master – grid )||zip|
|Nested GridViews + Conditional Formatting||Apply conditional formatting to your nested grid||zip|
|Filter DataGrid w/ LINQ||An example demonstrating how LINQ can be used to filter out the data from the Data Grid||zip|
|Nested GridVeiw||A gridview inside a gridview||zip|
|Nested Gridview||Nested Expandable & Collapsible Gridview (Same Row)||zip|
|Nested Gridview||Nested Expandable & Collapsible Gridview (Next Row)||zip|
|Signal R||Move Shape + Group Discussion / Chat + etc …||zip|
|G.Drive Spreadsheets||Access Google-SpreadSheet Via Gdata And C#||zip|
|Parameter Parsing||Parsing parameters from query string||zip|
|Short GUID||Get Short (& sweet) : unique strings, unique, not random chars as random may not be unique||zip|
|String Float Double InterConversion||zip|
|2D Array To-String And Vice-Versa||zip|
|Async GridView (Take # 1)||Loading the data for the gridview asynchronously from database
|CSV to Gridview||A sample web app demonstrating how to load gridview from multiple CSV dynamically (one at a time)||zip|
|Crystal Report : Dynamic Binding||Conditional Data-binding from multiple tables, after the report has been loaded||zip|
I am going to share all the code snippets that I have. At the moment, this page is being updated, every, single, day. You can download most of the archives from here, at once.
a console application [View]
mainly as simple web projects [View]
Most posts in this section would be describing Windows Phone, Applications
Muttitasking is a myth, The only type of multi tasking I know is to think about a problem and then to sleep ! Many of the times I hear people talking, “I can multi task” well most of the times it actually is not it, but just “task switching”. You know it probably is 3:30 pm and you’re so deep and concentrated on your task, coding, designing, reading, planning whatever may it be, and then all of a sudden your phone rings, if you notice carefully, you’re dumping the thought process of your current task and answering the call, ( chances are less that you’d continue “multi tasking” and you’d be doing both them well ! ) What could you’ve done ? You could’ve probably asked your phone to keep mum !
The way I start my day is I ask my self what N ( = 3 ) things I want to accomplish today ? Then visualize those things getting accomplished, just imagine, how good would I feel if these N things get done today. Then what I do ? Continue reading →
- Weather you hire a CEO, CFO or a developer. Ask the new hire to work with line of business for 3 weeks and 3 weeks for technical and application support teams.
- Review and control what line of business’ priorities, and verify. This is the world where everyone has their hidden agenda.
- Rotating leadership, responsibilities etc., at least once a year. Let the dictators in the organization know what they are, and kill hypocrisy.
- Always encourage craftsmanship, and hire people smarter then you.
- Stay in touch with lowest level of people (have one-o-one with them), realize the facts, communication is oxygen. Pyramid styled organization is just like playing the telephone game (aka Chinese whispers). Higher job grade is just for a bigger paycheck. Any employer must have time to save their company from becoming a toxic workplace. Engage and appreciate the people who actually do the work, not just the managers.
- Evaluate performance evaluation matrices.
- Always try to find out the diversity of the professional talent at your disposal. You’ll have employees who live like a frog in the well and want to stay in their comfort zone, but they know their well like no other, and you’d also have employees with widespread experience, you need both Continue reading →
The Year 2000 problem is understood by most people these days because of the large amount of media attention it received.
Most programs written in the C programming language are relatively immune to the Y2K problem, but suffer instead from the Year 2038 problem. This problem arises because most C programs use a library of routines called the standard time library . This library establishes a standard 4-byte format for the storage of time values, and also provides a number of functions for converting, displaying and calculating time values. Continue reading →
GNU/Linux comes in many different flavours, apart from the fact that each individual distro has a new release almost every six months, if not less. I have a habit of trying out every new version the moment it comes out, and I’m sure many of you do too.
Now, let’s assume you have downloaded a new version of a distro and are in the mood to try it out right away. It’s past midnight and you realise that you’ve run out of blank CDs/DVDs. So you will have to wait till the morning when the shops open, to be able to burn the distro image in order to install it. I’m sure a lot of us often face this problem. In this article I’ll share a simple trick by which you can install the new distro without burning it to a CD/DVD. The only requirement is that you Continue reading →