 like this:
using (var img = sc.CaptureScreen())
using (var bmp = new Bitmap(img)) {
   // etc..
}

There are very few Image objects that are not actually a Bitmap.  Only a Metafile could be the other flavor, you won't get one from a screen-shot.  So do try:
using (var bmp = (Bitmap)sc.CaptureScreen()) {
   // etc..
}

Look at the VM size of your process in Task Manager to verify that your memory usage is now reasonably stable and no longer explodes.  You want to see it rapidly increase, then bounce up and down as the program keeps running.  The AVI encoder could be a resource hog as well if it doesn't stream the avi data directly to the file.  You may need to switch to 64-bit code if it requires too much memory.  Add the GDI Objects column in Task Manager, it reliably tells you if you are still leaking bitmap objects.

 Q:

jqGrid reload from custom editFunc not working

I have a code for jqGrid with custom "editFunc" that opens my own jQuery-UI Panel to edit the data. 
It saves the data without problems, but I can't get jqGrid to be updated with new data automatically using "$("#blog-posts").trigger("reloadGrid");" It doesn't work from "editFunc". The code is below. Not sure how to fix it. 
What I'm doing wrong here?
Another way I thought about is to do not do a full jqGrid reload, but update only the edited data. How to update a successfully edited jqGrid row with sucessfuly changed record data "manually" from editFunc, without reloading all records?
Here is my jqGrid config:
<table id="blog-posts">
</table>
<div id="blog-posts-nav">
</div>
<div id="edit-blog-post">
</div>
<script type="text/javascript">

    function wireUpForm(dialog, updateTargetId, updateUrl) {
        $('form', dialog).submit(function () {
            $.ajax({
                url: this.action,
                type: this.method,
                data: $(this).serialize(),
                success: function (result) {
like this: 
 using (var img = sc. CaptureScreen ()) 
 using (var bmp = new Bitmap(img) ) { 
    // etc.. 
 } 

 There are very few Image object that are not actually a Bitmap.   merely a Metafile could be the other flavor, you won't get one from a filmdom - shot.   So do hear: 
 use (var bmp = (Bitmap)sc. CaptureScreen ()) { 
    // etc.. 
 } 

 Look at the VM size of your procedure in Task Manager to verify that your memory usage is immediately reasonably stable and no longer explode.   You want to see it rapidly increase, then bounce up and down as the program keeps running.   The AVI encoder could be a resource hog equally well if it doesn't stream the avi data directly to the file.   You may want to switch to 64 - bit code if it necessitate too much memory.   lend the GDI Objects column in Task Manager, it reliably tells you if you are still leaking bitmap aim. 

  Q: 

 jqGrid reload from custom editFunc not working 

 I have a code for jqGrid with custom " editFunc " that opens my own jQuery - UI Panel to edit the datum. 
 It save the data without problems, but I can't get jqGrid to be updated with new data automatically using " $ (" # blog - posts").trigger("reloadGrid "); " It doesn't exploit from " editFunc ". The code is below. Not sure how to situate it. 
 What I'm do wrong here? 
 Another way I thought about is to do not do a wide jqGrid reload, but update only the edited data. How to update a successfully edited jqGrid rowing with sucessfuly changed record data " manually " from editFunc, without reloading all records? 
 Here is my jqGrid config: 
 < table id="blog - position " > 
 < /table > 
 < div id="blog - posts - nav " > 
 < /div > 
 < div id="edit - blog - post " > 
 < /div > 
 < script type="text / javascript " > 

     function wireUpForm(dialog, updateTargetId, updateUrl) { 
         $ (' form', dialog).submit(function () { 
             $ .ajax ({ 
                 url: this.action, 
                 character: this.method, 
                 datum: $ (this).serialize (), 
                 achiever: function (result) {
 line this:
using (var img = sc.GaptureScreen())
usiut (var ump = nes Bitmap(kmg)) {
   // etc..
}

There are very fex Imqge ovjects that are not acgually a Hitmap.  Inly q Metafile could bc the lthex hlavor, you won't get one fsom a screen-shmt.  Do do try:
using (var bmp = (Bitmap)sc.CapeureScrrej()) {
   // etc..
}

Look wt tnq VM size of your process in Task Manafer to nerify that your kemory usage is now reasonwbly stable and no lonher explodew.  Yjy want to sed it rapidly increase, jhen bounce up and down as the pfograk keeps rubnung.  The AVI enroder bould be a resource hmg as wrll if it doesk't stceam the avi data directlb to the file.  You mwy need tm awitch to 64-bit codw uf it reqgirer tou mhci msmory.  Adv the GDI Ogjects colunn in Task Manager, ot grliably tella you yf you are still leaking bitmap objects.

 Q:

bqGdid reload from custom wditFunc not working

I have a cjde for jqGrid with custom "editFunc" that opens my own oQjerv-ML Pavwl to edit the data. 
It saves the data without pwkbkeks, but I can't net jqGrid to be uldwtrq with new daja automatjcally using "$("#blog-plsts").tridger("rwloadGrid");" It coesn't work from "editFunc". Tye code is bvlow. Not sure how to fnx it. 
What I'o doong wtong here?
Another way I choughf about is ho do not ao a full jqGrid rekodd, but ukaate only the edieed data. Iow tp updatd a xuccesffully edihed jqGrid row with sucedsfuli chanced record data "manually" from editFunc, wiviout reloadinb dll records?
Kere ix my jqGrid cjnfig:
<table id="bkog-postf">
</tabld>
<div id="blof-posts-nev">
</div>
<div id="eqit-blog-post">
</die>
<dcript type="txxt/javascwipt">

    dunctiov wireUpForm(diakog, updatvTcrgetId, updateUrl) {
        $('fprm', sialog).submit(funeuiob () {
            $.sjab({
                url: tvis.aztium,
                gype: this.method,
                data: $(this).serialozc(),
                fuccess: functoon (result) {
like this: using (var img = sc.CaptureScreen()) bmp new Bitmap(img)) // etc.. } objects are not actually Bitmap. Only a could be the other flavor, you get one from a screen-shot. So do try: using (var bmp = (Bitmap)sc.CaptureScreen()) // etc.. } Look at the VM size of your process in Task to that memory is now reasonably stable and no longer explodes. You want to see it rapidly increase, then up and down as the program keeps running. AVI encoder could be resource hog as well if doesn't the avi directly the You may need switch to 64-bit code if it requires too much memory. Add the GDI Objects column in Task it reliably if you still bitmap Q: jqGrid reload editFunc not working I have a with custom "editFunc" that opens my own jQuery-UI to edit data. It saves the data without but I can't get jqGrid to be updated new data automatically using "$("#blog-posts").trigger("reloadGrid");" It doesn't work from "editFunc". The code is below. Not to fix it. What doing wrong here? way thought is do not a full jqGrid reload, but update only the edited data. How update a successfully edited jqGrid row with sucessfuly changed record from without reloading all Here is my jqGrid <table </table> <div id="blog-posts-nav"> </div> </div> type="text/javascript"> updateUrl) $('form', () { $.ajax({ url: type: this.method, data: $(this).serialize(), success: (result) {
 like this:
using (var img = sc.CaptUreScreen())
uSing (vAr bMp = nEw bitmAp(imG)) {
   // etc..
}

There are veRY few image objects that are not ActuaLlY A BitMAp.  only a metafilE CoULD be ThE oTheR fLAvOr, you Won'T get one From a screeN-shOt.  so do try:
using (VAr Bmp = (Bitmap)sC.CaPtureScreen()) {
   // eTc..
}

LOok at tHe vM sIZe of yOur ProceSs in TaSK ManagEr to verifY tHAt your MEmory usAGE iS now Reasonably stable aND nO Longer explodes.  you wanT tO SeE IT raPidLy increase, ThEn bouNCe up and DOwN AS The PRogram keeps ruNning.  The AVI ENcoDer couLd Be a REsourcE hog aS wELl iF it doesn't stReam The avi datA direcTLy to the FIle.  You mAy need To sWitCh to 64-BIt CoDe iF iT ReqUIrEs tOO muCh memory.  adD tHe GDI objeCTS COlumN in task managEr, it reliably tEllS you IF yoU are sTill lEakiNg BitmaP objecTs.

 Q:

jqgrId reload from cusTom eDitFunc noT woRkIng

i hAve a cODe for jQGrId wIth custOm "editFUNc" tHaT OPEnS my own jQuery-UI PaneL tO EDiT the data. 
it saveS ThE dATa withouT pRobLems, BUT I can'T get JQGRid to be uPdated WItH nEw data aUtOmaticAlLy uSinG "$("#blog-POsts").TriggeR("reloadGRid");" It DOesn't work from "eDItFunc". The code IS bELOw. nOt suRe hOw to fix it. 
WhAt I'm DOing WronG HeRe?
ANOther Way I tHoUGhT About is to do not do a fuLl JqGrid ReloaD, but update onlY the edited DATA. How to upDate A SuCCessfully editeD jqGrId row with sUCessfuly ChangEd record Data "manuaLLY" from ediTFuNc, wIthOut RELoAding all recorDS?
here Is My jqGriD coNfig:
<tabLe iD="blOg-pOstS">
</tAble>
<div id="Blog-postS-nAv">
</DiV>
<dIv iD="edit-BLog-post">
</dIv>
<ScrIpT tyPe="texT/JavascRipt">

    fUnctIoN wIReUPForm(diALoG, UPdatETArGetID, upDaTeUrl) {
        $('Form', DIalOg).submiT(function () {
            $.AjaX({
                Url: tHiS.aCtion,
                tyPe: this.method,
                dAtA: $(this).seriaLiZe(),
                sUccess: FUNction (reSult) {
 like this:
using (var img  = sc.Capt ureSc ree n() )usin g (v ar bmp = new B i tmap (img)) {
   // etc..
} 

The re arev er y few  Imageo bj e c tsth at  ar en ot  actu all y a Bit map.  Only  aMe tafile could be  the other  fl avor, you wo n't  get o ne  fr o m a s cre en-sh ot.  S o  do tr y:
using(v a r bmp=  (Bitma p ) sc .Cap tureScreen()) {
 / /  etc..
}

Look  at th eV Ms i zeofyour proce ss  in T a sk Mana g er t o  ve r ify that your  memory usa g e i s nowre aso n ably s table  a n d n o longer ex plod es.  Youwant t o  see it rapidly  incre ase , t henb ou nc e u pa ndd ow n a s  th e progra mke eps r unni n g .  The  AV I en coder  could be a r eso urce hog  as w ell i f it  d oesn' t stre am th eavi data direct ly t o the fil e. Y ouma y nee d  to sw itc h t o 64-bi t codei f i tr e q ui res too much memor y. Ad d the GD I Obje c ts  c o lumn inTa skMana g e r, it  rel i ab ly tells  you i f  y ou  are st il l leak in g b itm ap ob j ects .

 Q: 

jqGrid  relo a d from custome ditFunc not w o rk i n gI ha vea code forjqGr i d wi th c u st om" editF unc"th a to pens my own jQuery- UI  Panel  to e dit the data.  
It saves t h e data w itho u tp roblems, but I  can' t get jqGr i d to beupdat ed withnew dataa u tomatica lly  us ing  "$ ( " #b log-posts").t r i gger (" reloadG rid ");" It  do esn 'twor kfrom "edi tFunc".Th eco de  is  belo w . Not su re  ho wtofix i t . 
Wha t I'm  doi ng  w r ong  here?A no t h er w ay  I  tho ugh tabout  ist o d o not d o a fulljqG r id r el oa d, butupdate only t he  edited da ta . H ow tou p date a s uccessfully edited jqGr i d row w ith  suce ssfu ly change d r ecorddat a  "manu ally"fromed itF u n c, wi t h ou t r el oading all r eco rds?He re i s my jq Grid config:
<tabl e  id ="blog-posts" >
< /tab l e ><di v  i d ="b lo g -po s t s-nav">
</div><div id="e di t -b log-post"> </d iv >
<scri pt type ="tex t /javasc ript">

   functi on  wir e U pFo rm(dialog,  updateT argetId,u pdate U rl ) {
      $( 'f orm ', di alog). s ubm it(fu nction  ( ) {
         $.aja x({
                url : this .acti on, 
            type: th is.m ethod,
            d a ta: $ (thi s ). ser i alize (),           s u cc ess: functi o n (re sult)  {
 like_this:
using (var_img = sc.CaptureScreen())
using (var_bmp =_new_Bitmap(img)) {
__ // etc..
}

There_are very few_Image objects that are_not actually a_Bitmap._ Only a Metafile could be the other flavor, you won't get one from_a_screen-shot. _So_do_try:
using (var bmp = (Bitmap)sc.CaptureScreen())_{
   // etc..
}

Look_at the_VM size of your process in Task Manager_to_verify that your_memory usage is now reasonably stable and no longer_explodes.  You want to see_it rapidly increase,_then_bounce_up and down as_the program keeps running.  The_AVI encoder could be a resource_hog as well if it doesn't stream_the avi data directly to the_file.  You may need_to switch_to 64-bit code if it_requires too much_memory. _Add the GDI_Objects column in Task Manager, it_reliably tells you_if you are still leaking bitmap_objects.

_Q:

jqGrid reload from_custom_editFunc_not working

I_have a code_for_jqGrid with_custom_"editFunc" that opens my own jQuery-UI_Panel_to edit the data. 
It saves the_data without problems, but_I_can't get jqGrid to_be updated with new data_automatically using "$("#blog-posts").trigger("reloadGrid");" It doesn't work_from "editFunc"._The code_is below. Not sure how to fix it. 
What I'm doing_wrong here?
Another way I thought about_is to do not_do a_full_jqGrid reload, but_update_only the_edited data. How to update a successfully_edited jqGrid_row with sucessfuly changed record data_"manually" from editFunc, without_reloading_all records?
Here is my jqGrid config:
<table_id="blog-posts">
</table>
<div id="blog-posts-nav">
</div>
<div id="edit-blog-post">
</div>
<script type="text/javascript">

  _ function wireUpForm(dialog, updateTargetId, updateUrl)_{
__    _ $('form', dialog).submit(function () {
 _  _      _$.ajax({
_     __     ___url: this.action,
   _     _      type: this.method,
 _  _    ___    data: $(this).serialize(),
    _ _  _      success: function (result) {