Can anyone answer this question:
How can I disable validation when edit column update button is pressed. Can
it be done for the whole grid?
Regards,
Robert 4 2543
If I'm not mistaken, in the XML definition for the grid, you can set the
CausesValidation = False for the button/imagebutton.
HTH,
Morgan
"RobS" <ro******@excite.com> wrote in message
news:uw**************@TK2MSFTNGP09.phx.gbl... Can anyone answer this question:
How can I disable validation when edit column update button is pressed.
Can it be done for the whole grid?
Regards,
Robert
Morgan,
Thanks for your response.
Setting CausesValidation to true works for most of asp.net controls, but
grid seems to be one of the exceptions here, unless I use hand made buttons
or image buttons. Unfortunatelly, using my own buttons for the grid edits is
my last choice, sincer it would require lots of re-coding to handle edits,
cancels and updates. I'd rather get rid of all .net validators once for all.
I am getting tired of them anyway. lol.
Or ... am I missing something?
Regards,
Robert
The problem is that in definition of EditCommandColumn for the grid, there
is no place you can put CausesValidation attribute. Or I am missing
something?
"Morgan" <mf****@spamcop.net> wrote in message
news:OO**************@TK2MSFTNGP11.phx.gbl... If I'm not mistaken, in the XML definition for the grid, you can set the CausesValidation = False for the button/imagebutton.
HTH, Morgan
"RobS" <ro******@excite.com> wrote in message news:uw**************@TK2MSFTNGP09.phx.gbl... Can anyone answer this question:
How can I disable validation when edit column update button is pressed. Can it be done for the whole grid?
Regards,
Robert
Hi Rob,
The EditCommandColumn includes a collection of its child controls in the
Controls property. The buttons are in there.
For example:
Button vButton = (Button) EditCommandColumn1.Controls[0];
vButton.CausesValidation = false;
You wrote: "I'd rather get rid of all .net validators once for all."
Did you know that there are replacements for Microsoft's validators? I sell
a commercial product, "Professional Validation And More", that overcomes the
limitations of Microsoft's validators and greatly expands what you can do.
Some of its features are 17 validators, group validation, client-side
support on many browsers, new ways to get the user's attention and format
the error message, and a client-side toolkit to make more interactive web
forms. Details are at http://www.peterblum.com/vam/home.aspx.
--- Peter Blum www.PeterBlum.com
Email: PL****@PeterBlum.com
"RobS" <ro******@excite.com> wrote in message
news:Ob**************@TK2MSFTNGP10.phx.gbl... Morgan,
Thanks for your response.
Setting CausesValidation to true works for most of asp.net controls, but grid seems to be one of the exceptions here, unless I use hand made
buttons or image buttons. Unfortunatelly, using my own buttons for the grid edits
is my last choice, sincer it would require lots of re-coding to handle edits, cancels and updates. I'd rather get rid of all .net validators once for
all. I am getting tired of them anyway. lol. Or ... am I missing something?
Regards,
Robert The problem is that in definition of EditCommandColumn for the grid,
there is no place you can put CausesValidation attribute. Or I am missing something? "Morgan" <mf****@spamcop.net> wrote in message news:OO**************@TK2MSFTNGP11.phx.gbl... If I'm not mistaken, in the XML definition for the grid, you can set the CausesValidation = False for the button/imagebutton.
HTH, Morgan
"RobS" <ro******@excite.com> wrote in message news:uw**************@TK2MSFTNGP09.phx.gbl... Can anyone answer this question:
How can I disable validation when edit column update button is
pressed. Can it be done for the whole grid?
Regards,
Robert
My earlier answer is incorrect. The EditCommandColumn class is not
subclassed from WebControl. So it doesn't have a Controls collection.
Here's a correction. Set up the ItemCreated event on DataGrid. Inside it,
you have access to the current row in e.Items. It is actually the TableRow
class, with its Cells containing the controls. Identify the column number
containing the EditCommandColumn. Then do this (shown in C#):
TableCell vCell = e.Item.Cells[column number]; // column numbers start at
0
if (vCell.Controls.Count > 0)
((Button)vCell.Controls[0]).CausesValidation = false;
--- Peter Blum www.PeterBlum.com
Email: PL****@PeterBlum.com
"Peter Blum" <PL****@Blum.info> wrote in message
news:Ov**************@TK2MSFTNGP09.phx.gbl... Hi Rob,
The EditCommandColumn includes a collection of its child controls in the Controls property. The buttons are in there. For example: Button vButton = (Button) EditCommandColumn1.Controls[0]; vButton.CausesValidation = false;
You wrote: "I'd rather get rid of all .net validators once for all." Did you know that there are replacements for Microsoft's validators? I
sell a commercial product, "Professional Validation And More", that overcomes
the limitations of Microsoft's validators and greatly expands what you can do. Some of its features are 17 validators, group validation, client-side support on many browsers, new ways to get the user's attention and format the error message, and a client-side toolkit to make more interactive web forms. Details are at http://www.peterblum.com/vam/home.aspx.
--- Peter Blum www.PeterBlum.com Email: PL****@PeterBlum.com
"RobS" <ro******@excite.com> wrote in message news:Ob**************@TK2MSFTNGP10.phx.gbl... Morgan,
Thanks for your response.
Setting CausesValidation to true works for most of asp.net controls, but grid seems to be one of the exceptions here, unless I use hand made buttons or image buttons. Unfortunatelly, using my own buttons for the grid
edits is my last choice, sincer it would require lots of re-coding to handle
edits, cancels and updates. I'd rather get rid of all .net validators once for all. I am getting tired of them anyway. lol. Or ... am I missing something?
Regards,
Robert The problem is that in definition of EditCommandColumn for the grid, there is no place you can put CausesValidation attribute. Or I am missing something? "Morgan" <mf****@spamcop.net> wrote in message news:OO**************@TK2MSFTNGP11.phx.gbl... If I'm not mistaken, in the XML definition for the grid, you can set
the CausesValidation = False for the button/imagebutton.
HTH, Morgan
"RobS" <ro******@excite.com> wrote in message news:uw**************@TK2MSFTNGP09.phx.gbl... > Can anyone answer this question: > > How can I disable validation when edit column update button is pressed. Can > it be done for the whole grid? > > Regards, > > Robert > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rick |
last post by:
Hello all, I hope all is well with you.
I am having a seriously difficult time with this problem. Allow me to
set
up the problem.
I have a System.Web.UI.Page with the following controls...
|
by: angus |
last post by:
Dear All,
I am using VB.net
It is found that the <asp:EditCommandColumn/> wouldn't fired an event for
OnEditCommand
If pushbutton has been used:
that is:
|
by: Chris |
last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a
datagrid I utilize the footer to create the 'add' row. The only issue is that
I have it sharing the 'UpDate_Command' and...
|
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...
|
by: Sourav Dutta Gupta |
last post by:
I want to change the "scr" like src='images/Edit.ICO' to
src='images/XYZ.ICO' dynamically based on some condition.
My EditCommandColumn:
<asp:EditCommandColumn ButtonType="LinkButton"...
|
by: slemen |
last post by:
Hi,
The asp:EditCommandColumn template does not fire the _edit sutboutine
when the edit command column buttons are clicked. I get a Page Cannot Be
Displayed page error instead.
My (ASP 1.1)...
|
by: Matt |
last post by:
I have a simple datagrid that shows configuration properties as Name : Value
pairs. I want to be able to programmatically change the validation controls
that apply based on the name field of the...
|
by: Ian |
last post by:
Hi
I have used the following code to essentially late bind an EditCommandColumn
to my datagrid in ASP.NET.
EditCommandColumn ec = new EditCommandColumn();
ec.ButtonType =...
|
by: raam |
last post by:
Hi,
I have ajax tab container with 6 tabs in it.
I need to validate each tab contents separately and the validtaion summary must be separate for each tab.
i cannot do that only one summary is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |