Re: datagrid question
From: Eliyahu Goldin (removemeegoldin_at_monarchmed.com)
Date: 10/25/04
- Next message: Scott Allen: "Re: Displying realtime data on asp-page, without sound and refresh"
- Previous message: Scott Allen: "Re: CreateDirectory working inconsistantly from ASP.net"
- In reply to: Mike: "datagrid question"
- Next in thread: Mike: "Re: datagrid question"
- Reply: Mike: "Re: datagrid question"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 25 Oct 2004 16:43:08 +0200
The direction is like this:
On the server use ItemDataBound event to setup client-side onclick event for
every cell of every data row.
In the client-side javascript event handler change the row visual attributes
to make it look selected.
In the same event handler get the row id from one of the cells and store it
in a client-side variable. You can make the column with id invisible by
setting css rule display:none. Don't set column Visible property to false,
it will result in the column not to be sent to the client.
Make a client-side javascript event handler for the "Delete" button. In the
handler get the selected row id from the variable and put it in a hidden
field on the page. Submit the page.
On the server read the row id from the hidden field and delete the row.
Eliyahu
"Mike" <Mike@discussions.microsoft.com> wrote in message
news:2E018042-2B02-4A6F-9211-FBDB1C510BD5@microsoft.com...
> I have a datagrid were i want to allow the user to select a row then click
a
> delete button and delete that row. I do not want to have a button in every
> row, i want 1 button for the delete. How can i 1. select a row (highlight)
> then allow the user to delete the selected row?
>
- Next message: Scott Allen: "Re: Displying realtime data on asp-page, without sound and refresh"
- Previous message: Scott Allen: "Re: CreateDirectory working inconsistantly from ASP.net"
- In reply to: Mike: "datagrid question"
- Next in thread: Mike: "Re: datagrid question"
- Reply: Mike: "Re: datagrid question"
- Messages sorted by: [ date ] [ thread ]