Created
July 16, 2015 06:38
-
-
Save shou1sannomiya/35ada3db61fe390ed8b0 to your computer and use it in GitHub Desktop.
iggridのTemplate使用事例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@* 伝票一覧グリッド *@ | |
@(Html.Infragistics() | |
.Grid<Den_List>() | |
.ID("gridList") | |
.LoadOnDemand(false).AutoGenerateColumns(false).AutoGenerateLayouts(false) | |
.PrimaryKey("HogeId").Width("730px").Height("570px") | |
.Columns(column => | |
{ | |
column.For(x => x.HogeId).DataType("number").Hidden(true); //PrimaryKey | |
column.For(x => x.Icon).HeaderText(" ").Width("32px").DataType("string") | |
.Template("<IMG SRC=${Icon} style = 'width:20px;height:20px'></IMG>");//②画像の表示例 | |
column.For(x => x.Editimg).HeaderText(@rsGlobal.Editimg).Width("30px").DataType("string") | |
.Template("<input type='image' SRC=${Editimg} onclick='editgridList(${HogeId})' class='select-button' style = 'width:20px;height:20px' />");//③function呼び出し | |
column.For(x => x.Kingaku).DataType("number").HeaderText(@rsGlobal.Kingaku).Width("90px").Format(@ViewBag.KingakuFormat) | |
.Template("<div align=right>${Kingaku}</div>"); //①金額右寄せ | |
}) | |
.DataSourceUrl(Url.Action("GetGridData", new { Id = ViewBag.HogeId })) | |
.DataBind().Render()) | |
@*end 一覧グリッド *@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment