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

C#

 
Questioncreation of a service Pin
Bojja Lakshmi13-Sep-07 1:34
Bojja Lakshmi13-Sep-07 1:34 
AnswerRe: creation of a service Pin
Nissim Salomon13-Sep-07 1:56
Nissim Salomon13-Sep-07 1:56 
Questionprevent application from running Pin
barbarini13-Sep-07 1:29
barbarini13-Sep-07 1:29 
AnswerRe: prevent application from running Pin
Giorgi Dalakishvili13-Sep-07 1:48
mentorGiorgi Dalakishvili13-Sep-07 1:48 
AnswerRe: prevent application from running Pin
Matthew Cuba13-Sep-07 2:14
Matthew Cuba13-Sep-07 2:14 
Questionadding AddingRows to dataTable Pin
sangramkp13-Sep-07 0:57
sangramkp13-Sep-07 0:57 
AnswerRe: adding AddingRows to dataTable Pin
pmarfleet13-Sep-07 1:23
pmarfleet13-Sep-07 1:23 
GeneralRe: adding AddingRows to dataTable Pin
sangramkp13-Sep-07 2:05
sangramkp13-Sep-07 2:05 
code<
protected void btnSlabAdd_Click(object sender, EventArgs e)
{
DataSet ds = new DataSet();

DataTable dt= new DataTable();

DataColumn dc1 = new DataColumn("StartAmount", typeof(double));
DataColumn dc2= new DataColumn("EndAmount", typeof(double));
DataColumn dc3= new DataColumn("AccountShare", typeof(double));
dt.Columns.Add(dc1);
dt.Columns.Add(dc2);
dt.Columns.Add(dc3);

DataRow dr = dt.NewRow();

if (dt.Rows.Count == 0)
{
dr["StartAmount"] = 1;
dr["EndAmount"] = double.Parse(txtEndAmount.Text);
dr["AccountShare"] = double.Parse(txtAccountShare.Text);
//dt.Rows.Add(dr);
}

else
{
//dr["StartAmount"] = 1 + double.Parse(dt.Rows[dt.Rows.Count - 1].Table.Columns["EndAmount"].Caption);
dr["StartAmount"] = 1 + double.Parse(gdvDistributorSlab.Rows[gdvDistributorSlab.Rows.Count - 1].Cells[2].Text);
dr["EndAmount"] = double.Parse(txtEndAmount.Text);
dr["AccountShare"] = double.Parse(txtAccountShare.Text);
//dt.Rows.Add(dr);
}
dt.Rows.Add(dr);

gdvDistributorSlab.DataSource = dt;
gdvDistributorSlab.DataBind();
}
>

As in the above code I was trying to add datarows to a dataTable and viewing it in gridView But Everytime I can see only One row in gridView......
I want to see all the rows added to the datatable....

help please


Sangram
(A battle with self)

Life is simple, we are the ones makes the living difficult

GeneralRe: adding AddingRows to dataTable Pin
pmarfleet13-Sep-07 3:20
pmarfleet13-Sep-07 3:20 
QuestionGetting the number of listbox items in another form Pin
Lucy13-Sep-07 0:52
Lucy13-Sep-07 0:52 
AnswerRe: Getting the number of listbox items in another form Pin
JoeSharp13-Sep-07 1:13
JoeSharp13-Sep-07 1:13 
Questionstate management Pin
prog-hero13-Sep-07 0:45
prog-hero13-Sep-07 0:45 
AnswerRe: state management Pin
Urs Enzler13-Sep-07 1:18
Urs Enzler13-Sep-07 1:18 
GeneralRe: state management Pin
Urs Enzler13-Sep-07 1:49
Urs Enzler13-Sep-07 1:49 
AnswerRe: state management Pin
Pete O'Hanlon13-Sep-07 1:21
mvePete O'Hanlon13-Sep-07 1:21 
QuestionResolving a mapped drive Pin
benjymous13-Sep-07 0:15
benjymous13-Sep-07 0:15 
AnswerRe: Resolving a mapped drive Pin
Pete O'Hanlon13-Sep-07 1:12
mvePete O'Hanlon13-Sep-07 1:12 
GeneralRe: Resolving a mapped drive Pin
benjymous13-Sep-07 1:37
benjymous13-Sep-07 1:37 
GeneralRe: Resolving a mapped drive Pin
Big Daddy Farang13-Sep-07 11:51
Big Daddy Farang13-Sep-07 11:51 
Questionusing Scrollbar for panning in my Graphics Editor Pin
a_david12313-Sep-07 0:13
a_david12313-Sep-07 0:13 
QuestionWhy The remote server returned an error: (403) Forbidden? [modified] Pin
bug_aonz12-Sep-07 23:57
bug_aonz12-Sep-07 23:57 
AnswerRe: Why The remote server returned an error: (403) Forbidden? Pin
Le centriste13-Sep-07 0:02
Le centriste13-Sep-07 0:02 
GeneralRe: Why The remote server returned an error: (403) Forbidden? Pin
bug_aonz13-Sep-07 0:23
bug_aonz13-Sep-07 0:23 
GeneralRe: Why The remote server returned an error: (403) Forbidden? Pin
Le centriste13-Sep-07 1:14
Le centriste13-Sep-07 1:14 
GeneralRe: Why The remote server returned an error: (403) Forbidden? Pin
bug_aonz13-Sep-07 16:30
bug_aonz13-Sep-07 16:30 

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.