Using DispatcherTimer To Create A Timer In WPF

09-03-2012 // http://pagead2.googlesyndication.com/pagead/show_ads.js WPF doesn’t have a straightforward Timer control that you can drag and drop from the Toolbox. However, ther’s still a straightforward easy way to implement this. You can use the provided System.Windows.Threading.DispatcherTimer class for this It’s easy as abc. Steps: 1 Create an instance System.Windows.Threading.DispatcherTimer TimerName = new System.Windows.Threading.DispatcherTimer() ; 2 CreateContinue reading “Using DispatcherTimer To Create A Timer In WPF”

Using TextEditSettings.DisplayFormat To Format Your Data In DevExpress DataGrid

07-03-2012 // http://pagead2.googlesyndication.com/pagead/show_ads.js Devexpress doesn’t provide much information about how you can use this to format your data when you use DevExpress DataGrid. I have a code to create and format a devexpress datagrid dynamically at run time. I had to automatically format date to match the British system if the current data is ofContinue reading “Using TextEditSettings.DisplayFormat To Format Your Data In DevExpress DataGrid”

How To Choose Between ItemsSource and DataContext

2012-02-24 // <![CDATA[ google_ad_client = "ca-pub-5478118713208336"; /* LeadIn */ google_ad_slot = “2638602320”; google_ad_width = 468; google_ad_height = 15; // ]]> http://pagead2.googlesyndication.com/pagead/show_ads.js I usually use ItemsSource property when I need to databind a control in WPF because it’s straightforward and the framework does everything for me. However, I came accross a situation where I had toContinue reading “How To Choose Between ItemsSource and DataContext”

How to use LIKE operator in Dataview.RowFilter for Date Time or Numaric Fields using CONVERT

2012-01-16 // http://pagead2.googlesyndication.com/pagead/show_ads.js The RowFilter property of the DataView allows to use flexible string similar to SQL or LINQ to easily filter rows wihtout having to iterate through them. I had to implement a fully flexible search module for a project I’m working on. The user had to be able to perform a string searchContinue reading “How to use LIKE operator in Dataview.RowFilter for Date Time or Numaric Fields using CONVERT”

How to auto save the data table in memory into database?

2010-04-01 We frequently get to fetch data from the database, update them and then write them back to the database. Most of the time we only have to write them back as individual records. How about updating a whole database table in the memory and having to synchronize all changes to the actual data table? My initial thoughtContinue reading “How to auto save the data table in memory into database?”

D LINQ : How to Map Columns Which Auto Generate Values At the Database

2009-05-11 http://pagead2.googlesyndication.com/pagead/show_ads.js I have being working on a software application made on .Net and recently my client asked me to use D LINQ instead of SQL. D LINQ has great benefits loaded! As I started working with DLINQ I started to know that preventing SQL injection is not a headache anymore and misspelled SQL queriesContinue reading “D LINQ : How to Map Columns Which Auto Generate Values At the Database”

C# ASP.NET – GridView : How to Use Checkbox in Gridview to Select Multiple Rows

2009-01-06 // http://pagead2.googlesyndication.com/pagead/show_ads.js I wanted to select multiple rows of the grid view using check boxes to select each row. In this post I will discus how and what I did to achieve this goal… I used a template column which holds a check box to select or de-select a row in the grid view.Continue reading “C# ASP.NET – GridView : How to Use Checkbox in Gridview to Select Multiple Rows”

ASP.NET – AutoPostBack : What is AutoPostBack and How AutoPostBack Works

2008-12-26 Today I was experimenting on a grid view where I was trying to select multiple rows of the grid view using a check box column. I wrote some code in the CheckedChanged of checkbox but then I found that the code was not executed when the state of the checkbox is changed. So IContinue reading “ASP.NET – AutoPostBack : What is AutoPostBack and How AutoPostBack Works”

C# ASP.NET – GridView : How to Keep Modified Data of Template Fields when Paging is Enabled?

2008-12-04 Today I had to take care of a problem of a certain company (CIS) that I consult. They had a problem of keeping the values modified in a template field of a gridview when the user moves from one page of the grid to another. Template fields allow us to add custom columns intoContinue reading “C# ASP.NET – GridView : How to Keep Modified Data of Template Fields when Paging is Enabled?”