This is a migrated thread and some comments may be shown as answers.

[Solved] Update en Insert extra field

4 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rik
Top achievements
Rank 1
Rik asked on 15 Oct 2009, 05:17 AM
Hi,

I'm facing a problem with my grid. I want to fill or edit a extra database field that is not shown in de datagrid or editform.
I'm using a linq datasource.
Is this possible?

thanks in advance..

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Oct 2009, 06:32 AM
Hello Rik,

You could probably create your own CustomEditForm wherein you can add any number of fields although those are not displayed on the grid. Check out the following online demo and help document which will explain this better:
Form Template Edit Form
Custom edit forms

Hope this helps...
Princy.
0
Rik
Top achievements
Rank 1
answered on 15 Oct 2009, 09:34 AM
I'm sorry but,i dont need a custom form because i don't want the user to fill in the value for this field, for example
if a user insert or edit a record i want te save the Date in a database field.

So can i programmaticly add a field and a value in the automatic created Insert or update Query ??
0
Shinu
Top achievements
Rank 2
answered on 15 Oct 2009, 11:43 AM
Hello,

If you want to save the modified date in database, then one suggestion would be using TIMESTAMP datatype in table.

If you want to set the update/insert parameter programatically, then you could create event handlers for the Updating / Inserting events for LinqDataSource control. In the handler, you can set a value before the data operation starts.

-Shinu.
0
Rik
Top achievements
Rank 1
answered on 15 Oct 2009, 12:26 PM
Thanks, but isn't it a very difficult way to insert or update a extra field. I expected a much more simple solution. 
Tags
Grid
Asked by
Rik
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Rik
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or