Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Toby Riley #1
Datagrid Row Selection
Any ideas on how i would select a row from a datagrid using a mouse click
event on the row. I need to set the selectedindex. I using the following
code to create a rollover as the mouse moves through the rows. All I need is
the bit to make the onclick event work.
Private Sub dgUserList_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgUserList.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onmouseover",
"this.style.backgroundColor='Silver'")
e.Item.Attributes.Add("onmouseout",
"this.style.backgroundColor='white'")
End If
End Sub
Thanks in advance
Toby
Toby Riley Guest
-
DataGrid, selection and filtering
Like a lot of developers I've recently moved from Flex 2 to Flex 3. I've noticed a bit of a change in how the DataGrid/List classes deal with... -
Datagrid selection and rollOver effects
I see that I can set the selectionColor and rollOverColor, but is there a way to make selection and rollover use borders instead? My rows are color... -
Datagrid: single cell selection
Did anyone ever reply to this question yet? Please do if you know. Thanks. -
selection of fields in datatable for Datagrid
I'd like my Datagrid shows only some columns in the datatable(I'd like to change the name of some columns too) How can I do that? Thanks for... -
--- Multiple Selection, with Paging in the Datagrid ---
Hi, Hard work but possible. You need to keep internal data (add fields to row data) on the server to track the selected rows. Natty Gur, CTO... -
Saravana [MVP] #2
Re: Datagrid Row Selection
Check out this article,
[url]http://www.microsoft.com/india/msdn/articles/Master%20Detail%20DataGrid.aspx[/url]
--
Saravana
Microsoft MVP - ASP.NET
[url]www.extremeexperts.com[/url]
"Toby Riley" <toby.riley@exmlsystems.com> wrote in message
news:#n2EUVQjDHA.2512@TK2MSFTNGP11.phx.gbl...is> Any ideas on how i would select a row from a datagrid using a mouse click
> event on the row. I need to set the selectedindex. I using the following
> code to create a rollover as the mouse moves through the rows. All I need> the bit to make the onclick event work.
>
> Private Sub dgUserList_ItemDataBound(ByVal sender As Object, ByVal e As
> System.Web.UI.WebControls.DataGridItemEventArgs) Handles
> dgUserList.ItemDataBound
>
> If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
> ListItemType.AlternatingItem Then
> e.Item.Attributes.Add("onmouseover",
> "this.style.backgroundColor='Silver'")
> e.Item.Attributes.Add("onmouseout",
> "this.style.backgroundColor='white'")
> End If
>
> End Sub
>
> Thanks in advance
>
> Toby
>
>
Saravana [MVP] Guest
-
Shapper #3
Datagrid Row Selection
Hello,
I have a datagrid in my aspx page and the function Get_This() in my
code.
I am trying to do the following:
1. When the mouse clicks anywhere inside a datagrid's row the function
Get_This is called.
2. In the function Get_This the record ID of the selected row should be
available.
Is this possible?
How can I do this?
Thanks,
Miguel
Shapper Guest



Reply With Quote

