If you're using a FULLSCREEN video mode then something different happens additionally:
A change of the video mode actually changes the video signal timings going from the graphics card to the display. After such a change the display has to find synchronization with the new settings and that takes some time. This of course comes with some flickering as the display may try to display a frame of different timings with the old settings until it detects that those no longer match. It's a physical effect and there's nothing you can do in software to fix this, other than not changing the video mode at all.

 Q:

MVC Model Binding failing when sorting viewmodel elements

I have a working scenario - 
My viewmodel contains a list of Employee objects.
List<Employee> Employees;

I populate this list by the following:
Employees = EmployeeService.GetAll().ToList();

This works fine. I can view the employees, update their data, post back and save to db.
However, when I try and sort the list of Employees in the viewmodel before sending to the view by replacing the code above with: 
Employees = EmployeeService.GetAll().OrderBy(e=>e.Name).ToList();

The view is populated nicely with the ordered employee details. Unfortunately when I post back this viewmodel to the controller, the viewmodel.Employees is null / empty.
I'd appreciate any help if anyone has any ideas what I might be doing wrong here or why this is happening only when I sort.
Regards
Edit--
public ActionResult Index()
{
    EmployeesViewModel _viewModel = new EmployeesViewModel();
    return View(_viewModel);
}

[HttpPost]
public ActionResult Index(EmployeesViewModel viewModel)
{
    // HERE ** - viewModel.Employees is NULL
    EmployeesService.UpdateAllEmployees(viewModel);
    return View(viewModel);
}

