Click here to Skip to main content
15,912,578 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to execute server side code on browser back button.... Pin
sashidhar4-Oct-09 20:14
sashidhar4-Oct-09 20:14 
GeneralRe: How to execute server side code on browser back button.... Pin
yrishi4-Oct-09 20:24
yrishi4-Oct-09 20:24 
GeneralRe: How to execute server side code on browser back button.... Pin
Manas Bhardwaj4-Oct-09 20:27
professionalManas Bhardwaj4-Oct-09 20:27 
GeneralRe: How to execute server side code on browser back button.... Pin
yrishi4-Oct-09 20:29
yrishi4-Oct-09 20:29 
QuestionHow to get the all ajax control while those are not present in tool box. Pin
rinku soni 234-Oct-09 19:52
rinku soni 234-Oct-09 19:52 
AnswerRe: How to get the all ajax control while those are not present in tool box. Pin
Christian Graus4-Oct-09 19:56
protectorChristian Graus4-Oct-09 19:56 
AnswerRe: How to get the all ajax control while those are not present in tool box. Pin
sashidhar4-Oct-09 20:05
sashidhar4-Oct-09 20:05 
QuestionGridview Updating Event Not Firing in Production! Pin
DigiOz Multimedia4-Oct-09 12:36
DigiOz Multimedia4-Oct-09 12:36 
Hello All,

I have a Gridview control that is working on my development machine, but in Production (Win 2003 Server) the Updating Event is not firing after the Edited Values have been changed and the user clicks on the "Update" link (Auto Generated). Does anyone see anything that may be preventing the "_Updating" event from firing?

<code>&lt;asp:GridView ID="gvRate" runat="server" AllowPaging="true" AutoGenerateColumns="false"
                              AllowSorting="true" OnPageIndexChanging="gvRate_PageIndexChanging" OnSorting="gvRate_Sorting"
                              EmptyDataText="No Data Found" CssClass="StyleSheet.css" PageSize="50" OnSelectedIndexChanged="gvRate_SelectedIndexChanged"
                              DataKeyNames="RateMasterId" ShowFooter="true" OnRowCommand="gvRate_RowCommand"
                              Width="100%" CellPadding="2" HeaderStyle-Font-Bold="true"
                              OnRowEditing="gvRate_RowEditing"
                              OnRowCancelingEdit="gvRate_RowCancelingEdit"
                              OnRowUpdating="gvRate_RowUpdating"
                              OnRowDataBound="gvRate_RowDataBound"
                              OnRowDeleting="gvRate_RowDeleting"
<!-- Rest of the Templates -->
</asp:GridView></code>

Here is what the code behind looks like:

<code>protected void Page_Load(object sender, EventArgs e)
{
            if (!this.IsPostBack)
            {
                  GridDataBind();
            }
}

public void GridDataBind()
{
            ObjectManager loObjectManager = new ObjectManager();
        
            DataTable dt = loObjectManager.GetObject().Tables[0];
            gvRate.DataSource = dt;
            gvRate.DataBind();
}

protected void gvRate_RowEditing(object sender, GridViewEditEventArgs e)
{
     gvRate.EditIndex = e.NewEditIndex;
     GridDataBind();
}

protected void gvRate_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
     gvRate.EditIndex = -1;
     GridDataBind();
}

protected void gvRate_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
     int liIndex = e.RowIndex;
     Label lblMasterRateId = (Label)gvRate.Rows[liIndex].FindControl("lblRateMasterId");

     // Delete the record
     ObjectManager loObjectManager = new ObjectManager();
     loObjectManager.DeleteRate(Convert.ToInt32(lblMasterRateId.Text));

     Response.Redirect(BuildURLParameters());
}

protected void gvRate_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
     // Update Logic Here
}

protected void gvRate_RowDataBound(object sender, GridViewRowEventArgs e)
{
     // Populates a Combo Box Items
}

protected void gvRate_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
     DataTable dataTable = gvRate.DataSource as DataTable;
     gvRate.DataSource = SortDataTable(dataTable, true);
     gvRate.PageIndex = e.NewPageIndex;
     gvRate.DataBind();
}

protected void gvRate_Sorting(object sender, GridViewSortEventArgs e)
{
     GridViewSortExpression = e.SortExpression;
     int pageIndex = gvRate.PageIndex;
     DataTable dataTable = gvRate.DataSource as DataTable;
     gvRate.DataSource = SortDataTable(dataTable, false);
     gvRate.DataBind();
     gvRate.PageIndex = pageIndex;
}

protected void gvRate_SelectedIndexChanged(object sender, EventArgs e)
{

}</code>

Thanks,

Pete Soheil
DigiOz Multimedia
http://www.digioz.com

AnswerRe: Gridview Updating Event Not Firing in Production! Pin
Christian Graus4-Oct-09 13:03
protectorChristian Graus4-Oct-09 13:03 
GeneralRe: Gridview Updating Event Not Firing in Production! Pin
DigiOz Multimedia4-Oct-09 13:12
DigiOz Multimedia4-Oct-09 13:12 
GeneralRe: Gridview Updating Event Not Firing in Production! Pin
Christian Graus4-Oct-09 13:25
protectorChristian Graus4-Oct-09 13:25 
GeneralRe: Gridview Updating Event Not Firing in Production! Pin
DigiOz Multimedia4-Oct-09 13:48
DigiOz Multimedia4-Oct-09 13:48 
AnswerRe: Gridview Updating Event Not Firing in Production! Pin
banker_kiran4-Oct-09 20:13
banker_kiran4-Oct-09 20:13 
QuestionGet client username Pin
_Madmatt4-Oct-09 7:45
_Madmatt4-Oct-09 7:45 
AnswerRe: Get client username Pin
Manas Bhardwaj4-Oct-09 7:51
professionalManas Bhardwaj4-Oct-09 7:51 
GeneralRe: Get client username Pin
_Madmatt4-Oct-09 7:54
_Madmatt4-Oct-09 7:54 
GeneralRe: Get client username Pin
Manas Bhardwaj4-Oct-09 8:26
professionalManas Bhardwaj4-Oct-09 8:26 
GeneralRe: Get client username Pin
_Madmatt4-Oct-09 8:34
_Madmatt4-Oct-09 8:34 
GeneralRe: Get client username Pin
Manas Bhardwaj4-Oct-09 8:39
professionalManas Bhardwaj4-Oct-09 8:39 
GeneralRe: Get client username Pin
_Madmatt4-Oct-09 8:46
_Madmatt4-Oct-09 8:46 
GeneralRe: Get client username Pin
Manas Bhardwaj4-Oct-09 8:53
professionalManas Bhardwaj4-Oct-09 8:53 
GeneralRe: Get client username Pin
_Madmatt4-Oct-09 8:56
_Madmatt4-Oct-09 8:56 
GeneralRe: Get client username Pin
Manas Bhardwaj4-Oct-09 9:05
professionalManas Bhardwaj4-Oct-09 9:05 
GeneralRe: Get client username Pin
_Madmatt4-Oct-09 9:14
_Madmatt4-Oct-09 9:14 
Questionabout media player Pin
leone4-Oct-09 6:08
leone4-Oct-09 6:08 

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.