Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Datadgird with row selected

Reply
Thread Tools

Datadgird with row selected

 
 
Luis E Valencia
Guest
Posts: n/a
 
      05-12-2004
look at this I dont know how to do that bin song


Public Sub pasar(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )

e.Item.BackColor = Color.Red

panelmeta.Visible = False

If IsPostBack Then

If e.CommandName = "Pasar" Then

dgdir.SelectedIndex = e.Item.ItemIndex

dgdir.DataBind()

End If

Dim iddireccion As Int16 = dgdir.DataKeys(e.Item.ItemIndex)

lblmetas.Text = "Indicadores para la direccion seleccionada"

Dim selectCMD2 As SqlCommand = New SqlCommand("select * from tblrelinddir,
tblheaderindicador where
tblheaderindicador.idindicador=tblrelinddir.idindi cador and
tblrelinddir.iddireccion=" & iddireccion & "", SqlConnection1)

selectCMD2.CommandTimeout = 30

Dim custDA2 As SqlDataAdapter = New SqlDataAdapter

custDA2.SelectCommand = selectCMD2

Dim custDS2 As DataSet = New DataSet

custDA2.Fill(custDS2, "tblindicadormeta")

dgmetas.DataSource = custDS2.Tables("tblindicadormeta").DefaultView

If custDS2.Tables("tblindicadormeta").Rows.Count = 0 Then

lblmetas.Text = "NO hay indicadores en esta direccion"

dgmetas.Visible = False

panelmeta.Visible = False

Else

dgmetas.DataBind()

dgmetas.Visible = True

panelmeta.Visible = False

End If

End If

End Sub


 
Reply With Quote
 
 
 
 
Luis E Valencia
Guest
Posts: n/a
 
      05-12-2004
it doesnt make what I need
If a row is sleected
and I select another one, the last one must be unselected
"Bin Song, MCP" <(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed)...
> So what's the problem?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to add row under selected row of gridview ujjc001@gmail.com ASP .Net Building Controls 1 02-16-2007 07:14 PM
Selected Row Only GridView Row Visible? needin4mation@gmail.com ASP .Net Web Controls 0 10-17-2006 10:07 PM
ok I can do a totals row but how about a percentage row after each data row D ASP .Net Datagrid Control 0 05-23-2005 04:10 PM
How to chang bgcolor of row when mouse selected a row? Charles Shao ASP .Net 1 04-18-2005 11:11 AM
How to add a new row to a datagrid with values of the selected row =?Utf-8?B?U3VyZXNo?= ASP .Net 1 11-22-2004 09:04 AM



Advertisments