Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
QuestionExecute query in server Pin
Abdul Rahman Hamidy5-Jun-09 21:44
Abdul Rahman Hamidy5-Jun-09 21:44 
QuestionSerializing objects in c# Pin
alonchap5-Jun-09 21:44
alonchap5-Jun-09 21:44 
AnswerRe: Serializing objects in c# Pin
Christian Graus5-Jun-09 21:55
protectorChristian Graus5-Jun-09 21:55 
GeneralRe: Serializing objects in c# Pin
alonchap5-Jun-09 22:21
alonchap5-Jun-09 22:21 
GeneralRe: Serializing objects in c# Pin
Christian Graus5-Jun-09 22:52
protectorChristian Graus5-Jun-09 22:52 
GeneralRe: Serializing objects in c# Pin
alonchap5-Jun-09 23:00
alonchap5-Jun-09 23:00 
GeneralRe: Serializing objects in c# Pin
Christian Graus5-Jun-09 23:35
protectorChristian Graus5-Jun-09 23:35 
GeneralRe: Serializing objects in c# [modified] Pin
alonchap6-Jun-09 7:09
alonchap6-Jun-09 7:09 
QuestionC# and C++ Win32 Console app Interop Pin
indikat5-Jun-09 21:18
indikat5-Jun-09 21:18 
AnswerRe: C# and C++ Win32 Console app Interop Pin
Garth J Lancaster5-Jun-09 21:37
professionalGarth J Lancaster5-Jun-09 21:37 
GeneralRe: C# and C++ Win32 Console app Interop Pin
indikat6-Jun-09 1:04
indikat6-Jun-09 1:04 
GeneralRe: C# and C++ Win32 Console app Interop Pin
Garth J Lancaster6-Jun-09 14:59
professionalGarth J Lancaster6-Jun-09 14:59 
GeneralRe: C# and C++ Win32 Console app Interop Pin
indikat6-Jun-09 18:56
indikat6-Jun-09 18:56 
GeneralRe: C# and C++ Win32 Console app Interop Pin
Garth J Lancaster6-Jun-09 19:56
professionalGarth J Lancaster6-Jun-09 19:56 
GeneralRe: C# and C++ Win32 Console app Interop Pin
indikat7-Jun-09 5:01
indikat7-Jun-09 5:01 
Questionnews management system Pin
harispa5-Jun-09 21:06
harispa5-Jun-09 21:06 
AnswerRe: news management system Pin
Christian Graus5-Jun-09 21:55
protectorChristian Graus5-Jun-09 21:55 
QuestionAdding datagridview columns Pin
michaelgr15-Jun-09 20:27
michaelgr15-Jun-09 20:27 
AnswerRe: Adding datagridview columns Pin
MickCurley5-Jun-09 21:28
MickCurley5-Jun-09 21:28 
GeneralRe: Adding datagridview columns Pin
michaelgr15-Jun-09 21:31
michaelgr15-Jun-09 21:31 
GeneralRe: Adding datagridview columns Pin
MickCurley5-Jun-09 21:39
MickCurley5-Jun-09 21:39 
GeneralRe: Adding datagridview columns Pin
michaelgr15-Jun-09 21:45
michaelgr15-Jun-09 21:45 
I have an empty datagridview (without columns declared- in the wizard of the datagridview).
The user choses which columns he wants to see from the database (using a listbox that i save the items in an array).
I want to add columns to the datagridview from this array (that was created from the listbox). The problem is that i need them to be bound to that datatable.
So i do in the foreach loop

datagridview.Columns.Add(s, s);

it creates me the columns right but they are not filled with data from the database.

If i do:
datagridviewcolumn col=new datagridviewtextboxcolumn();
col.headertext="abc";
col.datapropertyname="abc";
col.name="abc";

It does creates me the column and filles it with data.
But i need to do it in a loop that will go through all the items in the array (from the listbox) and add this columns
But i can use the same name to the datagridviewcolumn (datagridviewcolumn col=new datagridviewtextboxcolumn();), Because if i do it it says i already have this column (even if i change it's name in the loop)
GeneralRe: Adding datagridview columns Pin
michaelgr15-Jun-09 21:49
michaelgr15-Jun-09 21:49 
GeneralRe: Adding datagridview columns Pin
MickCurley5-Jun-09 21:54
MickCurley5-Jun-09 21:54 
Questionmaking a scanner .. it skips alphanumerics.. where am i going wrong?? Pin
canatan5-Jun-09 18:14
canatan5-Jun-09 18:14 

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.