473,721 Members | 2,230 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to capture the delete row event handler in the datagrid?


Hello,

I have one basic simple question. When I have multiple records in the
datagrid as follows:

Code Product 1 Product 2 Product 3
11111 A B C
22222 D E F
33333 G H I
44444 J K L
I want when the user select the third row which holds the following
value: 33333, G, H, and I and presses the Delete key in the keyboard a
prompt message pops up saying: Are you sure you wish to delete record #
3333? If the user selects YES then it deletes that row. I know how to
do the rest what I don't know how to do is catch and trap the delete
key when that row is select to prompt that message. Can anyone help me
please? Thanks in advance.

Jan 11 '07 #1
10 2970
Hello am******@gmail. com,

http://www.syncfusion.com/FAQ/aspnet/WEB_c4c.aspx#q589q
http://www.syncfusion.com/FAQ/aspnet/WEB_c4c.aspx#q587q
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Hello,

I have one basic simple question. When I have multiple records in the
datagrid as follows:

Code Product 1 Product 2 Product 3
11111 A B C
22222 D E F
33333 G H I
44444 J K L
I want when the user select the third row which holds the following
value: 33333, G, H, and I and presses the Delete key in the keyboard a
prompt message pops up saying: Are you sure you wish to delete record
# 3333? If the user selects YES then it deletes that row. I know how
to do the rest what I don't know how to do is catch and trap the
delete key when that row is select to prompt that message. Can anyone
help me please? Thanks in advance.

Jan 11 '07 #2
I am sorry they did not help me at all. According to these two tips I
am suppose to make make my very own subroutine that have the delete
code in it then make a button where it will delete the rows...what I
want is a handler to fire when I highlight a single row and push the
delete button in the keyboard. I know how to do the other one easily
however I don't know how to do this...here is why I need it. We have a
shipping program that sometimes have a complete row with null value,
this causes this program to halt with an error of a null value, we
naturally want to delete that row and upload the inventory in the
server, however in order to do that we must first click the button save
before we upload that. We want to skip that process in such away that
when we delete that row (null values) it automatically saves it so that
we just click one button which is called upload instead of SAVE button
THEN Upload button. How to catch an event handler when the user
highlights that row and pushes the delete button? I have been in that
website and they failed miserably in assisting me in my problem. Can
anyone here help me please? Thanks in advance.

On Jan 11, 11:20 am, Michael Nemtsev <nemt...@msn.co mwrote:
Hello amiga...@gmail. com,

http://www.syncfusion.com/FAQ/aspnet...c4c.aspx#q587q

---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Hello,
I have one basic simple question. When I have multiple records in the
datagrid as follows:
Code Product 1 Product 2 Product 3
11111 A B C
22222 D E F
33333 G H I
44444 J K L
I want when the user select the third row which holds the following
value: 33333, G, H, and I and presses the Delete key in the keyboard a
prompt message pops up saying: Are you sure you wish to delete record
# 3333? If the user selects YES then it deletes that row. I know how
to do the rest what I don't know how to do is catch and trap the
delete key when that row is select to prompt that message. Can anyone
help me please? Thanks in advance.
Jan 11 '07 #3
Thank you for the help but I solved the problem, for people out there
who have failed or stuck in the same predicament this is the answer:

Private Sub DATAGRIDNAMEHER E_PreviewKeyDow n(ByVal sender As Object,
ByVal e As System.Windows. Forms.PreviewKe yDownEventArgs) Handles
dgRATemp.Previe wKeyDown
If e.KeyCode = Keys.Delete Then
.....
End If
End Sub

Jan 11 '07 #4

Right but now I am in a different delima..my boss wants the event to
occure AFTER the row is deleted not before the row is deleted. For
example

Row1: contains value X

When highlight Row1: that contains value X and I press the delete key
and the row is deleted THEN he wants the save to change not save the
change before the value is deleted. How do I do that?
On Jan 11, 11:29 am, amiga...@gmail. com wrote:
I am sorry they did not help me at all. According to these two tips I
am suppose to make make my very own subroutine that have the delete
code in it then make a button where it will delete the rows...what I
want is a handler to fire when I highlight a single row and push the
delete button in the keyboard. I know how to do the other one easily
however I don't know how to do this...here is why I need it. We have a
shipping program that sometimes have a complete row with null value,
this causes this program to halt with an error of a null value, we
naturally want to delete that row and upload the inventory in the
server, however in order to do that we must first click the button save
before we upload that. We want to skip that process in such away that
when we delete that row (null values) it automatically saves it so that
we just click one button which is called upload instead of SAVE button
THEN Upload button. How to catch an event handler when the user
highlights that row and pushes the delete button? I have been in that
website and they failed miserably in assisting me in my problem. Can
anyone here help me please? Thanks in advance.

On Jan 11, 11:20 am, Michael Nemtsev <nemt...@msn.co mwrote:
Hello amiga...@gmail. com,
http://www.syncfusion.com/FAQ/aspnet...http://www.syn...
---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Hello,
I have one basic simple question. When I have multiple records in the
datagrid as follows:
Code Product 1 Product 2 Product 3
11111 A B C
22222 D E F
33333 G H I
44444 J K L
I want when the user select the third row which holds the following
value: 33333, G, H, and I and presses the Delete key in the keyboard a
prompt message pops up saying: Are you sure you wish to delete record
# 3333? If the user selects YES then it deletes that row. I know how
to do the rest what I don't know how to do is catch and trap the
delete key when that row is select to prompt that message. Can anyone
help me please? Thanks in advance.
Jan 11 '07 #5
Hello am******@gmail. com,

Sorry for the wrong info relating to my post - missed your point :)

About post-delete action. Why not to perform your custom tast on DataTable.RowDe leted
event?

---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Right but now I am in a different delima..my boss wants the event to
occure AFTER the row is deleted not before the row is deleted. For
example

Row1: contains value X

When highlight Row1: that contains value X and I press the delete key
and the row is deleted THEN he wants the save to change not save the
change before the value is deleted. How do I do that?

On Jan 11, 11:29 am, amiga...@gmail. com wrote:
>I am sorry they did not help me at all. According to these two tips
I am suppose to make make my very own subroutine that have the delete
code in it then make a button where it will delete the rows...what I
want is a handler to fire when I highlight a single row and push the
delete button in the keyboard. I know how to do the other one easily
however I don't know how to do this...here is why I need it. We have
a shipping program that sometimes have a complete row with null
value, this causes this program to halt with an error of a null
value, we naturally want to delete that row and upload the inventory
in the server, however in order to do that we must first click the
button save before we upload that. We want to skip that process in
such away that when we delete that row (null values) it automatically
saves it so that we just click one button which is called upload
instead of SAVE button THEN Upload button. How to catch an event
handler when the user highlights that row and pushes the delete
button? I have been in that website and they failed miserably in
assisting me in my problem. Can anyone here help me please? Thanks in
advance.

On Jan 11, 11:20 am, Michael Nemtsev <nemt...@msn.co mwrote:
>>Hello amiga...@gmail. com,

http://www.syncfusion.com/FAQ/aspnet...qhttp://www.sy
n...

---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangel o

Hello,

I have one basic simple question. When I have multiple records in
the datagrid as follows:

Code Product 1 Product 2 Product 3
11111 A B C
22222 D E F
33333 G H I
44444 J K L
I want when the user select the third row which holds the following
value: 33333, G, H, and I and presses the Delete key in the
keyboard a
prompt message pops up saying: Are you sure you wish to delete
record
# 3333? If the user selects YES then it deletes that row. I know
how
to do the rest what I don't know how to do is catch and trap the
delete key when that row is select to prompt that message. Can
anyone
help me please? Thanks in advance.

Jan 11 '07 #6
But can this event .RowDeleted be available in the datagrid object? I
am not using datatable, I am using datagrid...two different objects,
no? I did a trick called timer, using my dicovery above I triggered
the timer to be enabled true then after the row deleted the timer
executed what ever code resides there then IMMEDIATLY DISABLED itself
and stopped right away as to not to repeat the code again and again. I
consider this...PLAY around the game or hack your WAY through or be
imaginative..ho wever if there is a more professional way of an approach
it will be greatly appreciate it. I know datagrid is not the same as
datatable, so how do I get the same result from datatable with
datagrid?

On Jan 11, 11:53 am, Michael Nemtsev <nemt...@msn.co mwrote:
Hello amiga...@gmail. com,

Sorry for the wrong info relating to my post - missed your point :)

About post-delete action. Why not to perform your custom tast on DataTable.RowDe leted
event?

---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Right but now I am in a different delima..my boss wants the event to
occure AFTER the row is deleted not before the row is deleted. For
example
Row1: contains value X
When highlight Row1: that contains value X and I press the delete key
and the row is deleted THEN he wants the save to change not save the
change before the value is deleted. How do I do that?
On Jan 11, 11:29 am, amiga...@gmail. com wrote:
I am sorry they did not help me at all. According to these two tips
I am suppose to make make my very own subroutine that have the delete
code in it then make a button where it will delete the rows...what I
want is a handler to fire when I highlight a single row and push the
delete button in the keyboard. I know how to do the other one easily
however I don't know how to do this...here is why I need it. We have
a shipping program that sometimes have a complete row with null
value, this causes this program to halt with an error of a null
value, we naturally want to delete that row and upload the inventory
in the server, however in order to do that we must first click the
button save before we upload that. We want to skip that process in
such away that when we delete that row (null values) it automatically
saves it so that we just click one button which is called upload
instead of SAVE button THEN Upload button. How to catch an event
handler when the user highlights that row and pushes the delete
button? I have been in that website and they failed miserably in
assisting me in my problem. Can anyone here help me please? Thanks in
advance.
On Jan 11, 11:20 am, Michael Nemtsev <nemt...@msn.co mwrote:
>Hello amiga...@gmail. com,
>>http://www.syncfusion.com/FAQ/aspnet...qhttp://www.sy
n...
>---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo
>>Hello,
>>I have one basic simple question. When I have multiple records in
the datagrid as follows:
>>Code Product 1 Product 2 Product 3
11111 A B C
22222 D E F
33333 G H I
44444 J K L
I want when the user select the third row which holds the following
value: 33333, G, H, and I and presses the Delete key in the
keyboard a
prompt message pops up saying: Are you sure you wish to delete
record
# 3333? If the user selects YES then it deletes that row. I know
how
to do the rest what I don't know how to do is catch and trap the
delete key when that row is select to prompt that message. Can
anyone
help me please? Thanks in advance.
Jan 11 '07 #7
I think you can better accomplish this by making use of both the KeyUp event
for the datagrid and the rowdeleted even on the datatable. You wouldn't
need a timer.

Datagrid
OnKeyPress()
If KeyDelete then
If msgbox("Are you sure?") = dialogResult.ye s then
row.delete
DataTable
OnRowDeleted
PerformSave
UpdateDatagrid

If you are not using a datatable, you must be using a list of somesort. The
list either has notification events already, or you can simply add them and
then handle them.

If you are not using a datatable and are binding to a list of object, I
recommend that you use a BindingList. It has all the provisions to do as
you are asking.
<am******@gmail .comwrote in message
news:11******** **************@ i39g2000hsf.goo glegroups.com.. .
But can this event .RowDeleted be available in the datagrid object? I
am not using datatable, I am using datagrid...two different objects,
no? I did a trick called timer, using my dicovery above I triggered
the timer to be enabled true then after the row deleted the timer
executed what ever code resides there then IMMEDIATLY DISABLED itself
and stopped right away as to not to repeat the code again and again. I
consider this...PLAY around the game or hack your WAY through or be
imaginative..ho wever if there is a more professional way of an approach
it will be greatly appreciate it. I know datagrid is not the same as
datatable, so how do I get the same result from datatable with
datagrid?

On Jan 11, 11:53 am, Michael Nemtsev <nemt...@msn.co mwrote:
>Hello amiga...@gmail. com,

Sorry for the wrong info relating to my post - missed your point :)

About post-delete action. Why not to perform your custom tast on
DataTable.RowD eleted
event?

---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and
we
miss it, but that it is too low and we reach it" (c) Michelangelo
Right but now I am in a different delima..my boss wants the event to
occure AFTER the row is deleted not before the row is deleted. For
example
Row1: contains value X
When highlight Row1: that contains value X and I press the delete key
and the row is deleted THEN he wants the save to change not save the
change before the value is deleted. How do I do that?
On Jan 11, 11:29 am, amiga...@gmail. com wrote:
>I am sorry they did not help me at all. According to these two tips
I am suppose to make make my very own subroutine that have the delete
code in it then make a button where it will delete the rows...what I
want is a handler to fire when I highlight a single row and push the
delete button in the keyboard. I know how to do the other one easily
however I don't know how to do this...here is why I need it. We have
a shipping program that sometimes have a complete row with null
value, this causes this program to halt with an error of a null
value, we naturally want to delete that row and upload the inventory
in the server, however in order to do that we must first click the
button save before we upload that. We want to skip that process in
such away that when we delete that row (null values) it automatically
saves it so that we just click one button which is called upload
instead of SAVE button THEN Upload button. How to catch an event
handler when the user highlights that row and pushes the delete
button? I have been in that website and they failed miserably in
assisting me in my problem. Can anyone here help me please? Thanks in
advance.
>On Jan 11, 11:20 am, Michael Nemtsev <nemt...@msn.co mwrote:
>>Hello amiga...@gmail. com,
>>>http://www.syncfusion.com/FAQ/aspnet...qhttp://www.sy
n...
>>---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangel o
>>>Hello,
>>>I have one basic simple question. When I have multiple records in
the datagrid as follows:
>>>Code Product 1 Product 2 Product 3
11111 A B C
22222 D E F
33333 G H I
44444 J K L
I want when the user select the third row which holds the following
value: 33333, G, H, and I and presses the Delete key in the
keyboard a
prompt message pops up saying: Are you sure you wish to delete
record
# 3333? If the user selects YES then it deletes that row. I know
how
to do the rest what I don't know how to do is catch and trap the
delete key when that row is select to prompt that message. Can
anyone
help me please? Thanks in advance.

Jan 11 '07 #8
But I am simply just using datagrid. Really. That is it. Nothing more
complicated then, "I am using a datagrid." So far with datagrid it
doesn't have what you guys are talking about.

On Jan 11, 1:14 pm, "AMDRIT" <amd...@hotmail .comwrote:
I think you can better accomplish this by making use of both the KeyUp event
for the datagrid and the rowdeleted even on the datatable. You wouldn't
need a timer.

Datagrid
OnKeyPress()
If KeyDelete then
If msgbox("Are you sure?") = dialogResult.ye s then
row.delete

DataTable
OnRowDeleted
PerformSave
UpdateDatagrid

If you are not using a datatable, you must be using a list of somesort. The
list either has notification events already, or you can simply add them and
then handle them.

If you are not using a datatable and are binding to a list of object, I
recommend that you use a BindingList. It has all the provisions to do as
you are asking.

<amiga...@gmail .comwrote in messagenews:11* *************** ******@i39g2000 hsf.googlegroup s.com...
But can this event .RowDeleted be available in the datagrid object? I
am not using datatable, I am using datagrid...two different objects,
no? I did a trick called timer, using my dicovery above I triggered
the timer to be enabled true then after the row deleted the timer
executed what ever code resides there then IMMEDIATLY DISABLED itself
and stopped right away as to not to repeat the code again and again. I
consider this...PLAY around the game or hack your WAY through or be
imaginative..ho wever if there is a more professional way of an approach
it will be greatly appreciate it. I know datagrid is not the same as
datatable, so how do I get the same result from datatable with
datagrid?
On Jan 11, 11:53 am, Michael Nemtsev <nemt...@msn.co mwrote:
Hello amiga...@gmail. com,
Sorry for the wrong info relating to my post - missed your point :)
About post-delete action. Why not to perform your custom tast on
DataTable.RowDe leted
event?
---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and
we
miss it, but that it is too low and we reach it" (c) Michelangelo
Right but now I am in a different delima..my boss wants the event to
occure AFTER the row is deleted not before the row is deleted. For
example
Row1: contains value X
When highlight Row1: that contains value X and I press the delete key
and the row is deleted THEN he wants the save to change not save the
change before the value is deleted. How do I do that?
On Jan 11, 11:29 am, amiga...@gmail. com wrote:
I am sorry they did not help me at all. According to these two tips
I am suppose to make make my very own subroutine that have the delete
code in it then make a button where it will delete the rows...what I
want is a handler to fire when I highlight a single row and push the
delete button in the keyboard. I know how to do the other one easily
however I don't know how to do this...here is why I need it. We have
a shipping program that sometimes have a complete row with null
value, this causes this program to halt with an error of a null
value, we naturally want to delete that row and upload the inventory
in the server, however in order to do that we must first click the
button save before we upload that. We want to skip that process in
such away that when we delete that row (null values) it automatically
saves it so that we just click one button which is called upload
instead of SAVE button THEN Upload button. How to catch an event
handler when the user highlights that row and pushes the delete
button? I have been in that website and they failed miserably in
assisting me in my problem. Can anyone here help me please? Thanks in
advance.
On Jan 11, 11:20 am, Michael Nemtsev <nemt...@msn.co mwrote:
>Hello amiga...@gmail. com,
>>http://www.syncfusion.com/FAQ/aspnet...qhttp://www.sy
n...
>---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo
>>Hello,
>>I have one basic simple question. When I have multiple records in
the datagrid as follows:
>>Code Product 1 Product 2 Product 3
11111 A B C
22222 D E F
33333 G H I
44444 J K L
I want when the user select the third row which holds the following
value: 33333, G, H, and I and presses the Delete key in the
keyboard a
prompt message pops up saying: Are you sure you wish to delete
record
# 3333? If the user selects YES then it deletes that row. I know
how
to do the rest what I don't know how to do is catch and trap the
delete key when that row is select to prompt that message. Can
anyone
help me please? Thanks in advance.
Jan 11 '07 #9
Your paradigm is far different from expectations of those of us throwing out
suggestions. No offense. I simply have a question, how do you populate
the datagrid without specifying a datasource, every day is an opportunity to
learn something new. I just do not see any methods for adding rows manually
to the datagrid.
<am******@gmail .comwrote in message
news:11******** **************@ i39g2000hsf.goo glegroups.com.. .
But I am simply just using datagrid. Really. That is it. Nothing more
complicated then, "I am using a datagrid." So far with datagrid it
doesn't have what you guys are talking about.

On Jan 11, 1:14 pm, "AMDRIT" <amd...@hotmail .comwrote:
>I think you can better accomplish this by making use of both the KeyUp
event
for the datagrid and the rowdeleted even on the datatable. You wouldn't
need a timer.

Datagrid
OnKeyPress()
If KeyDelete then
If msgbox("Are you sure?") = dialogResult.ye s then
row.delete

DataTable
OnRowDeleted
PerformSave
UpdateDatagrid

If you are not using a datatable, you must be using a list of somesort.
The
list either has notification events already, or you can simply add them
and
then handle them.

If you are not using a datatable and are binding to a list of object, I
recommend that you use a BindingList. It has all the provisions to do as
you are asking.

<amiga...@gmai l.comwrote in
messagenews:11 *************** *******@i39g200 0hsf.googlegrou ps.com...
But can this event .RowDeleted be available in the datagrid object? I
am not using datatable, I am using datagrid...two different objects,
no? I did a trick called timer, using my dicovery above I triggered
the timer to be enabled true then after the row deleted the timer
executed what ever code resides there then IMMEDIATLY DISABLED itself
and stopped right away as to not to repeat the code again and again. I
consider this...PLAY around the game or hack your WAY through or be
imaginative..ho wever if there is a more professional way of an approach
it will be greatly appreciate it. I know datagrid is not the same as
datatable, so how do I get the same result from datatable with
datagrid?
On Jan 11, 11:53 am, Michael Nemtsev <nemt...@msn.co mwrote:
Hello amiga...@gmail. com,
>Sorry for the wrong info relating to my post - missed your point :)
>About post-delete action. Why not to perform your custom tast on
DataTable.RowD eleted
event?
>---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
>"The greatest danger for most of us is not that our aim is too high
and
we
miss it, but that it is too low and we reach it" (c) Michelangelo
Right but now I am in a different delima..my boss wants the event to
occure AFTER the row is deleted not before the row is deleted. For
example
Row1: contains value X
When highlight Row1: that contains value X and I press the delete
key
and the row is deleted THEN he wants the save to change not save the
change before the value is deleted. How do I do that?
On Jan 11, 11:29 am, amiga...@gmail. com wrote:
>I am sorry they did not help me at all. According to these two
tips
I am suppose to make make my very own subroutine that have the
delete
code in it then make a button where it will delete the rows...what
I
want is a handler to fire when I highlight a single row and push
the
delete button in the keyboard. I know how to do the other one
easily
however I don't know how to do this...here is why I need it. We
have
a shipping program that sometimes have a complete row with null
value, this causes this program to halt with an error of a null
value, we naturally want to delete that row and upload the
inventory
in the server, however in order to do that we must first click the
button save before we upload that. We want to skip that process in
such away that when we delete that row (null values) it
automaticall y
saves it so that we just click one button which is called upload
instead of SAVE button THEN Upload button. How to catch an event
handler when the user highlights that row and pushes the delete
button? I have been in that website and they failed miserably in
assisting me in my problem. Can anyone here help me please? Thanks
in
advance.
>On Jan 11, 11:20 am, Michael Nemtsev <nemt...@msn.co mwrote:
>>Hello amiga...@gmail. com,
>>>http://www.syncfusion.com/FAQ/aspnet...qhttp://www.sy
n...
>>---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too
high
and we miss it, but that it is too low and we reach it" (c)
Michelangel o
>>>Hello,
>>>I have one basic simple question. When I have multiple records in
the datagrid as follows:
>>>Code Product 1 Product 2 Product 3
11111 A B C
22222 D E F
33333 G H I
44444 J K L
I want when the user select the third row which holds the
following
value: 33333, G, H, and I and presses the Delete key in the
keyboard a
prompt message pops up saying: Are you sure you wish to delete
record
# 3333? If the user selects YES then it deletes that row. I know
how
to do the rest what I don't know how to do is catch and trap the
delete key when that row is select to prompt that message. Can
anyone
help me please? Thanks in advance.

