Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
QuestionHow to detect if a user leaves a control while holding a Mousebutton down? Pin
Megidolaon23-Mar-09 22:48
Megidolaon23-Mar-09 22:48 
AnswerRe: How to detect if a user leaves a control while holding a Mousebutton down? Pin
musefan23-Mar-09 22:57
musefan23-Mar-09 22:57 
GeneralRe: How to detect if a user leaves a control while holding a Mousebutton down? Pin
Megidolaon24-Mar-09 1:52
Megidolaon24-Mar-09 1:52 
GeneralRe: How to detect if a user leaves a control while holding a Mousebutton down? Pin
King Julien24-Mar-09 3:32
King Julien24-Mar-09 3:32 
GeneralRe: How to detect if a user leaves a control while holding a Mousebutton down? [modified] Pin
Megidolaon24-Mar-09 21:48
Megidolaon24-Mar-09 21:48 
Question.Net error..... Pin
S K Y23-Mar-09 22:40
S K Y23-Mar-09 22:40 
AnswerRe: .Net error..... Pin
Eddy Vluggen23-Mar-09 23:20
professionalEddy Vluggen23-Mar-09 23:20 
Questionexcel sheet Pin
Mangesh Tomar23-Mar-09 22:37
Mangesh Tomar23-Mar-09 22:37 
hi
Here is my code in this i use a file dialog box from which i open the excel file but here is one problem i read only one sheet in datagride view when i select some another file then it shows the error PLZ CHECK THE FILE NAME OR FILE IS NOT EXIT NEED A Help


private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog FD = new OpenFileDialog();
FD.Filter = "Excel|*.xls";
if (FD.ShowDialog() == DialogResult.OK)
{
textBox1.Text = " " + FD.FileName;
}
string filename = textBox1.Text;
String connectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + filename + ";" +
"Extended Properties=Excel 8.0;";
OleDbConnection connection = new OleDbConnection(connectionString);
connection.Open();
OleDbCommand selectCommand = new OleDbCommand("SELECT * FROM [xyz$]", connection);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter();
dataAdapter.SelectCommand = selectCommand;
DataSet dataSet = new DataSet();

dataAdapter.Fill(dataSet);
System.Data.DataTable dataTable = dataSet.Tables[0];
dataGridView1.DataSource = dataSet.Tables[0];
// textBox1.Text = "";
MessageBox.Show(dataGridView1.RowCount.ToString());
connection.Close();
}
AnswerRe: excel sheet Pin
Nagy Vilmos23-Mar-09 23:01
professionalNagy Vilmos23-Mar-09 23:01 
QuestionPersiaDevelopers.com Pin
Majid Shahabfar23-Mar-09 22:13
Majid Shahabfar23-Mar-09 22:13 
AnswerRe: PersiaDevelopers.com Pin
Eddy Vluggen23-Mar-09 22:35
professionalEddy Vluggen23-Mar-09 22:35 
QuestionRetrieve items from the last index on Dictionary. Pin
CodingLover23-Mar-09 21:59
CodingLover23-Mar-09 21:59 
AnswerRe: Retrieve items from the last index on Dictionary. Pin
12Code23-Mar-09 22:13
12Code23-Mar-09 22:13 
QuestionRe: Retrieve items from the last index on Dictionary. Pin
CodingLover23-Mar-09 22:19
CodingLover23-Mar-09 22:19 
AnswerRe: Retrieve items from the last index on Dictionary. Pin
12Code23-Mar-09 23:42
12Code23-Mar-09 23:42 
QuestionRe: Retrieve items from the last index on Dictionary. Pin
CodingLover23-Mar-09 23:53
CodingLover23-Mar-09 23:53 
AnswerRe: Retrieve items from the last index on Dictionary. Pin
12Code24-Mar-09 0:07
12Code24-Mar-09 0:07 
GeneralRe: Retrieve items from the last index on Dictionary. Pin
CodingLover24-Mar-09 0:41
CodingLover24-Mar-09 0:41 
GeneralRe: Retrieve items from the last index on Dictionary. Pin
12Code24-Mar-09 17:03
12Code24-Mar-09 17:03 
GeneralRe: Retrieve items from the last index on Dictionary. Pin
12Code23-Mar-09 23:53
12Code23-Mar-09 23:53 
QuestionRitch text box Pin
Sajjad Leo23-Mar-09 21:13
Sajjad Leo23-Mar-09 21:13 
AnswerRe: Ritch text box Pin
Deresen23-Mar-09 22:30
Deresen23-Mar-09 22:30 
GeneralRe: Ritch text box Pin
Sajjad Leo25-Mar-09 18:50
Sajjad Leo25-Mar-09 18:50 
GeneralRe: Ritch text box Pin
Deresen25-Mar-09 22:13
Deresen25-Mar-09 22:13 
Question[Message Deleted] Pin
w.hooper23-Mar-09 20:56
w.hooper23-Mar-09 20:56 

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.