Wednesday, September 28, 2016

RadGrid NoRecordsTemplate Not Showing

Add a NoRecordsTemplate setting to the MasterTableView of your Telerik RadGrid to provide an informative display when your grid DataSource has no records.
The NoRecordsTemplate will only show when your grid DataSource indicates there are no records.

I prefer to initialize the grid DataSource to empty at the start of the NeedDataSource event handler and replace the DataSource value if data is available for the grid.

For example, I use the following line to set myGrid DataSource to indicate no records.
     myGrid.DataSource = new object[0]{};

Contact Blue Canyon Software if you need custom software development for your business.

Thursday, May 5, 2016

Performance Tuning for ASP.NET

Found a good article at  with lots of suggestions for improving performance of an ASP.NET web site.      Click this link to see the article. 

Visit if your business needs custom software development.

Tuesday, March 29, 2016

Case Insensitive SQL Search for Missing Values in Another Table


You need to compare two tables to find values in one table that are missing in the other table.   SQL server default is case insensitive so if "Dog" is in table A and "DOG" is in table B there is a match.    


You need to set the COLLATE value to get your desired result of a case sensitive comparison. 

We will compare two tables,  The graniteRequested table has a 'Color' column.  The colorGranite table has a 'color' column.   

This SQL query will look for colors that are in the graniteRequested table but not in the colorGranite table. 

  FROM graniteRequested gR
  WHERE gR.Color NOT IN 
  (SELECT colorGranite.color   Collate SQL_Latin1_General_CP1_CS_AS   FROM colorGranite)

 Collate SQL_Latin1_General_CP1_CS_AS   makes this a case sensitive search. 

Visit if you need custom software development for your business.

Tuesday, February 2, 2016

List SQL Server Database Tables and Columns

Query for Showing All Tables and Columns in Your Database

Do you need a list of all the tables in your database and their columns?

Use SQL Server Management Studio to connect to your database.   Execute this query, substituting your database name in the USE statement.

SELECT OBJECT_SCHEMA_NAME(T.[object_id],DB_ID()) AS [Schema],
        T.[name] AS [table_name], AC.[name] AS [column_name],
        TY.[name] AS system_data_type, AC.[max_length],
        AC.[precision], AC.[scale], AC.[is_nullable], AC.[is_ansi_padded]
FROM sys.[tables] AS T
  INNER JOIN sys.[all_columns] AC ON T.[object_id] = AC.[object_id]
 INNER JOIN sys.[types] TY ON AC.[system_type_id] = TY.[system_type_id] AND AC.[user_type_id] = TY.[user_type_id]
WHERE T.[is_ms_shipped] = 0
ORDER BY T.[name], AC.[column_id]

Right-click on the query results grid and select "Save Results As..."
Choose the .csv file format so you can open the file in Excel.

Visit if you need custom software development for your business.

Wednesday, December 23, 2015

Copy SQL Server Database

  • Create a backup on the source SQL Server
  • Copy the .bak file to the destination computer.
  • Note the file name and location of the .bak file on the destination computer.
  • Execute this SQL Query in the destination computer
    • RESTORE DATABASE <YourDatabase> 
      FROM DISK='<the path to your backup file>\<YourDatabase>.bak'

Visit Blue Canyon Software if you need custom software for your business.

Tuesday, December 1, 2015

Best Practices for Sharing Facebook Posts to Your Website

Facebook uses meta tags in your website to manage posts that link to your website.   Visit Sharing Best Practices for Websites and Mobile Apps to learn more.

Visit Facebook Object Debugger to evaluate your website.

Visit Blue Canyon Software if you need custom software development for your business. 

Thursday, October 1, 2015

Setting Focus for Barcode Scan Input


Barcode scanners read barcode data and "write" the data into an area waiting to receive the data.  You could open Notepad and scan a barcode right into notepad.    On a web site, we need a textbox or other input control to receive the scanned data.

We could force our users to physically click a text box before scanning but it is normally better to have the input control selected by the software  so the user can scan without repeatedly clicking an input control.

The Solution Seems Obvious Unless Your Using IE9

A couple of solutions seem to be obvious choices.   
  1. Call the Focus() function on the input control in the OnPreRender event handle. 
  2. Call the Focus() function on the input control using JavaScript in the window onload() event.

Neither one of these solutions work on the page_load() when the input control is AJAX enabled. The window onload() event is raised before AJAX enabled controls are intialized. 

And the Answer Is ...Sys.Application.add_load()

We need to find a place to set the focus after ALL controls have been created and initialized.   We need this event to be raised after every AJAX call as well.   Add this code in a <script></script> section in your .ASPX page 


function  applicationLoadHandler() {
           // Call function to set focus on the scanning input control.             


Visit if you need custom software for your business.