Click here to Skip to main content
15,902,864 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionEmailing Pin
boyindie21-Aug-07 0:13
boyindie21-Aug-07 0:13 
AnswerRe: Emailing Pin
Vasudevan Deepak Kumar21-Aug-07 1:33
Vasudevan Deepak Kumar21-Aug-07 1:33 
Questioninstaller.class Pin
balakpn20-Aug-07 22:26
balakpn20-Aug-07 22:26 
QuestionHow to send a POST request ??? Pin
devboycpp20-Aug-07 20:33
devboycpp20-Aug-07 20:33 
AnswerRe: How to send a POST request ??? Pin
Vasudevan Deepak Kumar20-Aug-07 20:35
Vasudevan Deepak Kumar20-Aug-07 20:35 
QuestionRe: How to send a POST request ??? Pin
devboycpp20-Aug-07 20:43
devboycpp20-Aug-07 20:43 
AnswerRe: How to send a POST request ??? Pin
Vasudevan Deepak Kumar21-Aug-07 1:31
Vasudevan Deepak Kumar21-Aug-07 1:31 
QuestionAdding dynamic rows to grid view. Pin
atimpoo20-Aug-07 13:37
atimpoo20-Aug-07 13:37 
Hi All,

I am a beginner for .Net technologies. I have few problems in adding dynamic row in grid view.
Please take a look at my code snippet. I have GridView which is populated by a table from database.
I want to give "ADD NEW INFO" option to the user. Following code really works sometime or It just duplicate the available rows and lists in the view.

and my OnUpdateClick is never triggered When it worked. Please help me. I welcome all suggestions

Thanks in Advance.

protected void btnBook_Click(object sender, EventArgs e)
{
GridViewRow newRow = new GridViewRow(-1,-1, DataControlRowType.DataRow, DataControlRowState.Normal);
newRow.Cells.AddRange(CreateCell());
Table tbl = GridView1.FooterRow.Parent as Table;
tbl.Rows.AddAt(GridView1.Rows.Count+1, newRow);
//TableCell cell = new TableCell();
//cell.Controls.Add(new LiteralControl("Footer Row"));
//newRow.Cells.Add(cell);
newRow.ID = "Dynamically Generated Row";

}

private TableCell[] CreateCell()
{

DataSet ds = (DataSet)Session["libDS"];
DataTable dsTable= ds.Tables["libBooks"];
int nRow = dsTable.Rows.Count + 100;
string row = nRow.ToString();
TableCell[] cells = new TableCell[5];

TableCell cell = new TableCell();
TextBox txt1 = new TextBox();
txt1.Text = row;
txt1.ReadOnly = true;
cell.Controls.Add(txt1);
cells[0] = cell;

cell = new TableCell();
txt1 = new TextBox();
txt1.Text ="";
cell.Controls.Add(txt1);
cells[1] = cell;

cell = new TableCell();
txt1 = new TextBox();
txt1.Text ="";
cell.Controls.Add(txt1);
cells[2] = cell;

cell = new TableCell();
txt1 = new TextBox();
txt1.Text ="";
cell.Controls.Add(txt1);
cells[3] = cell;

cell = new TableCell();
LinkButton link1 = new LinkButton();
link1.Text = "Update";
link1.Click += new EventHandler(OnUpdateClicked) ;
cell.Controls.Add(link1);
link1 = new LinkButton();
link1.Text = "Cancel";
link1.Click += new EventHandler(OnCancelClicked);
cell.Controls.Add(link1);
//link1 = new LinkButton();
//link1.Text = "Cancel";
//link1.OnClientClick ="OnUpdateClicked(false)";
cells[4] = cell;

return cells;

}
QuestionWebBrowser Control - new window detection? Pin
seanwright20-Aug-07 9:22
seanwright20-Aug-07 9:22 
QuestionAbout DateTimePicker Pin
mamathakalyan18-Aug-07 2:11
mamathakalyan18-Aug-07 2:11 
AnswerRe: About DateTimePicker Pin
Luc Pattyn19-Aug-07 8:13
sitebuilderLuc Pattyn19-Aug-07 8:13 
Questionmessenger Pin
volvoline17-Aug-07 8:49
volvoline17-Aug-07 8:49 
AnswerRe: messenger Pin
originSH19-Aug-07 1:04
originSH19-Aug-07 1:04 
QuestionFramework Version Pin
jchigg200017-Aug-07 7:10
jchigg200017-Aug-07 7:10 
AnswerRe: Framework Version Pin
Luc Pattyn17-Aug-07 7:31
sitebuilderLuc Pattyn17-Aug-07 7:31 
GeneralRe: Framework Version Pin
Scott Dorman17-Aug-07 7:41
professionalScott Dorman17-Aug-07 7:41 
AnswerRe: Framework Version Pin
Scott Dorman17-Aug-07 7:48
professionalScott Dorman17-Aug-07 7:48 
GeneralRe: Framework Version Pin
jchigg200017-Aug-07 7:58
jchigg200017-Aug-07 7:58 
AnswerRe: Framework Version Pin
Vasudevan Deepak Kumar20-Aug-07 20:36
Vasudevan Deepak Kumar20-Aug-07 20:36 
Question64-bit Interop Pin
Leslie Sanford17-Aug-07 6:42
Leslie Sanford17-Aug-07 6:42 
AnswerRe: 64-bit Interop Pin
Abisodun17-Aug-07 6:49
Abisodun17-Aug-07 6:49 
GeneralRe: 64-bit Interop [modified] Pin
Leslie Sanford17-Aug-07 7:23
Leslie Sanford17-Aug-07 7:23 
GeneralRe: 64-bit Interop Pin
Dave Kreskowiak17-Aug-07 7:35
mveDave Kreskowiak17-Aug-07 7:35 
GeneralRe: 64-bit Interop Pin
Leslie Sanford17-Aug-07 7:38
Leslie Sanford17-Aug-07 7:38 
GeneralRe: 64-bit Interop Pin
Luc Pattyn17-Aug-07 7:38
sitebuilderLuc Pattyn17-Aug-07 7:38 

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.