<script type="text/javascript">
    var process = {
        add: function (d) {
            alert(d.row.id);
        },remove:function(d){
            //...
       }
    };
    </script>
      <%= new MvcAjaxToolkit.Flexigrid.TableSettings<FlexigridMvcDemo.Models.UserInfo>()
           .TableId("flex1")
             .Action("/Ajax/GetEntity")
             .Columns(col => 
               {
                   col.Bind(e => e.Id, "Id").Hide();
                   col.Bind(e => e.Name, "Name", 180, true).Align(TextAlignMode.Left);
                   col.Bind(e => e.Email).Width(20).Title("email");
                   col.Bind(e => e.Age).Title("Age").Width(300)
                       .Template("<span style='color:red'> ${name} - ${id} </span>");
               })
            .Title("Employees")
            .SetPageSize(10)
            .ContextMenu("#tablemenu","process")
            .AutoLoad()
            .SetPager(".page") 
        %>
	<ul id="tablemenu" class="jeegoocontext cm_default">
		<li id="add">Add random</li>
		<li id="remove">remove this</li>
		<li id="reload">F5</li>
		<li id="fourp">Go to page 4</li>
		<li id="al5">all
			<ul>
				<li>1111</li>
				<li>222</li>
				<li>333</li>
			</ul>
		</li>
	</ul>

Last edited May 28, 2010 at 6:38 AM by chsword, version 1

Comments

No comments yet.