Hi,
I use linq and will display the default valuse when the User insert an Record.
That is my solution:
Class:
Set the default Values
Here I have only 2 Values that with geht default values, but in other classes it will be 20-40 Values.
is there a shorter solution to set set the defaultvalues?
Thank U
Dieter
I use linq and will display the default valuse when the User insert an Record.
That is my solution:
Class:
| ublic partial class VersandUnternehmen : INotifyPropertyChanging, INotifyPropertyChanged |
| { |
| private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); |
| private int _VersandunternehmenID; |
| private string _Text; |
| private int _Sortierung =100 ; |
| private string _Memo; |
| private System.Data.Linq.Binary _Timestamp; |
| private string _Anwendung= ConfigurationSettings.AppSettings["Anwendung"].ToString(); |
| private EntitySet<VersandServicearten> _VersandServicearten; |
Set the default Values
| protected void RG1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| if (e.CommandName == RadGrid.InitInsertCommandName) |
| { |
| VersandUnternehmen vu = new VersandUnternehmen(); |
| ListDictionary defaultValues = new ListDictionary(); |
| defaultValues["Anwendung"] = vu.Anwendung; |
| defaultValues["Sortierung"] = vu.Sortierung; |
| e.Item.OwnerTableView.InsertItem(defaultValues); |
| } |
| } |
Here I have only 2 Values that with geht default values, but in other classes it will be 20-40 Values.
is there a shorter solution to set set the defaultvalues?
Thank U
Dieter