Click here to Skip to main content
15,897,519 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: iframe Pin
netJP12L16-Nov-07 17:29
netJP12L16-Nov-07 17:29 
GeneralRe: iframe Pin
SABhatti16-Nov-07 17:39
SABhatti16-Nov-07 17:39 
QuestionPrinting Through windows Thin client in asp.net Pin
Karthiraj16-Nov-07 7:55
Karthiraj16-Nov-07 7:55 
Question[02/03]How to Configuiring IIS for my web service Pin
Vimalsoft(Pty) Ltd16-Nov-07 6:12
professionalVimalsoft(Pty) Ltd16-Nov-07 6:12 
AnswerRe: [02/03]How to Configuiring IIS for my web service Pin
Michael Sync17-Nov-07 4:45
Michael Sync17-Nov-07 4:45 
QuestionHow to get data from DataGrid to fill into Textbox ? Pin
namnguyenHN16-Nov-07 5:14
namnguyenHN16-Nov-07 5:14 
AnswerRe: How to get data from DataGrid to fill into Textbox ? Pin
John-ph16-Nov-07 5:40
John-ph16-Nov-07 5:40 
QuestionGridview problem Pin
jpmadeira16-Nov-07 5:08
jpmadeira16-Nov-07 5:08 
I'm having a lot of problems with the gridview bind.
I have a dataset that represents a table of a database.

When I delete or insert a row in the gridview I have the data well inserted or deleted in the db but the gridview duplicates the rows when postbacks the page and i can't understand why. Can someone help me?

Code aspx.cs:

protected void Page_Load(object sender, EventArgs e)
{
dbHandler = new WalletManagerDBSqlSrvHandler(DB_SERVER);
shoptype_grid.DataSource = dbHandler.getShopTypes().Tables["ShopType"];

if (!Page.IsPostBack)
{
shoptype_grid.DataBind();
}
formatShopTypeGrid();
}

//eventhandler when a row is inserted
protected void onClickInsertShopType(object sender, EventArgs e)
{

DataTable dtable = dbHandler.getShopTypes().Tables["ShopType"];

DataRow dataRow = dtable.NewRow();
dataRow["ID"] = DateTime.UtcNow.Ticks; /*Generates the ID of the inserted item threw the date and time tick*/
dataRow["Type"] = shopType_txtbox.Text;
dtable.Rows.Add(dataRow);

dbHandler.updateShopType(DatabaseOperation.Insert);

shoptype_grid.DataBind();
}

//eventhandler when a row is deleted
protected void shoptype_grid_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
DataTable dtable = dbHandler.getShopTypes().Tables["ShopType"];
DataRow drow = dtable.Rows[e.RowIndex];
drow.Delete(); //row erased

dbHandler.updateShopType(DatabaseOperation.Delete);

shoptype_grid.DataBind();
}







I'm a Worm Bug

Wink | ;)

AnswerRe: Gridview problem Pin
C Mahesh16-Nov-07 17:55
C Mahesh16-Nov-07 17:55 
QuestionLink Button and Java Script Pin
Sarfaraj Ahmed16-Nov-07 4:55
Sarfaraj Ahmed16-Nov-07 4:55 
AnswerRe: Link Button and Java Script Pin
Fred_Smith16-Nov-07 6:11
Fred_Smith16-Nov-07 6:11 
GeneralRe: Link Button and Java Script Pin
Sarfaraj Ahmed16-Nov-07 15:58
Sarfaraj Ahmed16-Nov-07 15:58 
AnswerRe: Link Button and Java Script Pin
Michael Sync16-Nov-07 6:17
Michael Sync16-Nov-07 6:17 
QuestionMissing ASP.NET Templates in Visula Studio 2005 Pin
Suj_7816-Nov-07 4:53
Suj_7816-Nov-07 4:53 
Questionhow to encrypt and decrypt a data in aspdotnet Pin
codeproject_buna16-Nov-07 3:38
codeproject_buna16-Nov-07 3:38 
AnswerRe: how to encrypt and decrypt a data in aspdotnet Pin
Pete O'Hanlon16-Nov-07 4:18
mvePete O'Hanlon16-Nov-07 4:18 
QuestionWeb Parent Control Pin
Eduard Keilholz16-Nov-07 3:23
Eduard Keilholz16-Nov-07 3:23 
AnswerRe: Web Parent Control Pin
jpmadeira16-Nov-07 5:38
jpmadeira16-Nov-07 5:38 
GeneralRe: Web Parent Control Pin
Eduard Keilholz18-Nov-07 20:54
Eduard Keilholz18-Nov-07 20:54 
Questioni want to check or select only one checkbox in the checkboxlist Pin
pavankumarchakilam16-Nov-07 2:20
pavankumarchakilam16-Nov-07 2:20 
AnswerRe: i want to check or select only one checkbox in the checkboxlist Pin
N a v a n e e t h16-Nov-07 2:34
N a v a n e e t h16-Nov-07 2:34 
QuestionGenerating Dynamic Controls Pin
www.Developerof.NET16-Nov-07 1:57
www.Developerof.NET16-Nov-07 1:57 
AnswerRe: Generating Dynamic Controls Pin
N a v a n e e t h16-Nov-07 2:52
N a v a n e e t h16-Nov-07 2:52 
GeneralRe: Generating Dynamic Controls Pin
Brady Kelly16-Nov-07 4:22
Brady Kelly16-Nov-07 4:22 
GeneralRe: Generating Dynamic Controls Pin
www.Developerof.NET16-Nov-07 20:17
www.Developerof.NET16-Nov-07 20:17 

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.