Click here to Skip to main content
15,895,462 members
Home / Discussions / C#
   

C#

 
Questionhow to detect which encoding a file is already saved as Pin
califgal6-Jan-10 14:25
califgal6-Jan-10 14:25 
AnswerRe: how to detect which encoding a file is already saved as Pin
Luc Pattyn6-Jan-10 15:04
sitebuilderLuc Pattyn6-Jan-10 15:04 
AnswerRe: how to detect which encoding a file is already saved as Pin
carlecomm6-Jan-10 19:10
carlecomm6-Jan-10 19:10 
QuestionRe: how to detect which encoding a file is already saved as Pin
califgal8-Jan-10 7:47
califgal8-Jan-10 7:47 
QuestionProblem with the DataGrid Control Pin
Doltsche6-Jan-10 9:51
Doltsche6-Jan-10 9:51 
AnswerRe: Problem with the DataGrid Control Pin
Saksida Bojan6-Jan-10 10:00
Saksida Bojan6-Jan-10 10:00 
GeneralRe: Problem with the DataGrid Control Pin
Doltsche6-Jan-10 11:01
Doltsche6-Jan-10 11:01 
GeneralRe: Problem with the DataGrid Control Pin
Saksida Bojan6-Jan-10 19:28
Saksida Bojan6-Jan-10 19:28 
I do not know whay this problems occour.


Doltsche wrote:
But the DataGrid is still not shown

You mean data in DataGrid is not shown or DataGrid itself doesn't show?

In your code you forgot to use DataMember beside DataSource. Here is mine example and it worked. I didn't use MS Sql as i do not have installed. I usaly use MySQL.

DataSet ds = new DataSet();
DataTable dt = new DataTable();
dt.TableName = "Boo";
dt.Columns.Add("Test");
dt.Columns.Add("Failed");
dt.Rows.Add(new Object[]{"Wil it work?","Hahaha, I lost my Mind"});
ds.Tables.Add(dt);

dataGridView1.DataSource = ds;
dataGridView1.DataMember = "Boo";


Look at the last line. That line is missing from your code. Have you tried using another test project using designer and auto generated code? I do not know witch tutorial recomend MS accsess as database, but that is the last thing on the list that I would reccomend. MS accsess is great for a Local database as long there is only one connection to it.
QuestionException when trying to write in a open Excel file Pin
Priya Prk6-Jan-10 9:03
Priya Prk6-Jan-10 9:03 
AnswerRe: Exception when trying to write in a open Excel file Pin
EliottA6-Jan-10 9:08
EliottA6-Jan-10 9:08 
AnswerRe: Exception when trying to write in a open Excel file Pin
Saksida Bojan6-Jan-10 10:06
Saksida Bojan6-Jan-10 10:06 
AnswerRe: Exception when trying to write in a open Excel file Pin
Dave Kreskowiak6-Jan-10 10:22
mveDave Kreskowiak6-Jan-10 10:22 
QuestionHow use sdf Pin
SajjadZare6-Jan-10 8:51
SajjadZare6-Jan-10 8:51 
AnswerRe: How use sdf Pin
Dimitri Witkowski6-Jan-10 8:55
Dimitri Witkowski6-Jan-10 8:55 
GeneralRe: How use sdf Pin
SajjadZare6-Jan-10 16:53
SajjadZare6-Jan-10 16:53 
GeneralRe: How use sdf Pin
Dimitri Witkowski6-Jan-10 22:12
Dimitri Witkowski6-Jan-10 22:12 
QuestionSubscribing to System Events Pin
bovus6-Jan-10 5:26
bovus6-Jan-10 5:26 
AnswerRe: Subscribing to System Events Pin
bovus6-Jan-10 5:39
bovus6-Jan-10 5:39 
Questioncomponent for datagridview Pin
SajjadZare6-Jan-10 5:14
SajjadZare6-Jan-10 5:14 
AnswerRe: component for datagridview Pin
dan!sh 6-Jan-10 5:34
professional dan!sh 6-Jan-10 5:34 
GeneralRe: component for datagridview Pin
SajjadZare6-Jan-10 5:38
SajjadZare6-Jan-10 5:38 
GeneralRe: component for datagridview Pin
dan!sh 6-Jan-10 5:46
professional dan!sh 6-Jan-10 5:46 
QuestionHow do I access row and cell information in a bound DataGridView? Pin
arnold_w6-Jan-10 5:11
arnold_w6-Jan-10 5:11 
AnswerRe: How do I access row and cell information in a bound DataGridView? Pin
dan!sh 6-Jan-10 5:45
professional dan!sh 6-Jan-10 5:45 
GeneralRe: How do I access row and cell information in a bound DataGridView? Pin
arnold_w6-Jan-10 21:27
arnold_w6-Jan-10 21:27 

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.