Databinding SqlTypes

Introduction

Lets say we have an object, which wraps some data from the database. Eventually we want a collection of them displayed in a DataGrid or some other bindable component. For the purpose of this discussion, we will have a class that wraps a DataRow , and properties that wrap its cells.

The problem

This example may look all well and good, but unfortunately a cell can be null, and an int or DateTime cannot! Herein lies the problem. This code will throw exceptions on any null data, and we cannot assign null to the values. So we can use SqlTypes which allow null values.

by arthurmarsh (5 replies)

by kadammanali987 (23 replies)

by ravialen3782 (8 replies)

Published 6 years ago, running time 0h54m

Carl and Richard talk to Jeff Fritz about how ASP.NET has evolved over the years. Jeff talks about the continued dominance of web forms in relation to MVC and how the different libraries can be used together. In fact, there's ONE ASP.NET, and everything: web forms, MVC, Web API, SignalR, all work.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook