473,326 Members | 2,182 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,326 software developers and data experts.

why <asp:ButtonColumn> for datagrid doesn't have CausesValidation property like <asp:Button>

Hi,

I'm having an aspx page with a server form.

i have a grid with a delete button and below the grid, another area with
inputs for inserting new values and an "add" button for submiting the lower
area of the form.

on the lower area i have validators for validating input.

my problem is that when the delete button is pressed on a grid item, the
validators fails for invalid input.
all i need to do now is to set the delete button of the grid to not cause
validation ( CausesValidation =False ) , but this property is not there and
i get compilation error if i try to set this property.

how can i get this page to work, and wouldn't you expect the
<asp:ButtonColumn> of the datagrid to have the CausesValidation property
like the regular <asp:Button> that it mimics (not to say inherits - the
sacred word) it's behavior.

TIA, z..

Nov 18 '05 #1
4 2265
why don't you use
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit" CauseValidation="False"
Text="Delete" CommandName="DeleteItem"/>
</ItemTemplate>
</asp:TemplateColumn>
or

<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit" CauseValidation="False"
Text='<%# DataBinder.Eval(Container.DataItem, "YourColumn")%>'
CommandName="DeleteItem"/>
</ItemTemplate>
</asp:TemplateColumn>
Regrads
Martin

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:#j**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm having an aspx page with a server form.

i have a grid with a delete button and below the grid, another area with
inputs for inserting new values and an "add" button for submiting the lower area of the form.

on the lower area i have validators for validating input.

my problem is that when the delete button is pressed on a grid item, the
validators fails for invalid input.
all i need to do now is to set the delete button of the grid to not cause
validation ( CausesValidation =False ) , but this property is not there and i get compilation error if i try to set this property.

how can i get this page to work, and wouldn't you expect the
<asp:ButtonColumn> of the datagrid to have the CausesValidation property
like the regular <asp:Button> that it mimics (not to say inherits - the
sacred word) it's behavior.

TIA, z..

Nov 18 '05 #2
well, i guess that the dot-net gods don't like your suggestion,
the first gets the page to the browser, but validation upon submit is done,
so i can't continue.
(i tried to put the button definition in the code behind so it might help -
but no)

the second get's a run time compilation error - the error is : The server
tag is not well formed, and when the <%%> tags are removed it does get to
the client, but of-course it's not enough.


"Martin Marinov" <me********@mecrossroad.bg> wrote in message
news:uD****************@TK2MSFTNGP10.phx.gbl...
why don't you use
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit" CauseValidation="False"
Text="Delete" CommandName="DeleteItem"/>
</ItemTemplate>
</asp:TemplateColumn>
or

<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit" CauseValidation="False"
Text='<%# DataBinder.Eval(Container.DataItem, "YourColumn")%>'
CommandName="DeleteItem"/>
</ItemTemplate>
</asp:TemplateColumn>
Regrads
Martin

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:#j**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm having an aspx page with a server form.

i have a grid with a delete button and below the grid, another area with
inputs for inserting new values and an "add" button for submiting the

lower
area of the form.

on the lower area i have validators for validating input.

my problem is that when the delete button is pressed on a grid item, the
validators fails for invalid input.
all i need to do now is to set the delete button of the grid to not cause validation ( CausesValidation =False ) , but this property is not there

and
i get compilation error if i try to set this property.

how can i get this page to work, and wouldn't you expect the
<asp:ButtonColumn> of the datagrid to have the CausesValidation property
like the regular <asp:Button> that it mimics (not to say inherits - the
sacred word) it's behavior.

TIA, z..


Nov 18 '05 #3
Actually i can not understand why the first example is not working :( it is
strange to me
about the second suggestion - excuse my but i've made a typo and put '
instead of " before the btnSubmit
and aslo you can try this

<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit" CauseValidation="false"
CommandName="DeleteItem" > <%# DataBinder.Eval(Container.DataItem,
"YourColumn")%> </asp:Button>
</ItemTemplate>
</asp:TemplateColumn>
Regards
Martin
"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:us**************@TK2MSFTNGP09.phx.gbl...
well, i guess that the dot-net gods don't like your suggestion,
the first gets the page to the browser, but validation upon submit is done, so i can't continue.
(i tried to put the button definition in the code behind so it might help - but no)

the second get's a run time compilation error - the error is : The server
tag is not well formed, and when the <%%> tags are removed it does get to
the client, but of-course it's not enough.


