Click here to Skip to main content
15,919,500 members
Home / Discussions / C#
   

C#

 
Questionlocalizable form gridview issue Pin
muharrem1-Aug-08 4:37
muharrem1-Aug-08 4:37 
AnswerRe: localizable form gridview issue Pin
nelsonpaixao1-Aug-08 13:17
nelsonpaixao1-Aug-08 13:17 
GeneralRe: localizable form gridview issue Pin
muharrem2-Aug-08 1:51
muharrem2-Aug-08 1:51 
QuestionService to show form Pin
BenGriffiths1-Aug-08 4:17
BenGriffiths1-Aug-08 4:17 
AnswerRe: Service to show form Pin
paas1-Aug-08 4:43
paas1-Aug-08 4:43 
AnswerRe: Service to show form Pin
vikas amin1-Aug-08 4:53
vikas amin1-Aug-08 4:53 
QuestionMessage Removed Pin
1-Aug-08 3:50
tkrn1-Aug-08 3:50 
AnswerRe: Dataset Designer using it programmatically? Pin
nelsonpaixao1-Aug-08 14:06
nelsonpaixao1-Aug-08 14:06 
Do you want to get data from a database and display in your application datagridview?


// this is a routine i wrote

public static void SP_WITH_DATAGRIDVIEW(string SP, DataGridView DATAGRIDVIEW_X, string PARAMETER_NAME1, SqlDbType SQLDBTYPE1, object OBJECT1, string PARAMETER_NAME2, SqlDbType SQLDBTYPE2, object OBJECT2)
{
SqlConnection conn = new SqlConnection(your_connection_string);
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = SP;
cmd.CommandType = CommandType.StoredProcedure;

// how many parameters to you have? here is 2, and of what kind?
cmd.Parameters.Add(PARAMETER_NAME1, SQLDBTYPE1).Value = OBJECT1;
cmd.Parameters.Add(PARAMETER_NAME2, SQLDBTYPE2).Value = OBJECT2;

conn.Open();
SqlDataAdapter sql_da = new SqlDataAdapter();
sql_da.SelectCommand = cmd;
DataTable dt = new DataTable();
sql_da.Fill(dt);
conn.Close();
DATAGRIDVIEW_X.DataSource = dt;
}

Good luck!!!Cool | :cool:
QuestionTemplates Pin
Dirso1-Aug-08 2:45
Dirso1-Aug-08 2:45 
AnswerRe: Templates Pin
J4amieC1-Aug-08 2:48
J4amieC1-Aug-08 2:48 
QuestionProgrammatically Added SSIS Package Pin
Jammer1-Aug-08 1:29
Jammer1-Aug-08 1:29 
AnswerRe: Programmatically Added SSIS Package Pin
Jammer1-Aug-08 6:12
Jammer1-Aug-08 6:12 
QuestionSharePoint Problem from client pc Pin
manju#1231-Aug-08 1:04
manju#1231-Aug-08 1:04 
QuestionGet the code of an Stored procedure Pin
anderslundsgard1-Aug-08 0:42
anderslundsgard1-Aug-08 0:42 
AnswerRe: Get the code of an Stored procedure Pin
Rob Philpott1-Aug-08 0:45
Rob Philpott1-Aug-08 0:45 
GeneralRe: Get the code of an Stored procedure Pin
Paul Conrad1-Aug-08 5:39
professionalPaul Conrad1-Aug-08 5:39 
AnswerRe: Get the code of an Stored procedure Pin
Anurag Gandhi1-Aug-08 1:00
professionalAnurag Gandhi1-Aug-08 1:00 
Questionwindows servioce - timer Pin
arkiboys1-Aug-08 0:36
arkiboys1-Aug-08 0:36 
AnswerRe: windows servioce - timer Pin
stancrm1-Aug-08 0:47
stancrm1-Aug-08 0:47 
GeneralRe: windows servioce - timer Pin
arkiboys1-Aug-08 0:49
arkiboys1-Aug-08 0:49 
AnswerRe: windows servioce - timer Pin
paas1-Aug-08 1:05
paas1-Aug-08 1:05 
GeneralRe: windows servioce - timer Pin
arkiboys1-Aug-08 2:58
arkiboys1-Aug-08 2:58 
GeneralLine numbers differ in Debug and Release. Pin
Brady Kelly1-Aug-08 0:26
Brady Kelly1-Aug-08 0:26 
GeneralRe: Line numbers differ in Debug and Release. Pin
Rob Philpott1-Aug-08 0:43
Rob Philpott1-Aug-08 0:43 
GeneralRe: Line numbers differ in Debug and Release. Pin
leppie1-Aug-08 1:49
leppie1-Aug-08 1:49 

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.