473,411 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Datagrid EditCommandButton CausesValidation

Having an issue with the datagrid.... Instead of actually updating everytime
someone selects update in the datagrid, I am currently writing an XML file on
the server that consists of the datagrid changes, to which, when the "Submit"
button is selected it will then do the update (including the XML file). The
problem is that the EditCommandButton->Update does the "causesValidation".
The Cancel and Edit do not. Therefore, when update is selected, the entire
form goes through the CausesValidation Process, which I don't want.
Suggestions?

<asp:EditCommandColumn HeaderText="Edit" ButtonType="LinkButton"
UpdateText="Update" CancelText="Cancel" EditText="Edit">
</asp:EditCommandColumn>
Nov 21 '05 #1
1 1721
RESOLVED!!!!

Private Sub MyDataGrid_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
MyDataGrid.ItemCreated

If e.Item.ItemType = ListItemType.EditItem Then

Dim lnkUpdate As LinkButton = CType(e.Item.Cells(4).Controls(0),
LinkButton)
lnkUpdate.CausesValidation = False

End If
End Sub

"sakieboy" wrote:
Having an issue with the datagrid.... Instead of actually updating everytime
someone selects update in the datagrid, I am currently writing an XML file on
the server that consists of the datagrid changes, to which, when the "Submit"
button is selected it will then do the update (including the XML file). The
problem is that the EditCommandButton->Update does the "causesValidation".
The Cancel and Edit do not. Therefore, when update is selected, the entire
form goes through the CausesValidation Process, which I don't want.
Suggestions?

<asp:EditCommandColumn HeaderText="Edit" ButtonType="LinkButton"
UpdateText="Update" CancelText="Cancel" EditText="Edit">
</asp:EditCommandColumn>

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Shane O. Pinnell | last post by:
I am sure this has come up before, but I haven't been able to find an answer as of yet. That said, any help is definitely appreciated! I have a datagrid populated from a dataset. I have a...
3
by: ALPO | last post by:
We have a datagrid built using template columns. Many are text boxes. These text boxes are bound to a datasource as follows: <ItemTemplate> <asp:TextBox id="txtPeriod1" runat="server"...
1
by: Steve Black | last post by:
Hello, I am trying to add an EditCommand Button to a datagrid. If I programmatically add the button, like this: Dim eb As EditCommandColumn eb = New EditCommandColumn With eb .ButtonType...
4
by: Luis Esteban Valencia | last post by:
I have a asp.net page (C#), with a datagrid. I use template for all columns, and have <asp:requiredfieldvalidator> in with one of the textboxes, to make sure it's filled in. However, this...
9
by: A P | last post by:
Hi! I have created a sample datagrid that can update data on a database. Please help me solve the problem, I have attached both aspx and code behind (aspx.vb): ______________________ ...
2
by: George Durzi | last post by:
I have to LinkButtons in a DataGrid, and each of them has a Command="Select" attribute set up. When either of hte LinkButton's is clicked, I want the proper row in the DataGrid to be selected, but...
4
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are...
1
by: Stu | last post by:
Hi, I have a button in the footer of a datagrid that sometimes does not tigger the item command. The page is quite large & has a number of homegrown controls in it. Has anyone come across this...
5
by: Tina | last post by:
the Edit, Update, Cancel, and Delete buttons in my datagrid are causing validation elsewhere on the page. I want to specify that these buttons should not cause validation but they have no design...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.