Solved

canceling edit in a gridview

Posted on 2014-10-03
1
104 Views
Last Modified: 2014-10-09
when I use the following code the message triggers then the gridview simply disappears.
does any know why this would happen,  I assumed the row would just go back to edit

thanks
gary

 Protected Sub Customer_RowCancelingEdit(ByVal sender As Object, ByVal e As GridViewCancelEditEventArgs)
       
        Dim row As GridViewRow = CustomersGridView.Rows(e.RowIndex)
        Message.Text = "Edit cancelled! No records saved." & e.RowIndex

        'Reset the edit index.
        CustomersGridView.EditIndex = -1
        'Bind data to the GridView control.
        CustomersGridView.DataBind()
       

    End Sub
0
Comment
Question by:javagair
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 40361562
If the grid disappears, it is because there is no data to bind to.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now