A home for developers who
love clean, working code

My name is Steve Gray, and the code on this site is the result of many years of developmental consulting. My path has been a little different from most developers I’ve met—I’ve never coded on a team. It’s always been just me, occasionally with one or two others. My work has focused on short 2, 4, or 8‑week engagements building modifications for Microsoft accounting systems. Those systems relied heavily on VBA behind the scenes, which is why I chose the VB route instead of C#.

I code in a very specific, repeatable way: data access is always SQL, using stored procedures, and I built my own data‑access scaffolding. I use the Telerik suite of controls for both WinForms and ASP.NET projects.

The jobs are never identical, but they rarely stray far from familiar patterns. Early on, I realized it would be far more efficient to maintain a library of reusable code as I moved from project to project—and this site is that library. I hope it helps.

Find code solutions by technology

Browse topics across .NET, SQL, web development, and more to quickly find practical solutions and real-world code examples that solve everyday developmental challenges.

Most Recent Articles

These are the last 10 or so places I've been. It's a fair indicator of what technology has my attention at the moment.
 

Introduction

Styling the Telerik ASP.NET RadComboBox can be frustrating because the control ships with deeply layered skins, sprite images, and browser-specific rules that override your CSS. If you’ve ever tried to set a simple background color only to have Telerik’s theme snap it back, you’re not alone. This article gives you a set of targeted CSS overrides that reliably control the ComboBox’s enabled and disabled states without breaking the rest of the skin. The goal is simple: predictable styling, clean overrides, and no more fighting with hidden gradients or opacity rules.

Overview

When a RadGrid is running in Batch Edit mode, the standard GridDropDownColumn often doesn’t behave correctly — especially when you need full control over how the dropdown is populated or when the editor must bind dynamically. To avoid those limitations, the most reliable approach is to switch to a GridTemplateColumn and embed a RadDropDownList inside the edit template.

Introduction

Cookies are one of the simplest ways to persist small pieces of data between requests in ASP.NET, yet they’re often misunderstood or implemented inconsistently. Whether you’re storing user preferences, tracking the last selected database, or managing lightweight session helpers, cookies give you a fast, reliable mechanism without involving server resources. This article walks through the essentials—how to set a cookie, how to read it safely, and how to delete it when it’s no longer needed—using clean, practical VB.NET examples you can drop directly into your application.

Making a Telerik RadGrid Button Column Sortable Using a Template Column

Sorting in Telerik’s ASP.NET AJAX RadGrid works smoothly—until you introduce a GridButtonColumn. Because button columns don’t bind directly to a data field, the grid has nothing concrete to sort on. The practical fix is to replace the button column with a GridTemplateColumn that looks and behaves like a button column, but sorts on a real field from your data source. It’s simple, predictable, and uses RadGrid’s built-in sorting pipeline.

The Telerik RadAutoCompleteBox uses an Entries collection to represent the items a user has selected. Understanding how Entries works is essential when binding data, loading saved values, or reacting to user selections during postbacks or AJAX requests.
 
Personally, I've only ever used it in 'single' entry mode, but it is pretty versatile and allows a lot more than that.
 
If you're not familiar with the RadAutoCompleteBox, go to the menu and read that article first. 
 
RadEditor started injecting unwanted <span> and font-size tags into my article text — usually after deleting and retyping. The styling blended in, so I didn’t notice at first, but once I did, it became impossible to ignore. Telerik support pointed me to a simple fix.
 
The issue wasn’t RadEditor itself — it was the browser inserting inline styles during editing, especially in Chrome/Edge.
When a RadGrid loads with grouped data, it often shows too much detail by default. If you want a cleaner first impression, you can collapse all groups on initial load with one simple event.
Telerik’s RadTextBox doesn’t show the EmptyMessage in italics when the control is both disabled and empty. If you rely on disabled fields to show placeholder-style hints, this creates a visual inconsistency. Here’s the simple workaround I use in production.


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences