Click here to Skip to main content
15,901,426 members
Home / Discussions / C#
   

C#

 
QuestionAfter editing a dataset my changes are not visible in the datagrid Pin
kudorgyozo9-Jul-07 1:32
kudorgyozo9-Jul-07 1:32 
AnswerRe: After editing a dataset my changes are not visible in the datagrid [modified] Pin
Martin#9-Jul-07 1:43
Martin#9-Jul-07 1:43 
GeneralRe: After editing a dataset my changes are not visible in the datagrid Pin
kudorgyozo9-Jul-07 1:54
kudorgyozo9-Jul-07 1:54 
AnswerRe: After editing a dataset my changes are not visible in the datagrid Pin
sam#9-Jul-07 1:59
sam#9-Jul-07 1:59 
Generalstill not working... Pin
kudorgyozo9-Jul-07 2:10
kudorgyozo9-Jul-07 2:10 
GeneralRe: After editing a dataset my changes are not visible in the datagrid Pin
sam#9-Jul-07 2:21
sam#9-Jul-07 2:21 
GeneralRe: After editing a dataset my changes are not visible in the datagrid Pin
kudorgyozo9-Jul-07 2:35
kudorgyozo9-Jul-07 2:35 
GeneralRe: After editing a dataset my changes are not visible in the datagrid Pin
sam#9-Jul-07 2:58
sam#9-Jul-07 2:58 
hmm.. i think some part is missing. check the following code .its working fine.in case any confusion please feel free for messaging me Smile | :)

DataSet ds = new DataSet("dataset");
System.Data.DataTable mytable = new System.Data.DataTable("vizite");

//fill data in grid
private void fillGrid()
{
DataRow dr1, dr2;

DataColumn dc = new DataColumn("bifat1");
dc.Caption = "bifat1";
//dc.DataType = System.Type.GetType("System.Boolean");

DataColumn dc2 = new DataColumn("bifat2");
dc.Caption = "bifat2";
//dc.DataType = System.Type.GetType("System.Boolean");

mytable.Columns.Add(dc);
mytable.Columns.Add(dc2);


dr1 = mytable.NewRow();
dr1["bifat1"] = "True";
dr1["bifat2"] = "False";
mytable.Rows.Add(dr1);

dr2 = mytable.NewRow();
dr2["bifat1"] = "True";
dr2["bifat2"] = "False";
mytable.Rows.Add(dr2);

ds.Tables.Add(mytable);

dataGrid1.DataSource = ds.Tables["vizite"];


}

///
/// changes values of grid
///

private void changeValues()
{
for (int i = 0; i < mytable.Rows.Count; i++)
{

if (mytable.Rows[i][0].ToString() == "True")
{
mytable.Rows[i][0] = "yes";
}

if (mytable.Rows[i][1].ToString() == "True")
{
mytable.Rows[i][1] = "yes";
}
}
dataGrid1.Refresh();
}
Questionproblem in running c# using sql server in other client Pin
asdf17539-Jul-07 1:28
asdf17539-Jul-07 1:28 
AnswerRe: problem in running c# using sql server in other client Pin
originSH9-Jul-07 1:33
originSH9-Jul-07 1:33 
Questionproblem in running c# using sql server in other client Pin
asdf17539-Jul-07 1:27
asdf17539-Jul-07 1:27 
AnswerRe: problem in running c# using sql server in other client Pin
Paul Conrad13-Jul-07 13:15
professionalPaul Conrad13-Jul-07 13:15 
QuestionXMLHTTP40Class Status 500 error. Pin
ramdil9-Jul-07 1:17
ramdil9-Jul-07 1:17 
AnswerRe: XMLHTTP40Class Status 500 error. Pin
Pete O'Hanlon9-Jul-07 1:37
mvePete O'Hanlon9-Jul-07 1:37 
GeneralRe: XMLHTTP40Class Status 500 error. Pin
ramdil9-Jul-07 2:40
ramdil9-Jul-07 2:40 
AnswerRe: XMLHTTP40Class Status 500 error. Pin
Vasudevan Deepak Kumar9-Jul-07 2:04
Vasudevan Deepak Kumar9-Jul-07 2:04 
GeneralRe: XMLHTTP40Class Status 500 error. Pin
ramdil9-Jul-07 3:01
ramdil9-Jul-07 3:01 
QuestionCheckbox in datagrid [modified] Pin
pmartike9-Jul-07 0:42
pmartike9-Jul-07 0:42 
AnswerRe: Checkbox in datagrid Pin
Ron.S9-Jul-07 1:04
Ron.S9-Jul-07 1:04 
GeneralRe: Checkbox in datagrid Pin
pmartike9-Jul-07 1:15
pmartike9-Jul-07 1:15 
AnswerRe: Checkbox in datagrid Pin
sam#9-Jul-07 1:57
sam#9-Jul-07 1:57 
GeneralRe: Checkbox in datagrid Pin
pmartike9-Jul-07 2:14
pmartike9-Jul-07 2:14 
GeneralRe: Checkbox in datagrid Pin
sam#9-Jul-07 2:23
sam#9-Jul-07 2:23 
QuestionNunit Testing...?? Pin
Software_Specialist9-Jul-07 0:27
Software_Specialist9-Jul-07 0:27 
AnswerRe: Nunit Testing...?? Pin
Pete O'Hanlon9-Jul-07 0:48
mvePete O'Hanlon9-Jul-07 0:48 

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.