来吧ONNNNNNNNN [英] COME ONNNNNNNNNN
本文介绍了来吧ONNNNNNNNN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我今天已经问了5次。
请帮忙。
应该是ASP.net应该做的第一件事
嗨。
我不能算这一个。
我如何从第3列中获取价值物品价格在gridview中?
它在我选择的行中。
I''ve asked this 5 times today.
Please help.
Should be the First thing ASP.net should do
Hi.
I can''t figure this one.
How to I get the value out of column3 "Item Price" in a gridview?
It''s in the row I select.
推荐答案
我假设你' '我试图编辑gridview?
在编辑网格视图中研究(在代码隐藏中)子OldValue和
NewValue功能。它们将允许您缩小到单个
值。
***通过Developersdex发送 http://www.developersdex.com ***
I''m assuming you''re attempting to edit the gridview?
Research (in the codebehind) in the edit gridview sub the OldValue and
NewValue functionality. They will allow you to narrow down to a single
value.
*** Sent via Developersdex http://www.developersdex.com ***
不,我是我试图获得细胞的价值。
" Roy" < SP ******* @ gmail.com>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP12.phx.gbl ...
No, I''m trying to get the value of the cell.
"Roy" <SP*******@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
我'我假设您正在尝试编辑gridview?
在编辑gridview中研究(在代码隐藏中)子OldValue和
NewValue功能。它们将允许您缩小到单一值。
***通过Developersdex发送 http://www.developersdex.com ***
I''m assuming you''re attempting to edit the gridview?
Research (in the codebehind) in the edit gridview sub the OldValue and
NewValue functionality. They will allow you to narrow down to a single
value.
*** Sent via Developersdex http://www.developersdex.com ***
试试这个?
Ken
Microsoft MVP [ASP.NET]
<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"
" http:/ /www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< script runat =" server">
受保护的子Page_Load _
(ByVal发送者为对象,_
ByVal e As System.EventArgs)
如果不是IsPostBack然后
GridView1.DataSource = CreateDataSource()
GridView1.DataBind()
结束如果
End Sub
受保护的子GridView1_RowCommand _
(ByVal发送者为对象,_
ByVal e As System.Web.UI.WebControls。 GridViewCommandEventArgs)
Dim gdvRow As GridViewRow
Dim gdvCell As TableCell
gdvRow = GridView1.Rows(e.CommandArgument)
gdvCell = gdvRow.Cells(2)
Response.Write(gdvCell.Text)
End Sub
函数CreateDataSource ()As Data.DataTable
Dim dt As New Data.DataTable
Dim dr As Data.DataRow
dt.Columns.Add(New Data.DataColumn _
(" IntegerValue", GetType(Int32)))
dt.Columns.Add(New Data.DataColumn _
(" StringValue",GetType(String)))
dt.Columns.Add(New Data.DataColumn _
(" CurrencyValue",GetType(Double)))
dt.Columns.Add(新数据.DataColumn _
(" Boolean",GetType(Boolean)))
Dim i As Integer
for i = 0 To 5
dr = dt.NewRow()
dr(0)= i
dr(1)=" Item" + i.ToString()
dr(2)= 1.23 *(i + 1)
dr(3)=(i = 4)
dt.Rows.Add(博士)
下一页我
返回dt
结束功能
< / script>
< html xmlns =" http://www.w3.org/1999/xhtml" >
< head runat =" server">
< title>获取列的值< / title>
< / head>
< body>
< form id =" form1" runat =" server">
< div>
< asp:gridview id =" GridView1" runat =" server"
autogenerateselectbutton =" True" onrowcommand =" GridView1_RowCommand">
< / asp:gridview>
< / div>
< / form>
< / body>
< / html>
" Gerry A" < DF ****** @ aasdf.com>在消息中写道
新闻:CY ******************** @ comcast.com ...
Try this?
Ken
Microsoft MVP [ASP.NET]
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load _
(ByVal sender As Object, _
ByVal e As System.EventArgs)
If Not IsPostBack Then
GridView1.DataSource = CreateDataSource()
GridView1.DataBind()
End If
End Sub
Protected Sub GridView1_RowCommand _
(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs )
Dim gdvRow As GridViewRow
Dim gdvCell As TableCell
gdvRow = GridView1.Rows(e.CommandArgument)
gdvCell = gdvRow.Cells(2)
Response.Write(gdvCell.Text)
End Sub
Function CreateDataSource() As Data.DataTable
Dim dt As New Data.DataTable
Dim dr As Data.DataRow
dt.Columns.Add(New Data.DataColumn _
("IntegerValue", GetType(Int32)))
dt.Columns.Add(New Data.DataColumn _
("StringValue", GetType(String)))
dt.Columns.Add(New Data.DataColumn _
("CurrencyValue", GetType(Double)))
dt.Columns.Add(New Data.DataColumn _
("Boolean", GetType(Boolean)))
Dim i As Integer
For i = 0 To 5
dr = dt.NewRow()
dr(0) = i
dr(1) = "Item " + i.ToString()
dr(2) = 1.23 * (i + 1)
dr(3) = (i = 4)
dt.Rows.Add(dr)
Next i
Return dt
End Function
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Get the value of a column</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:gridview id="GridView1" runat="server"
autogenerateselectbutton="True" onrowcommand="GridView1_RowCommand">
</asp:gridview>
</div>
</form>
</body>
</html>
"Gerry A" <df******@aasdf.com> wrote in message
news:CY********************@comcast.com...
我今天已经问了5次。
请帮忙。
应该是ASP.net应该做的第一件事
你好。
我无法想象这个。
如何从第3列物品价格中获取价值在gridview中?
它在我选择的行中。
I''ve asked this 5 times today.
Please help.
Should be the First thing ASP.net should do
Hi.
I can''t figure this one.
How to I get the value out of column3 "Item Price" in a gridview?
It''s in the row I select.
这篇关于来吧ONNNNNNNNN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文