| Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development | Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
| Author | Forum: PowerWEB LiveControls for ASP.NET Topic: LiveDataGrid Select Row Highlighting |
| giovanni.gomez ggomez@alum.syracuse.edu From: Orlando, FL USA Posts: 52 Member Since: 07/06/05 |
posted February 7, 2007 1:10 PM I'm using a LiveDataGrid (1.6.0.0) and I want to highlight the entire row when a user clicks on a row. The code works if I use a regular DataGrid. Here is a sample datagrid: <cc1:LiveDataGrid ID="dgTest" runat="server" BorderColor="#000080" BorderWidth="2px" AutoGenerateColumns="false" Width="100%"> <HeaderStyle HorizontalAlign="center" ForeColor="#ffffff" BackColor="#000080" Font-Bold="true" /> <ItemStyle BackColor="#ffffe0" /> <AlternatingItemStyle BackColor="#ffffff" /> <SelectedItemStyle BackColor="#cccccc" /> <Columns> <cc1:LiveButtonColumn ButtonType="LinkButton" Visible="false" CommandName="Select" ></cc1:LiveButtonColumn> <cc1:LiveBoundColumn HeaderText="Title" DataField="ContactTitle" ItemStyle-HorizontalAlign="center"></cc1:LiveBoundColumn> <cc1:LiveBoundColumn HeaderText="Company" DataField="CompanyName" ItemStyle-HorizontalAlign="center"></cc1:LiveBoundColumn> <cc1:LiveBoundColumn HeaderText="Contact" DataField="ContactName" ItemStyle-HorizontalAlign="center"></cc1:LiveBoundColumn> </Columns> </cc1:LiveDataGrid> Protected Sub dgTest_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgTest.ItemDataBound Const LINK_BUTTON_COLUMN As Integer = 0 Const LINK_BUTTON_CONTROL As Integer = 0 Dim button As LinkButton If ((e.Item.ItemType = ListItemType.Pager) Or (e.Item.ItemType = ListItemType.Header) Or (e.Item.ItemType = ListItemType.Footer)) Then ' Do nothing Else button = CType(e.Item.Cells(LINK_BUTTON_COLUMN).Controls(LINK_BUTTON_CONTROL), LinkButton) e.Item.Attributes.Add("onclick", ClientScript.GetPostBackClientHyperlink(button, "")) End If End Sub I'm using the Northwind database to test. |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted February 8, 2007 4:04 PM If I understand you correctly, this was discussed in the following forum thread: http://support.dart.com/postings?topicid=6178 |
| Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|