Data Grid View Data Type List |
This document present declaration and implementation of SOWI Data Grid View of data type List
Data Grid View setup in SOWI administrator tool Presentation Interface
Puts property CanEdit on and property ListName equal of TempData name
Use SOWI Web Foundation then it's already prepared (Edit, EditContent).
Presentation level: genered the view with extensions method e.g. into web application SOWIWeb.Helper.Extensions method ToHTMLEditor.
An code snippet example of EditContent
if (itemDataGrid.CanEdit == true) { @Html.Raw(SOWIWeb.Helper.HTML.FormGroupEditor(lValue, itemDataGrid, TempData)) }
Declaration data list in method SetViewBagList
Address controller example for choice the language
Important |
---|
The TempData name must the same name of Data Grid View property ListName |
/// <summary> /// Puts selection list: Language for user interface (UI) /// </summary> [NonAction] protected override void SetViewBagList() { TempData["LanguageUIList"] = AppAddress.GetLanguageUIs(); }
App Management Language example (code is cutted)
Important |
---|
Data list must based on SOWI Data interface Data Standard |
/// <summary> /// Language UI list use for selection list based by IDataStandard /// </summary> public List<SOWIData.IDataStandard> GetLanguageUIs() { var lList = GetAll().Cast<SOWIData.IDataStandard>().ToList(); lList = (from p in lList where p.Archive == false select p).ToList(); return lList; }
Data list must based on SOWI Data Standard
The list uses fields ID and Name