Click here to Skip to main content
15,924,679 members
Home / Discussions / C#
   

C#

 
QuestionGenerating mouse clicks on desktop Pin
shunnyboy18-Feb-06 11:30
shunnyboy18-Feb-06 11:30 
AnswerRe: Generating mouse clicks on desktop Pin
shamsallana18-Mar-06 11:15
shamsallana18-Mar-06 11:15 
Question[VS 2005] Show a context menu by left click a button Pin
Susuko18-Feb-06 10:46
Susuko18-Feb-06 10:46 
AnswerRe: [VS 2005] Show a context menu by left click a button Pin
BambooMoon18-Feb-06 11:20
BambooMoon18-Feb-06 11:20 
GeneralRe: [VS 2005] Show a context menu by left click a button Pin
Susuko18-Feb-06 12:05
Susuko18-Feb-06 12:05 
GeneralRe: [VS 2005] Show a context menu by left click a button Pin
BambooMoon18-Feb-06 13:04
BambooMoon18-Feb-06 13:04 
GeneralRe: [VS 2005] Show a context menu by left click a button Pin
Susuko19-Feb-06 0:35
Susuko19-Feb-06 0:35 
QuestionDataGridView / DataGrid help needed Pin
BambooMoon18-Feb-06 9:51
BambooMoon18-Feb-06 9:51 
I have a program that displays data in a DataGridView in C# (but if you are only familiar with the DataGrid, please read on because any advice you have will still be applicable). The DataGridView is bound to a SQL Server table with a typed DataSet. I need to do a few things that I'm having difficulty with, and I'm hoping someone can point me in the right direction.

1) Some columns of the database table contain numbers, like 0, 1, 2, that represent things. For example, in one column, 0 and 1 in the database table should be shown as false and true in the DataGridView. In another case, a small range of numbers in the database table should be represented as a corresponding value from a list of strings. In the DataGridView, these columns are combo box columns that are NOT bound to any data source (I enumerate the possible combo box values when I create the DataGridView). Currently they contain the numbers from the database. How can I get them to contain the corresponding strings? I tried using the CellFormatting and CellParsing events, but they don't work properly due to the many DataError events caused by changing the cell values from short or int (as in the database table column) to string (as in FALSE/TRUE). Are the ValueMember and DisplayMember attributes of the column of any value to me? Do I have to create an unbound column? If so, how do I keep that column sorted as the user sorts the bound columns in the DataGridView?

2) One combo box column of the table gets its combo values loaded from the keys of another table (not bound to it, but I do it manually). But if my table has "foobar" in a column and the keys from the other table that get loaded into the combo box include "FOOBAR" (upper case), I get a data error event. Is there some way to make it case insensitive?

Thanks for any help.

-- modified at 17:24 Saturday 18th February, 2006
Questionface detection Pin
haytham_mohammad18-Feb-06 9:19
haytham_mohammad18-Feb-06 9:19 
AnswerRe: face detection Pin
Colin Angus Mackay18-Feb-06 13:40
Colin Angus Mackay18-Feb-06 13:40 
GeneralRe: face detection Pin
haytham_mohammad18-Feb-06 13:49
haytham_mohammad18-Feb-06 13:49 
GeneralRe: face detection Pin
Colin Angus Mackay18-Feb-06 13:52
Colin Angus Mackay18-Feb-06 13:52 
QuestionCurrent Item in ListBox Pin
mostafa_h18-Feb-06 8:17
mostafa_h18-Feb-06 8:17 
GeneralRe: Current Item in ListBox Pin
Koushik Biswas18-Feb-06 13:15
Koushik Biswas18-Feb-06 13:15 
GeneralRe: Current Item in ListBox Pin
mostafa_h19-Feb-06 4:37
mostafa_h19-Feb-06 4:37 
QuestionMDI Client Window Pin
Kamrul Hasan18-Feb-06 8:03
Kamrul Hasan18-Feb-06 8:03 
QuestionHow do I: Show one applications graphical output inside another application? Pin
Red_Wizard_Shot_The_Food18-Feb-06 7:59
Red_Wizard_Shot_The_Food18-Feb-06 7:59 
AnswerRe: How do I: Show one applications graphical output inside another application? Pin
S. Senthil Kumar18-Feb-06 8:13
S. Senthil Kumar18-Feb-06 8:13 
GeneralRe: How do I: Show one applications graphical output inside another application? Pin
Red_Wizard_Shot_The_Food18-Feb-06 8:16
Red_Wizard_Shot_The_Food18-Feb-06 8:16 
AnswerRe: How do I: Show one applications graphical output inside another application? Pin
BambooMoon18-Feb-06 11:22
BambooMoon18-Feb-06 11:22 
AnswerRe: How do I: Show one applications graphical output inside another application? Pin
Dave Kreskowiak19-Feb-06 7:59
mveDave Kreskowiak19-Feb-06 7:59 
Questionimporting pictures Pin
Vineet Rajan18-Feb-06 6:42
Vineet Rajan18-Feb-06 6:42 
AnswerRe: importing pictures Pin
Colin Angus Mackay18-Feb-06 13:44
Colin Angus Mackay18-Feb-06 13:44 
Questionimporting media Pin
Vineet Rajan18-Feb-06 6:39
Vineet Rajan18-Feb-06 6:39 
QuestionASync Callbacks Server->Client Pin
FreeClimber18-Feb-06 5:43
FreeClimber18-Feb-06 5:43 

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.