在向网格中插入新行之前执行的功能是什么 [英] What is the function that performed before insert a new row to grid
问题描述
大家好:)
我有一个网格,我想为我的插入和更新参数获取一些默认值
我可以使用哪个功能来执行此类操作?
例如:
我有这个广告"表
[Ad_ID] int
[Ad_Title] nvarchar
[Ad_Text] nvarchar
[Ad_Date]日期
[Ad_Time]时间
[Ad_AdminID] int
[Ad_StartDate]日期
[Ad_EndDate]日期
[Ad_FlagISActive]位
[Ad_PhotoPath] nvarchar
[Ad_Language] char
粗体"[Ad_PhotoPath]"列是图像的路径
当我插入或更新一行时,我在编辑模板模式下使用fileupload控件
但是我无法在插入或更新文件之前将文件名添加到路径中
因此,请任何人告诉我在插入或更新行之前可以用来添加文件名的功能吗?
如果还有其他方法可以解决,请告诉我
谢谢大家:)
Hi all :)
I have a grid, and I want to get some default values to my insert and update parameters
which function can I use to do some thing like this ?
for example:
I have this "Ads" table
[Ad_ID] int
[Ad_Title] nvarchar
[Ad_Text] nvarchar
[Ad_Date] date
[Ad_Time] time
[Ad_AdminID] int
[Ad_StartDate] date
[Ad_EndDate] date
[Ad_FlagISActive] bit
[Ad_PhotoPath] nvarchar
[Ad_Language] char
the column in bold "[Ad_PhotoPath]" is the path of an image
when I insert or update a row, I use fileupload control in the edit template mode
but I can''t add the file name to the path before I insert or update it
so please any one can tell me what the function that I can use to add the file name before insert or update the row ?
if there is any other way to do that please let me know
thank you all :)
推荐答案
< a href ="http://www.codeproject.com/KB/webforms/DataGridInsert.aspx">插入一个使用DataGrid隐藏列的新行</a> [< a href ="http://www.codeproject.com/KB/webforms/DataGridInsert.aspx" target ="_ blank" title ="New Window"> ^< ;/a>]
此链接对于u
<a href="http://www.codeproject.com/KB/webforms/DataGridInsert.aspx">Insert a New Row using DataGrid Hidden Columns</a>[<a href="http://www.codeproject.com/KB/webforms/DataGridInsert.aspx" target="_blank" title="New Window">^</a>]
this link will be useful for u
Gried View Row数据绑定事件很有用:OnRowDataBound
此处,您可以找到有关OnRowDataBound事件的更多信息
还要查看此示例
Gried View Row data bound event : OnRowDataBound
Here you can find more information about OnRowDataBound event
Also look at this Example
使用Gridview_RowDataBound事件.具体取决于我们可以通过在gridview_rowdatabound中调用另一列的值来更改另一列的值.
Use Gridview_RowDataBound event .Depending on value of one column we can change the value of other column by calling it in gridview_rowdatabound.
这篇关于在向网格中插入新行之前执行的功能是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!