Click here to Skip to main content
15,910,471 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: gridview paging gridview not visible Pin
haseeb_saeed24-Apr-09 15:57
haseeb_saeed24-Apr-09 15:57 
QuestionMultilingual Support Pin
dataminers24-Apr-09 6:17
dataminers24-Apr-09 6:17 
QuestionDreamweaver, Visual Studio, c# asp.net web site development tools Pin
jboyd11124-Apr-09 5:47
jboyd11124-Apr-09 5:47 
AnswerRe: Dreamweaver, Visual Studio, c# asp.net web site development tools Pin
Rolando CC24-Apr-09 8:25
professionalRolando CC24-Apr-09 8:25 
Questiondatasets over class objects to store data Pin
Tina P24-Apr-09 5:33
Tina P24-Apr-09 5:33 
AnswerRe: datasets over class objects to store data Pin
Yusuf24-Apr-09 5:51
Yusuf24-Apr-09 5:51 
QuestionASP.net gzip compression using Response.Filter not working. Pin
Tiju John24-Apr-09 5:23
Tiju John24-Apr-09 5:23 
QuestionDataGrid EditCommand Pin
princy1024-Apr-09 4:40
princy1024-Apr-09 4:40 
Hi,

I'm using .net 2008.i've a datagrid named 'dgUserNote'. I add edit,cancel,upadte and delete like this;
<asp:editcommandcolumn canceltext="Cancel" edittext="Edit" headertext="Edit" updatetext="Update" xmlns:asp="#unknown">
<asp:buttoncolumn commandname="Delete" headertext="Delete" text="Delete" xmlns:asp="#unknown">

and in coding part i written like;

void dgUserNote_EditCommand(object source, DataGridCommandEventArgs e)
{
dgUserNote.EditItemIndex = e.Item.ItemIndex;
}
but when i click edit first time it will not work; second time only it will work

likewise when i'm clicking cancel button first time it will not work,second time it is going to upadtecommand .

cancel i written like this;
void dgUserNote_CancelCommand(object source, DataGridCommandEventArgs e)
{
dgUserNote.EditItemIndex = -1;

}

and Update i written like this;
SqlCommand SqlCom;
try
{
if (ConGlobal.State == ConnectionState.Closed) ConGlobal.Open();
SqlCom = new SqlCommand("SpInsertUserNote", ConGlobal);
SqlCom.Parameters.Add("@IorU", SqlDbType.VarChar).SqlValue = "U";
SqlCom.Parameters.Add("@Title", SqlDbType.VarChar).SqlValue = e.Item.Cells[2].Text;
SqlCom.Parameters.Add("@Description", SqlDbType.VarChar).SqlValue = e.Item.Cells[3].Text;
SqlCom.Parameters.Add("@Date", SqlDbType.VarChar).SqlValue = e.Item.Cells[4].Text;
SqlCom.Parameters.Add("@UserName", SqlDbType.VarChar).SqlValue = mdlNewClass.gStrUserName;
SqlCom.CommandType = CommandType.StoredProcedure;
SqlCom.ExecuteNonQuery();
SqlCom = null;
Response.Write("Record Updated Successfully...");
BindData();
dgUserNote.EditItemIndex = -1;
}

pls help me in this issue
AnswerRe: DataGrid EditCommand Pin
Ryomin24-Apr-09 7:48
professionalRyomin24-Apr-09 7:48 
GeneralRe: DataGrid EditCommand Pin
princy1024-Apr-09 21:33
princy1024-Apr-09 21:33 
Questionpassing value Pin
netJP12L24-Apr-09 4:33
netJP12L24-Apr-09 4:33 
AnswerRe: passing value Pin
led mike24-Apr-09 4:44
led mike24-Apr-09 4:44 
QuestionProblem creating server control that extends the CollapsiblePanelExtender from the AJAX toolkit Pin
simonpowers4424-Apr-09 3:54
simonpowers4424-Apr-09 3:54 
Questiondoes not contain a definition for 'btnSubmit_Click' Pin
XaraW24-Apr-09 2:52
XaraW24-Apr-09 2:52 
AnswerRe: does not contain a definition for 'btnSubmit_Click' Pin
SeMartens24-Apr-09 3:12
SeMartens24-Apr-09 3:12 
GeneralRe: does not contain a definition for 'btnSubmit_Click' Pin
DoctorMick24-Apr-09 4:26
DoctorMick24-Apr-09 4:26 
QuestionTEMP FOLDER Pin
Member 393125924-Apr-09 2:03
Member 393125924-Apr-09 2:03 
AnswerRe: TEMP FOLDER Pin
DoctorMick24-Apr-09 4:27
DoctorMick24-Apr-09 4:27 
AnswerSelf Cleaning Pin
David Mujica24-Apr-09 5:26
David Mujica24-Apr-09 5:26 
QuestionSession? Pin
Karthick_gc24-Apr-09 1:53
Karthick_gc24-Apr-09 1:53 
AnswerRe: Session? Pin
Abhijit Jana24-Apr-09 2:01
professionalAbhijit Jana24-Apr-09 2:01 
GeneralRe: Session? Pin
Karthick_gc24-Apr-09 2:06
Karthick_gc24-Apr-09 2:06 
GeneralRe: Session? Pin
Sandeep Akhare24-Apr-09 7:52
Sandeep Akhare24-Apr-09 7:52 
GeneralRe: Session? Pin
Abhijit Jana24-Apr-09 18:56
professionalAbhijit Jana24-Apr-09 18:56 
GeneralRe: Session? Pin
Sandeep Akhare27-Apr-09 8:02
Sandeep Akhare27-Apr-09 8:02 

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.