"Martin Marinov" <me********@mecrossroad.bg> wrote in message
news:uD****************@TK2MSFTNGP10.phx.gbl...
why don't you use
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit" CauseValidation="False"
Text="Delete" CommandName="DeleteItem"/>
</ItemTemplate>
</asp:TemplateColumn>
or

<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit" CauseValidation="False" Text='<%# DataBinder.Eval(Container.DataItem, "YourColumn")%>'
CommandName="DeleteItem"/>
</ItemTemplate>
</asp:TemplateColumn>
Regrads
Martin

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:#j**************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm having an aspx page with a server form.

i have a grid with a delete button and below the grid, another area with inputs for inserting new values and an "add" button for submiting the

lower
area of the form.

on the lower area i have validators for validating input.

my problem is that when the delete button is pressed on a grid item, the validators fails for invalid input.
all i need to do now is to set the delete button of the grid to not cause validation ( CausesValidation =False ) , but this property is not there and
i get compilation error if i try to set this property.

how can i get this page to work, and wouldn't you expect the
<asp:ButtonColumn> of the datagrid to have the CausesValidation

property like the regular <asp:Button> that it mimics (not to say inherits - the sacred word) it's behavior.

TIA, z..



Nov 18 '05 #4
man,

you can not put <%%> server tags inside a server control - please try to run
your example before posting.

"Martin Marinov" <me********@mecrossroad.bg> wrote in message
news:OK**************@tk2msftngp13.phx.gbl...
Actually i can not understand why the first example is not working :( it is strange to me
about the second suggestion - excuse my but i've made a typo and put '
instead of " before the btnSubmit
and aslo you can try this

<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit" CauseValidation="false"
CommandName="DeleteItem" > <%# DataBinder.Eval(Container.DataItem,
"YourColumn")%> </asp:Button>
</ItemTemplate>
</asp:TemplateColumn>
Regards
Martin
"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:us**************@TK2MSFTNGP09.phx.gbl...
well, i guess that the dot-net gods don't like your suggestion,
the first gets the page to the browser, but validation upon submit is

done,
so i can't continue.
(i tried to put the button definition in the code behind so it might

help -
but no)

the second get's a run time compilation error - the error is : The server
tag is not well formed, and when the <%%> tags are removed it does get to the client, but of-course it's not enough.


"Martin Marinov" <me********@mecrossroad.bg> wrote in message
news:uD****************@TK2MSFTNGP10.phx.gbl...
why don't you use
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit"

CauseValidation="False" Text="Delete" CommandName="DeleteItem"/>
</ItemTemplate>
</asp:TemplateColumn>
or

<asp:TemplateColumn>
<ItemTemplate>
<asp:Button runat="server" id='btnSubmit" CauseValidation="False" Text='<%# DataBinder.Eval(Container.DataItem, "YourColumn")%>'
CommandName="DeleteItem"/>
</ItemTemplate>
</asp:TemplateColumn>
Regrads
Martin

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:#j**************@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I'm having an aspx page with a server form.
>
> i have a grid with a delete button and below the grid, another area with > inputs for inserting new values and an "add" button for submiting the lower
> area of the form.
>
> on the lower area i have validators for validating input.
>
> my problem is that when the delete button is pressed on a grid item, the > validators fails for invalid input.
> all i need to do now is to set the delete button of the grid to not

cause
> validation ( CausesValidation =False ) , but this property is not there and
> i get compilation error if i try to set this property.
>
> how can i get this page to work, and wouldn't you expect the
> <asp:ButtonColumn> of the datagrid to have the CausesValidation property > like the regular <asp:Button> that it mimics (not to say inherits - the > sacred word) it's behavior.
>
> TIA, z..
>
>
>



Nov 18 '05 #5

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

Similar topics

0
by: Sjaakie Helderhorst | last post by:
Hi, Somehow pushing an image-button doesn't trigger the CompareValidator, resulting in errors when entering string characters. Could someone please tell me what I did wrong? Thanks in advance!...
6
by: z. f. | last post by:
Hi, i have a datagrid with a delete button for each row in the grid. when the delete button is clicked i need to ask the user in a "confirm" message box if he's sure he wants to delete. the...
4
by: z. f. | last post by:
Hi, i stated that this is an advanced question because i have a post from few days ago that i received answers to with suggestions that looked good but did not work, so please if you post a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.