121231321

     name: 'myac', width:80, fixed:true, sortable:false, resize:false, formatter:'actions',
formatoptions:{keys:true}},

 

jQuery("#cmtmpl").jqGrid('navGrid','#pcmtmpl',{edit:false,add:false,del:false});

 

 

<!--StartFragment--><br />
<a href="#" id="a1">Get data from selected row</a>
<br />
<a href="#" id="a2">Delete row 2</a>
<br />
<a href="#" id="a3">Update amounts in row 1</a>
<br />
<a href="#" id="a4">Add row with id 99</a>
<script src="manipex.js" type="text/javascript"> </script>
<br />

 

 

<!--StartFragment-->jQuery("#a1").click( function(){
var id = jQuery("#list5").jqGrid('getGridParam','selrow');
if (id) {
var ret = jQuery("#list5").jqGrid('getRowData',id);
alert("id="+ret.id+" invdate="+ret.invdate+"...");
} else { alert("Please select row");}
});
jQuery("#a2").click( function(){
var su=jQuery("#list5").jqGrid('delRowData',12);
if(su) alert("Succes. Write custom code to delete row from server"); else alert("Allready deleted or not in list");
});
jQuery("#a3").click( function(){
var su=jQuery("#list5").jqGrid('setRowData',11,{amount:"333.00",tax:"33.00",total:"366.00",note:"<img src='images/user1.gif'/>"});
if(su) alert("Succes. Write custom code to update row in server"); else alert("Can not update");
});
jQuery("#a4").click( function(){
var datarow = {id:"99",invdate:"2007-09-01",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"};
var su=jQuery("#list5").jqGrid('addRowData',99,datarow);
if(su) alert("Succes. Write custom code to add data in server"); else alert("Can not update");
});

 

 ondblClickRow: function(id){ alert("You double click row with id: "+id);},

 multiselect: true,

 onSelectRow: function(id){ if(id && id!==lastsel){ jQuery('#rowed3').jqGrid('restoreRow',lastsel); jQuery('#rowed3').jqGrid('editRow',id,true); lastsel=id; } },

recordpos: 'left',

gridComplete: function(){ var ids = jQuery("#rowed2").jqGrid('getDataIDs'); for(var i=0;i < ids.length;i++){ var cl = ids[i]; be = "<input style='height:22px;width:20px;' type='button' value='E' onclick=\"jQuery('#rowed2').editRow('"+cl+"');\" />"; se = "<input style='height:22px;width:20px;' type='button' value='S' onclick=\"jQuery('#rowed2').saveRow('"+cl+"');\" />"; ce = "<input style='height:22px;width:20px;' type='button' value='C' onclick=\"jQuery('#rowed2').restoreRow('"+cl+"');\" />"; jQuery("#rowed2").jqGrid('setRowData',ids[i],{act:be+se+ce}); } },

 

 function checksave(result) { if (result.responseText=="") {alert("Update is missing!"); return false;} return true; }

 

editable: true,edittype:"select",editoptions:{value:"FE:FedEx;IN:InTime;TN:TNT;AR:ARAMEX"}},

 

 

<input type="BUTTON" id="bedata" value="Edit Selected" />

$("#bedata").click(function(){ var gr = jQuery("#editgrid").jqGrid('getGridParam','selrow'); if( gr != null ) jQuery("#editgrid").jqGrid('editGridRow',gr,{height:280,reloadAfterSubmit:false}); else alert("Please Select Row"); });

 

 

 

 http://www.cnblogs.com/Employee/archive/2010/05/26/1744569.html

 

 http://www.csharpwin.com/dotnetspace/12633r3694.shtml

 

 http://code.msdn.microsoft.com/EFProviderWrappers

 

 

 

EF-1

http://blog.csdn.net/zezhi821/article/details/7235134

http://www.cnblogs.com/xray2005/archive/2009/05/17/1458568.html

 

http://www.cnblogs.com/wlflovenet/archive/2011/07/25/EFandMvc3.html

http://www.cnblogs.com/LingzhiSun/archive/2011/04/13/ef41_wokingwithproperties.html

 

 

ef-2

http://www.cnblogs.com/n-pei/archive/2010/10/20/1857131.html

http://geeks.ms/blogs/unai/archive/2008/07/17/multiple-entity-updates-with-entity-framework-ef-fetch-updates.aspx

http://archive.cnblogs.com/a/1805477/

http://www.cnblogs.com/n-pei/archive/2010/10/29/1864780.html

 

   

MVC FILEUPLOAD

http://www.cnblogs.com/n-pei/archive/2010/10/15/1852635.html

 

 

 

http://msdn.microsoft.com/en-us/library/system.data.objects.objectcontext.addobject.aspx

posted @ 2012-05-08 13:41  rayray2  阅读(408)  评论(0编辑  收藏  举报