Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
GeneralRe: cross thread Pin
DaveyM6928-Feb-10 7:48
professionalDaveyM6928-Feb-10 7:48 
AnswerRe: cross thread Pin
Luc Pattyn28-Feb-10 8:50
sitebuilderLuc Pattyn28-Feb-10 8:50 
GeneralRe: cross thread Pin
Yustme28-Feb-10 12:10
Yustme28-Feb-10 12:10 
QuestionA List Of Values component or user control! Pin
Hussam Fattahi28-Feb-10 4:54
Hussam Fattahi28-Feb-10 4:54 
AnswerRe: A List Of Values component or user control! Pin
Abhinav S28-Feb-10 5:57
Abhinav S28-Feb-10 5:57 
AnswerRe: A List Of Values component or user control! Pin
Dan Mos28-Feb-10 7:05
Dan Mos28-Feb-10 7:05 
QuestionGetting the column items in a datagrid Pin
Wamuti28-Feb-10 2:40
Wamuti28-Feb-10 2:40 
AnswerRe: Getting the column items in a datagrid [modified] Pin
Dan Mos28-Feb-10 3:11
Dan Mos28-Feb-10 3:11 
If you need [Edit] to process [/Edit] them(the datas) in memory I would go for a List<YourClass> myList
and then set the datagrid.DataSource = myList;
Somethin like:

C#
//gets the data
public ... GetDatas(){
 cmd.CommandText = "SELECT * FROM XYZ";//or "EXEC SomeProcedure" or....;
 SQLDataReader dr = cmd.ExecuteReader();
 MyClass curr = null;
 List<MyClass> lst = new List<MyClass>;
 while(dr.Read()){
   curr = new MyClass();
   curr.Myprop1 = dr.GetString(0);//or GetWhatever
   ...
   lst.Add(curr);
 }
 ...
 return lst;
}

//and outside, somewhere in your UI
var myList = GetDatas();
dataGridView1.DataSource = myList


Now you have the List and you can LINQ or whatever;
modified on Sunday, February 28, 2010 11:35 AM

AnswerRe: Getting the column items in a datagrid Pin
Mycroft Holmes28-Feb-10 3:50
professionalMycroft Holmes28-Feb-10 3:50 
AnswerRe: Getting the column items in a datagrid Pin
DX Roster4-Mar-10 18:56
DX Roster4-Mar-10 18:56 
QuestionSliding panels Pin
Wamuti27-Feb-10 23:35
Wamuti27-Feb-10 23:35 
AnswerRe: Sliding panels Pin
Luc Pattyn27-Feb-10 23:41
sitebuilderLuc Pattyn27-Feb-10 23:41 
AnswerRe: Sliding panels Pin
Wamuti27-Feb-10 23:49
Wamuti27-Feb-10 23:49 
GeneralRe: Sliding panels Pin
OriginalGriff28-Feb-10 0:26
mveOriginalGriff28-Feb-10 0:26 
AnswerMessage Closed Pin
28-Feb-10 1:01
stancrm28-Feb-10 1:01 
GeneralRe: Sliding panels Pin
Wamuti28-Feb-10 1:18
Wamuti28-Feb-10 1:18 
QuestioncheckedListBox problem Pin
Gali197827-Feb-10 20:23
Gali197827-Feb-10 20:23 
AnswerRe: checkedListBox problem Pin
Khaniya27-Feb-10 22:07
professionalKhaniya27-Feb-10 22:07 
AnswerRe: checkedListBox problem Pin
DX Roster4-Mar-10 18:52
DX Roster4-Mar-10 18:52 
QuestionwebBrowser and webRequest work in IDE but not from desktop [modified] Pin
BarnabyByrne27-Feb-10 13:34
BarnabyByrne27-Feb-10 13:34 
AnswerRe: webBrowser and webRequest work in IDE but not from desktop Pin
Luc Pattyn27-Feb-10 13:53
sitebuilderLuc Pattyn27-Feb-10 13:53 
GeneralRe: webBrowser and webRequest work in IDE but not from desktop [modified] Pin
BarnabyByrne27-Feb-10 14:21
BarnabyByrne27-Feb-10 14:21 
GeneralRe: webBrowser and webRequest work in IDE but not from desktop Pin
BarnabyByrne27-Feb-10 16:32
BarnabyByrne27-Feb-10 16:32 
QuestionDeturmining when a html form has been submitted [modified] Pin
tyjnfghnfgsdf27-Feb-10 10:13
tyjnfghnfgsdf27-Feb-10 10:13 
Questionstores files for my project Pin
jogisarge27-Feb-10 9:05
jogisarge27-Feb-10 9:05 

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.