Click here to Skip to main content
15,925,723 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to use frames in asp.net Pin
Colin Angus Mackay26-Feb-07 23:20
Colin Angus Mackay26-Feb-07 23:20 
GeneralRe: how to use frames in asp.net Pin
Piyush Vardhan Singh27-Feb-07 0:45
Piyush Vardhan Singh27-Feb-07 0:45 
AnswerRe: how to use frames in asp.net Pin
Guffa26-Feb-07 23:40
Guffa26-Feb-07 23:40 
QuestionHow to make a subdomain programmatically??? Pin
amin_behzadi26-Feb-07 22:11
professionalamin_behzadi26-Feb-07 22:11 
QuestionDatagrid fails to show data! Pin
nclauder26-Feb-07 22:02
nclauder26-Feb-07 22:02 
AnswerRe: Datagrid fails to show data! Pin
Sylvester george26-Feb-07 22:18
Sylvester george26-Feb-07 22:18 
AnswerRe: Datagrid fails to show data! Pin
Shajeel26-Feb-07 22:22
Shajeel26-Feb-07 22:22 
GeneralRe: Datagrid fails to show data! Pin
nclauder26-Feb-07 23:04
nclauder26-Feb-07 23:04 
Thanks,
Shajeel Your advice has worked. But I've gotten another problem. When I press the button to add a new row it does not bring a new row.The button is bttnew. the code is now looking like this.

private DataTable Fill()
{
DataTable table = new DataTable();
SqlDataAdapter adapter = new SqlDataAdapter("SELECT * from dbo.DashBoard", con);
adapter.Fill(table);
return table;
}
private void Bind()
{

dgis.DataSource = Fill();
dgis.DataBind();
}
private void InsertEmpty()
{
DataTable table = new DataTable();
table.Rows.InsertAt(table.NewRow(), 0);
}

private void bttnew_Click(object sender, System.EventArgs e)
{
// inserting
dgis.EditItemIndex = 0;

// modify text
EditCommandColumn ecc =(EditCommandColumn) dgis.Columns[0];
ecc.UpdateText = "Insert";

// fill table, insert empty row, bind to datagrid
Fill();
InsertEmpty();
Bind();
}
private void dgis_ItemCommand(object source,System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
// stop editing
dgis.EditItemIndex = -1;

switch (e.CommandName)
{
case "Insert":
break;

case "Update":
break;

case "Cancel":
EditCommandColumn ecc =(EditCommandColumn) dgis.Columns[4];
ecc.UpdateText = "Update";
break;

case "Edit":
// begin editing
dgis.EditItemIndex = e.Item.ItemIndex;
break;
}

// fill and bind
Fill();
Bind();
}

Thanks;
GeneralRe: Datagrid fails to show data! Pin
Shajeel26-Feb-07 23:20
Shajeel26-Feb-07 23:20 
GeneralRe: Datagrid fails to show data! Pin
nclauder27-Feb-07 3:26
nclauder27-Feb-07 3:26 
GeneralRe: Datagrid fails to show data! Pin
Shajeel27-Feb-07 17:16
Shajeel27-Feb-07 17:16 
GeneralRe: Datagrid fails to show data! Pin
nclauder27-Feb-07 18:47
nclauder27-Feb-07 18:47 
GeneralRe: Datagrid fails to show data! Pin
Shajeel27-Feb-07 19:23
Shajeel27-Feb-07 19:23 
GeneralRe: Datagrid fails to show data! Pin
nclauder27-Feb-07 20:26
nclauder27-Feb-07 20:26 
GeneralRe: Datagrid fails to show data! Pin
Shajeel28-Feb-07 0:03
Shajeel28-Feb-07 0:03 
GeneralRe: Datagrid fails to show data! Pin
nclauder28-Feb-07 1:06
nclauder28-Feb-07 1:06 
QuestionGridView Paging [modified] Pin
John Gathogo26-Feb-07 21:45
John Gathogo26-Feb-07 21:45 
AnswerNice question. trying to find out solution Pin
Sylvester george26-Feb-07 23:08
Sylvester george26-Feb-07 23:08 
QuestionHow to store xml file in sqlserver Pin
RavikumarR26-Feb-07 21:43
RavikumarR26-Feb-07 21:43 
AnswerRe: How to store xml file in sqlserver Pin
Sylvester george26-Feb-07 22:44
Sylvester george26-Feb-07 22:44 
QuestionHow to show image from Database into Datalist Pin
Member 321396326-Feb-07 20:49
Member 321396326-Feb-07 20:49 
AnswerRe: How to show image from Database into Datalist Pin
Sandeep Akhare26-Feb-07 20:55
Sandeep Akhare26-Feb-07 20:55 
GeneralRe: How to show image from Database into Datalist Pin
Naveed Kamboh27-Feb-07 1:11
Naveed Kamboh27-Feb-07 1:11 
Questiondisplay username(firstname/lastname) in inbox Pin
Member 385693426-Feb-07 20:33
Member 385693426-Feb-07 20:33 
QuestionCDBVariant class problem Pin
prithaa26-Feb-07 20:25
prithaa26-Feb-07 20:25 

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.