Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
protected void GVTraderdueReport_RowCancelingEdit(object sender, GridViewCancelEditEventArgs       e)
{
    GVTraderdueReport.EditIndex = -1;
    GettraderwiseLiftingRecords();
}
protected void GVTraderdueReport_RowEditing(object sender, GridViewEditEventArgs e)
{
    GVTraderdueReport.EditIndex = e.NewEditIndex;
    GettraderwiseLiftingRecords();
}

protected void GVTraderdueReport_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
    TextBox txtrecamount = (TextBox)GVTraderdueReport.Rows[e.RowIndex].Cells[3].Controls[1];
    TextBox txtrecdate = (TextBox)GVTraderdueReport.Rows[e.RowIndex].Cells[4].Controls[1];
    TextBox txtchknumber = (TextBox)GVTraderdueReport.Rows[e.RowIndex].Cells[5].Controls[1];
    TextBox txtremark = (TextBox)GVTraderdueReport.Rows[e.RowIndex].Cells[6].Controls[1];

    string tradername = Convert.ToString(GVTraderdueReport.DataKeys[e.RowIndex].Values[0].ToString());

    IFormatProvider provider = new System.Globalization.CultureInfo("en-CA", true);
    String recdate1 = txtrecdate.Text.Trim().ToString();
    DateTime recdate2 = DateTime.Parse(recdate1, provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault);

    objhatcheryPL.name = tradername;
    objhatcheryPL.cashrec = Convert.ToInt32(txtrecamount.Text.ToString());
    objhatcheryPL.recdate = recdate2;
    objhatcheryPL.chequeno = txtchknumber.Text.ToString();
    objhatcheryPL.remark = txtremark.Text.ToString();
    objhatcheryPL.username = Session["username"].ToString();

    int? chkduetatus;
    chkduetatus = objhatcheryBAL.updateChicksalesDueReport(objhatcheryPL);

    if (chkduetatus.Equals(1))
    {
        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "SelectDetails", "alert('Updated Successful');", true);
    }
    GVTraderdueReport.EditIndex = -1;
    GettraderwiseLiftingRecords();
}

protected void GVTraderdueReport_RowCommand(object sender, GridViewCommandEventArgs e)
{
    if (e.CommandName.ToUpper() == "VIEWHISTORY")
    {
        GridViewRow row = (GridViewRow)((ImageButton)e.CommandSource).NamingContainer;
        int index = row.RowIndex;
        string farmername = Convert.ToString(GVTraderdueReport.DataKeys[index].Value);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Open", "window.open('../Reports/viewHatcherysalesdueentry.aspx?name=" + farmername + "', '_blank', 'dependent,resizable=yes,scrollbars=yes,top=0,height=600');", true);
    }
}

I want to update/cancel some columns in this code. why this code is not working in google crome.But it is working fine in IE.what is the problem.please help me any one.
Posted
Updated 16-Oct-13 21:25pm
v2
Comments
Harshil_Raval 17-Oct-13 3:26am    
Which part of code is not working in chrome?
thatraja 17-Oct-13 3:29am    
what's the error?
santhu888 17-Oct-13 3:34am    
iam not getting any error while executing

1 solution

If your "update, cancel buttons are not firing in google crome" then you need to look at the part that Chrome sees: the Client data - not the server code.

Look at the page HTML and Javascript: those are what Chrome sees, not the C# code which never leaves the server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900