Click here to Skip to main content
15,914,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 :)
Posted

<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
 
Share this answer
 
Gried View Row data bound event : OnRowDataBound
Here you can find more information about OnRowDataBound event
Also look at this Example
 
Share this answer
 
v2
Use Gridview_RowDataBound event .Depending on value of one column we can change the value of other column by calling it in gridview_rowdatabound.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900