I have a Rad Grid with
<MasterTableView EditMode="PopUp"
<EditFormSettings EditFormType="Template" CaptionFormatString="Entity Properties..." PopUpSettings-Modal="true" >
Using an Object DataSource
<asp:ObjectDataSource ID="EntityObjectDataSource" runat="server"
DataObjectTypeName="Namespace.Entities.Enity"
DeleteMethod="Delete" InsertMethod="Insert" SelectMethod="GetAll"
TypeName="Namespace.BusinessServices.EntityServices.EntityController"
UpdateMethod="Update" OldValuesParameterFormatString="original_{0}">
</asp:ObjectDataSource>
I used netTiers to gen service/Entity/ and data access - I have an abstraction layer (controllers) wrapping the net tiers services.
Amongst the controls, I have two text boxes UpdateByTextBox and UpdateDateText Box,
I would like to set these values once the user clicks the 'Save' command button.
(I was able to figure out how to set my CreateByTextBox and CreateDateTextBox by using the following
protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
if
(e.CommandName == RadGrid.InitInsertCommandName)
{
//cancel the default operation
e.Canceled =
true;
//Prepare an IDictionary with the predefined values
System.Collections.Specialized.
ListDictionary newValues = new System.Collections.Specialized.ListDictionary() ;
//set default value(s)
newValues[
"CreateBy"] = m_CurrentUserIdentityName; // initialized in page constructor
newValues[
"CreateDate"] = DateTime.Now.ToString();
//Insert the item and rebind
e.Item.OwnerTableView.InsertItem(newValues);
}
Any suggestions/questions or help is greatly appreciated...