Experience in C++, C#, Java and Process : Living in Montreal

* What is my technical experience as a software developer

* What I have learned in the software business

* Where I am heading to in my career

* How to process in a project

Thursday, May 19, 2005

Change color of one cell in the DataGrid control ( C#)


The DataGrid provides a plethora of properties that can be set to specify the DataGrid's formatting. For example, you can have each consecutive row of a DataGrid alternate between two different colors merely by setting the DataGrid's AlternatingItemStyle's BackColor property.
While the AlternatingItemStyle is a great way to apply different formatting for every other DataGrid row, oftentimes developers want to perform conditional formatting based on the value(s) of a DataGrid row. For example, imagine a DataGrid that displays a list of products, including the product's name and price. Perhaps you want to draw the user's attention to products that are at "bargain-basement" prices. Namely, if a product has a price less than, say, $10.00, you want to have that row highlighted.
This can be accomplished by providing an event handler for the DataGrid's ItemDataBound event. The ItemDataBound fires once for each DataGridItem added to the DataGrid (that is, it fires once for each row that is added to the DataGrid). Essentially, what we need to do is in this event handler, check to see if the price is below the threshold ($10.00, or whatever lower bound you choose). If it is, then we want to set the DataGridItem's BackColor property to Yellow, thereby highlighting the row.

Monday, May 16, 2005

Setup with Serial Key required

SerialNumberTemplate Property


# Requires a digit that will not be included in the validation algorithm.
% Requires a digit that will be included in the validation algorithm.
? Requires an alphanumeric character that will not be included in the validation algorithm

Sunday, May 15, 2005

DataSet Form Problems ( As always)

- When I used the Data Set Form Wizard in VS.NET 2003 to generate a dataset form, I got the error: "there were errors configuring the data adapter". My god, it happens again. I spent 1 hour to repeat the whole procedure and I spent 3o minutes on Internet to find out how other people say about it.

Finally I recalled the problem happend before:

- If a column name in the Access database is special (I am not clear how special it could be), it will have this problem.
So I check the column name, find one is called Symbol, which looks special. I changed it to ProductSymbol, Great! the dataset form wizard worked.

Saturday, May 07, 2005

Good about Manifest