By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,886 Members | 1,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,886 IT Pros & Developers. It's quick & easy.

Datadgird with row selected

P: n/a
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


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



dgmetas.Visible = True

panelmeta.Visible = False

End If

End If

End Sub
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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" <an*******> escribió en el mensaje
So what's the problem?

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.