Edit- Sample Markup --
for (int i = 0; i < Model.Employees.Count(); i++)
{
    @Html.HiddenFor(e => e.Employees[i].Id)
    @Html.HiddenFor(e => e.Employees[i].Name)
    <table>
        <tr>
            <td style = "width: 125px">
                @
If you're using a FULLSCREEN video mode then something different happen additionally: 
 A variety of the video mode actually change the television signal timings going from the graphic menu to the display. After such a change the display have to find synchronization with the modern settings and that takes some time. This of path comes with some flickering as the display may try to display a frame of different timing with the old settings until it detects that those no longer equal. It's a physical effect and there's nothing you can do in software to fix this, early than not changing the television mode at all. 

  Q: 

 MVC Model Binding failing when screen viewmodel elements 

 I have a working scenario - 
 My viewmodel contains a list of Employee objects. 
 List < Employee > Employees; 

 I populate this list by the following: 
 Employees = EmployeeService. GetAll().ToList (); 

 This works fine. I can view the employees, update their data, post back and salvage to db. 
 However, when I try and sort the tilt of employee in the viewmodel before sending to the view by replacing the code above with: 
 Employees = EmployeeService. GetAll().OrderBy(e=>e. Name).ToList (); 

 The opinion is populate nicely with the ordered employee details. Unfortunately when I mail back this viewmodel to the controller, the viewmodel. Employees is null / empty. 
 I'd appreciate any help if anyone has any ideas what I might be do wrong here or why this is happening only when I sort. 
 Regards 
 Edit-- 
 public ActionResult Index () 
 { 
     EmployeesViewModel _ viewModel = new EmployeesViewModel (); 
     return View(_viewModel); 
 } 

 [ HttpPost ] 
 public ActionResult Index(EmployeesViewModel viewModel) 
 { 
     // HERE * * - viewModel. employee is NULL 
     EmployeesService. UpdateAllEmployees(viewModel); 
     render View(viewModel); 
 } 

 Edit- Sample Markup -- 
 for (int i = 0; i < Model. Employees. Count (); i++) 
 { 
     @Html. HiddenFor(e = > e. Employees[i].Id) 
     @Html. HiddenFor(e = > e. Employees[i].Name) 
     < table > 
         < tr > 
             < td style = " width: 125px " > 
                 @
If jou're using a FULLSCREEN video mode theu sometiing dirferent fappens additionally:
A change od the video mode actually cfanges thv video sugnao timings going from the fvaphies card to the dlsplay. Aftes such a changa ghz display has to find synchronizatiog with yhf new settings and ehat najes some time. This of course domes wpth some flickerimg as the display may try ho dlsplay a frame of fifferent tumindw with the oud settings until it dgtects that those no longer matcf. It's a physicao wfffwt and therx's notring you can do in smftware to fix this, obher vhan not changing the vidxo mode at all.

 Q:

MVC Iodel Bingiug failing when sortibg viewkoden eldnengs

I heve a worninj scenario - 
My viewmodwl contains a list pf Vkployee objedts.
Lise<Eiployee> Employees;

I populate this list bj ths following:
Employees = EnployeeService.GetAll().TlList();

This works fine. I can view the employees, update their data, oosu nwzj wnd save to db.
However, when I try and sort the mixt of Employees ln the viewmodel brflrr sending to tfe viec bg replacing the cofe abovg with: 
Employeef = EkployeeService.GetAll().OrderBy(w=>e.Name).ToList();

Nhe ciew is populated uicely with che orcered employee details. Unforcunatemy when I plst back ffis viewmodel to thv cottroller, the viewmodel.Empljyees is iull / empty.
I'a apkreciatq any help if akfone has any ideas what I might be foing wrong here or why this is happening onli wven I sort.
Rzgards
Cdit--
public ActijnResult Index()
{
    EmpjoyeerViewModel _viewMovel = new EmpjoyeesViewModap();
    return Tiew(_viewMjdel);
}

[YttpPost]
pubukc ActionResuly Index(EmiljyeewViewModel viewModcl)
{
    // HERE ** - viewModzu.Tmployees is NULK
    EippobeesSqsvice.UpdateAnlEmolohres(vidwModel);
    vetjrn Fiew(viewModel);
}

Edit- Sakple Markup --
for (int i = 0; l < Model.Enployees.Sount(); i++)
{
    @Htkl.HiddenFor(e => e.Emppoyeev[i].Iv)
    @Hyml.RiddenFor(e => e.Employees[i].Name)
    <table>
        <tr>
            <bd sjyle = "width: 125px">
                @
If you're using a FULLSCREEN video mode different additionally: A of the video signal going from the card to the After such a change the display to find synchronization with the new settings and that takes some time. This course comes with some flickering as the display may try to display a of timings the settings until it detects that those no longer match. It's a physical effect and there's nothing can do in software to fix this, other not changing the video at all. Q: MVC Model failing sorting viewmodel I a scenario - My contains a list of Employee objects. List<Employee> Employees; I populate this list by the following: Employees = This works can view employees, their post back and db. However, when I try and of Employees in the viewmodel before sending to view by the code above with: Employees = The view is populated nicely with the ordered details. Unfortunately when I post back this viewmodel to the controller, the viewmodel.Employees is null I'd appreciate any help anyone has any what might doing here or this is happening only when I sort. Regards Edit-- public ActionResult { EmployeesViewModel _viewModel = new EmployeesViewModel(); return View(_viewModel); } [HttpPost] Index(EmployeesViewModel { // HERE - viewModel.Employees is NULL return } Edit- Sample Markup (int = Model.Employees.Count(); { => e.Employees[i].Id) @Html.HiddenFor(e => <table> <tr> <td style = 125px"> @
If you're using a FULLSCREEN viDeo mode theN someThiNg dIfFereNt haPpens additionaLLy:
A cHange of the video mode actUally ChANges THe Video Signal tIMiNGS goInG fRom ThE GrAphicS caRd to the Display. AftEr sUcH a change the dISpLay has to fiNd sYnchronizatiOn wIth the NeW seTTings And That tAkes soME time. THis of courSe COmes wiTH some flICKeRing As the display may trY To DIsplay a frame of DifferEnT TiMINgs WitH the old setTiNgs unTIl it detECtS THAt tHOse no longer maTch. It's a physICal Effect AnD thERe's notHing yOu CAn dO in software To fiX this, otheR than nOT changiNG the vidEo mode At aLl.

 Q:

mVC MODeL BIndInG FaiLInG whEN soRting vieWmOdEl eleMentS

i HAVe a wOrkIng sCenarIo - 
My viewmodel ConTainS A liSt of EMployEe obJeCts.
LiSt<EmplOyee> EMpLoyees;

I populate This List by the FolLoWinG:
EMployEEs = EmplOyeESeRvice.GeTAll().ToLISt();

THiS WORkS fine. I can view the emPlOYEeS, update tHeir daTA, pOsT Back and sAvE to Db.
HoWEVer, whEn I tRY aNd sort thE list oF emPlOyees in ThE viewmOdEl bEfoRe senDIng tO the viEw by replAcing THe code above witH: 
employees = EmplOYeEsErVIce.GEtALl().OrderBy(e=>e.name).tOLisT();

The VIeW is POpulaTed niCeLY wITh the ordered employeE dEtails. unforTunately when I Post back thIS VIewmodel To thE CoNTroller, the viewModel.employees iS Null / emptY.
I'd apPreciate Any help if ANYone has aNy iDeaS whAt I MIGhT be doing wrong HERe or WhY this is HapPening oNly WheN I sOrt.
reGards
Edit--
Public AcTiOnreSuLt INdex()
{
    EMPloyeesVIeWMoDeL _viEwModEL = new EmPloyeEsViEwmoDEl();
    rEturn ViEW(_vIEWModEl);
}

[htTpPoSt]
pUbLic AcTionrEsuLt Index(employeesvieWmodeL vIeWModel)
{
    // HeRE ** - viewModel.EMpLoyees is NUlL
    empLoyeessERvice.UpdAteAllEmployees(viewModeL);
    Return VIew(ViewMOdel);
}

edit- SamplE MaRkup --
foR (inT I = 0; i < ModeL.EmploYees.COuNt(); i++)
{
    @hTMl.HidDENFOr(e => E.EMployees[i].ID)
    @hTml.hiddeNFOr(e => e.employeEs[i].Name)
    <table>
        <tr>
            <td stYLe = "wIdth: 125px">
                @
If you're using a FULLSCRE EN video m ode t hen  so me thin g di fferent happen s  add itionally:
A change of  thevi d eo m o de  actu ally ch a ng e s  th evi deo  s i gn al ti min gs goin g from the  gr ap hics card to th e display.  Af ter such a c han ge the  d isp l ay ha s t o fin d sync h roniza tion with  t h e news ettings a nd  tha t takes some time .  T h is of course c omes w it h  s o m e f lic kering asth e dis p lay may tr y t o d i splay a frame  of differe n t t imings  w ith the ol d set ti n gsuntil it de tect s that th ose no longerm atch. I t's aphy sic al e f fe ct  an dt her e 's  no t hin g you ca ndo  in s oftw a r e to f ixthis , oth er than not c han ging the  vide o mod e at  a ll.
 Q:

M VC Mo de l Binding faili ng w hen sorti ngvi ewm od el el e ments
Ihav e a wor king sc e nar io - 
M y viewmodel contai ns a  l ist of E mploye e  o bj e cts.
Lis t< Emp loye e >  Empl oyee s ;
I popul ate th i sli st by t he  follo wi ng: 
Em ploye e s =Employ eeServic e.Get A ll().ToList(); 
This works f i ne . Ic an v iew  the employ ees, upda te t h ei r d a ta, p ost b ac k  a n d save to db.
Howev er , when  I tr y and sort th e list ofE m p loyees i n th e  v i ewmodel before  send ing to the view byrepla cing the  code abo v e  with: Emp loy ees  =E m pl oyeeService.G e t All( ). OrderBy (e= >e.Name ).T oLi st( );
T he view i s popula te dni ce lywitht he order ed  em pl oye e det a ils. U nfort unat el yw hen  I post ba c k  thi svi ewmo del  t o the  con t rol ler, th e viewmod el. E mplo ye es  is nul l / empty.
I' dappreciate  a nyhelp i f anyone h as any ideas what I mig h t be do ing  wron g he re or why  th is ishap p eningonly w hen I  s ort . Regar d s 
E dit -- 
public Ac t i onR esult  I ndex ()
{
   EmployeesViewMod e l _ viewModel = n ewEmpl o y ee sVi e wM o del () ; 
 return View(_vi ewModel);}[H ttpPost]
p u bli cActionR esult I ndex( E mployee sViewMode l viewMod el )
{  / / HERE **- viewMo del.Emplo y ees i s  N ULL
  Employ ee sSe rvice .Updat e All Emplo yees(v ie wModel );
  return V iew(viewModel);
}

Edit - Samp le Ma rku p --
for(in t  i= 0; i <Mode l.Employee s.C oun t();i++ ) 
{
   @H t ml .Hi d denFo r(e= > e.Emplo y ee s[i ] . Id )
    @Html . H i dde nFor( e = >  e.Emp loye es[i].Name)
    < t able>
       <tr>        <t d style = "wid th:  1 2 5 px">
             @
If you're_using a_FULLSCREEN video mode then_something different_happens_additionally:
A change_of_the video mode_actually changes the_video signal timings going_from the graphics_card_to the display. After such a change the display has to find synchronization with_the_new settings_and_that_takes some time. This of_course comes with some flickering_as the_display may try to display a frame of_different_timings with the_old settings until it detects that those no longer_match. It's a physical effect and_there's nothing you_can_do_in software to fix_this, other than not changing the_video mode at all.

 Q:

MVC Model_Binding failing when sorting viewmodel elements

I have_a working scenario - 
My viewmodel_contains a list of Employee_objects.
List<Employee> Employees;

I_populate this list by the_following:
Employees = EmployeeService.GetAll().ToList();

This_works fine._I can view_the employees, update their data, post_back and save_to db.
However, when I try and_sort_the list of_Employees_in_the viewmodel_before sending to_the_view by_replacing_the code above with: 
Employees =_EmployeeService.GetAll().OrderBy(e=>e.Name).ToList();

The_view is populated nicely with the ordered_employee details. Unfortunately when_I_post back this viewmodel_to the controller, the viewmodel.Employees_is null / empty.
I'd appreciate any_help if_anyone has_any ideas what I might be doing wrong here or why_this is happening only when I_sort.
Regards
Edit--
public ActionResult Index()
{
 _ _EmployeesViewModel__viewModel = new_EmployeesViewModel();
_ _ return View(_viewModel);
}

[HttpPost]
public ActionResult Index(EmployeesViewModel viewModel)
{
 _ _// HERE ** - viewModel.Employees is_NULL
   _EmployeesService.UpdateAllEmployees(viewModel);
_   return View(viewModel);
}

Edit- Sample_Markup --
for (int i = 0;_i < Model.Employees.Count(); i++)
{
 ___@Html.HiddenFor(e => e.Employees[i].Id)
  _ @Html.HiddenFor(e => e.Employees[i].Name)
  _ <table>
 _      <tr>
__     __   <td style =_"width:_125px">
_    _     _    @