Jan 11 '07 #10

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

Similar topics

0
1938
by: Richard Payne | last post by:
I am developing a web application that utilises multiple grids, panels, validation controls etc on the same page. I have added the appropriate code to pop up dialogs to confirm delete in datagrids using the ItemCreated event, template colums and the Button.Attributes.Add ("onclick", "return confirm('Are you sure you wish to delete this row?');"). This works fine in some instances when you click on the delete button but not always.
0
2322
by: Richard Payne | last post by:
I am developing a web application that utilises multiple grids, panels, validation controls etc on the same page. I have added the appropriate code to pop up dialogs to confirm delete in datagrids using the ItemCreated event, template colums and the Button.Attributes.Add ("onclick", "return confirm('Are you sure you wish to delete this row?');"). This works fine in some instances when you click on the delete button but not always.
4
3901
by: Stephen | last post by:
I have got an event below to remove items from an arraylist and then to rebind the arraylist to the datagrid subsequently deleting the appropriate row. My problem is that my code makes sense and I think my logic seems fine but when I click the button on my datagrid nothing seems to happen. Have you any idea where Im going wrong. Was thinking it might have something to do with my page load/ postback but not really sure. Can someone please...
1
2702
by: ywchan | last post by:
I would like to have a datagrid that can be edited but not delete... and I have no idea how to capture the del key press event. Please help, thank!
7
1508
by: Rémi | last post by:
Hello. I have just gotten a client-side delete confirmation Javascript button to work, using this FAQ question as a basis (3rd question down, URL <http://www.wintellect.com/resources/faqs/default.aspx?faq_id=1&page=5>. I've no trouble with how this all works, but there's one thing I don't quite get. In the DataGrid's ItemCreated event, I attach a small bit of Javascript code to the onClick attribute, via the button's Attributes...
7
3919
by: DanB | last post by:
I want to asked the user if he is sure before deleting a row in a datagrid. I've created an event handler for the underlying table using the RowDeleting Event. If the user responds that he does not want to delete the row then I think I am supposed to throw an exception. But the rowstate is changed to deleted anyway. I thought throwing the exception would prevent this.
3
13896
by: Melson | last post by:
hi can anyone help me how can i capture ENTER keystroke when the cell in datagrid is in editing mode. I'm now creating a data entry form with primary key in header and details in datagrid. So when user key in the details in datagrid, I would like user to choose product code by pressing ENTER key in the datagrid and a Product Code dialog will appear for him to choose.
4
9696
by: drakuu | last post by:
Hello there, I have DataGrid with some records and I would like to edit it right in the datagrid using the built in commands. I can't figure out a way to pass to the SQL query the record ID which I'm editing. SELECT: SelectCommand="SELECT ProviderID, AddressID, Address, Address2, City, State, County, Zip FROM ProviderAddress WHERE (ProviderID = @ProviderID)"
0
1232
by: crferguson | last post by:
I've been looking in every place I can to find a solution for this and I believe I've pieced a solid one together so I thought I'd share since I've found so much help on these groups... This is for winforms only as I haven't tried anything like this in ASP... - I've added a boolean property to the form in the General Declarations section:
0
9376
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9230
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8026
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6678
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5994
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4499
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2596
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2146
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.