This category contains 3 posts

How to load large dataset in DataGridView

Today I came here to discuss a popular industrial issue with a work around, which hopefully, you will find useful. As the title depicts, we commonly have a large data set which needs to be display in DataGridView control and it is expected that the larger the dataset, the greater time it will take to … Continue reading

Best practice to check for DBNull using .Net:

When we retrieve data from database it is very important for to check for NULL values if writing a robust application. Here are following ways on how to accomplish this need: 1) Using System.Convert: There is a direct method available to Check for DBNull. Here is what you have to do: // Assuming that a … Continue reading

Format XML using VB.Net

While working with xml it is more meaningful to the user if xml could appear in a hierarchical manner which can increase understandability. For example the below sample is preferable from perspective of readability and understandability: <?xml version=”1.0″?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body> <name>abc</name> <message>Don’t forget me this weekend!</message> </body> </note> while this detracts the … Continue reading

For XML Path in .Net – Ups and Downs

INTRODUCTION: We often write ‘FOR XML PATH’ queries in SQL to get data in XML form. Also we can extract unlimited data from a table via XML queries. The problem I am going to discuss today is how to read FULL contents of “FOR XML Path” sql query. I will describe various techniques to retrieve … Continue reading

Clone Object Without ICloneable Implementation

Overview: It seems strange when we look at the title that usually experts suggest to clone an object through implementation of IClonable interface. But as I have experience, it is good until we do not have a smart and big application where dozen of relations already exists among the objects and you just need this … Continue reading

AutoComplete Textbox

Introduction: During the work on a project, i need to use a control having auto complete facility in it as user types then I realized that we can make use of the textbox control  or combobox control for this purpose. Both controls can be used to filter records as a drop down list to show … Continue reading

Populate DataGridViewCheckBoxColumn at Runtime

This article shows how to populate the CheckBoxColumn of the DataGridView at runtime from the database. This code demonstrate that a datasource has been bind to the datagridview and using the datagridview’s “DataPropertyName” to the checkbox column. It will automatically populate the column with the desired values. Here is the code: Dim dt As DataTable … Continue reading

Populate DataGridViewComboBoxColumn at Runtime

This will demonstrate how you can bind DataGridViewComboBoxColumn to your DataGridView and populate it. The way you can follow, is to create and add a DataGridViewComboBoxColumn in your datagridview and populate every combo Box with the values in an iterative manner. Here I have discussed two approaches: See the code, here Db2DataSet is filled before … Continue reading

Remove first line from multiline Texboxes

Hi! We have dozens of methods to solve this issue but here is one line approach as I provided: http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/40d252ee-6506-4e52-9320-d1b266c5e573/ Regards, Shahan Ayyub