Click here to Skip to main content
15,915,508 members
Home / Discussions / Database
   

Database

 
AnswerRe: StoredProcedures - which is fastest and why Pin
WoutL18-Mar-10 0:26
WoutL18-Mar-10 0:26 
GeneralRe: StoredProcedures - which is fastest and why Pin
alwinSCH18-Mar-10 0:50
alwinSCH18-Mar-10 0:50 
GeneralRe: StoredProcedures - which is fastest and why Pin
WoutL18-Mar-10 1:15
WoutL18-Mar-10 1:15 
GeneralRe: StoredProcedures - which is fastest and why Pin
Mycroft Holmes18-Mar-10 11:44
professionalMycroft Holmes18-Mar-10 11:44 
QuestionDataGridView problem with cell coloring [modified] Pin
Mattzimmerer17-Mar-10 15:54
Mattzimmerer17-Mar-10 15:54 
AnswerRe: DataGridView problem with cell coloring Pin
Luc Pattyn17-Mar-10 16:22
sitebuilderLuc Pattyn17-Mar-10 16:22 
GeneralRe: DataGridView problem with cell coloring Pin
Mattzimmerer17-Mar-10 18:58
Mattzimmerer17-Mar-10 18:58 
AnswerRe: DataGridView problem with cell coloring Pin
darkelv17-Mar-10 17:49
darkelv17-Mar-10 17:49 
You should check the value from the data source itself, not datagridview's cells. Subscribe to the datagridview's CellFormatting event, then in the handler get the DataBoundItem (object, datarow etc) and set color base on the DataBoundItem's data itself.

I'm binding to collection of object, btw, so YMMV.

private void dataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            string dataPropertyName = this.dataGridView.Columns[e.ColumnIndex].DataPropertyName;
            ObjectType theObject;
            switch (dataPropertyName)
            {
                case "ColumnName":
                    theObject = (ObjectType)this.dataGridView.Rows[e.RowIndex].DataBoundItem;

                    // Set the color base on theObject's property mapped to dataPropertyName
                    break;

            }

        }

AnswerRe: DataGridView problem with cell coloring Pin
Mattzimmerer18-Mar-10 9:41
Mattzimmerer18-Mar-10 9:41 
QuestionPrimary Indexed? Pin
Mike65432117-Mar-10 9:06
Mike65432117-Mar-10 9:06 
AnswerRe: Primary Indexed? [modified] Pin
i.j.russell17-Mar-10 9:39
i.j.russell17-Mar-10 9:39 
GeneralRe: Primary Indexed? Pin
Mike65432117-Mar-10 9:53
Mike65432117-Mar-10 9:53 
GeneralRe: Primary Indexed? Pin
Jörgen Andersson17-Mar-10 10:50
professionalJörgen Andersson17-Mar-10 10:50 
GeneralRe: Primary Indexed? Pin
i.j.russell17-Mar-10 11:14
i.j.russell17-Mar-10 11:14 
GeneralRe: Primary Indexed? Pin
Jörgen Andersson17-Mar-10 11:15
professionalJörgen Andersson17-Mar-10 11:15 
Questionnvarchar vs varchar Pin
Mike65432117-Mar-10 7:11
Mike65432117-Mar-10 7:11 
AnswerRe: nvarchar vs varchar Pin
Jörgen Andersson17-Mar-10 8:31
professionalJörgen Andersson17-Mar-10 8:31 
GeneralRe: nvarchar vs varchar Pin
Mike65432117-Mar-10 8:42
Mike65432117-Mar-10 8:42 
GeneralRe: nvarchar vs varchar Pin
Mycroft Holmes17-Mar-10 13:09
professionalMycroft Holmes17-Mar-10 13:09 
AnswerRe: nvarchar vs varchar Pin
carlecomm22-Mar-10 1:59
carlecomm22-Mar-10 1:59 
QuestionEncryption Store Procedures in Bulk in Mssql express 2008. Pin
r_mohd17-Mar-10 4:59
r_mohd17-Mar-10 4:59 
AnswerRe: Encryption Store Procedures in Bulk in Mssql express 2008. Pin
Mycroft Holmes17-Mar-10 13:07
professionalMycroft Holmes17-Mar-10 13:07 
GeneralRe: Encryption Store Procedures in Bulk in Mssql express 2008. Pin
r_mohd17-Mar-10 14:58
r_mohd17-Mar-10 14:58 
NewsCitability Codeathon - DC - April 9 - 11 2010 Pin
Microsoft Public Sector DPE17-Mar-10 4:37
Microsoft Public Sector DPE17-Mar-10 4:37 
GeneralRe: Citability Codeathon - DC - April 9 - 11 2010 Pin
Chris Meech17-Mar-10 5:18
Chris Meech17-Mar-10 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.