Checked multiple checkbox using c# in Sharepoint 2013 -
i have problem! :( programming in c# visual studio 2012 , building intranet uses data sharepoint 2013. have problem in register.
in sharepoint 2013, have list. in list, 1 of columns of type "choice". when c# calls save information, apparently saved. then, after seeing results in sharepoint 2013 see not information not saved.
in sharepoint 2013 save default checkbox element (first element) no save correct selection.
my code:
sharepointconnector.sharepointentities.testdeinteresitem test = new sharepointconnector.sharepointentities.testdeinteresitem(); list<sharepointconnector.sharepointentities.testdeinteresinteresespersonalesvalue> personallist = new list<sharepointconnector.sharepointentities.testdeinteresinteresespersonalesvalue>();//0 test.alumnoid = student.identificador; string[] auxpersonal = possibleinterest.personal.split(','); (int = 0; < auxpersonal.length; i++) { string s = auxpersonal[i]; if (s.length > 0) { var allinterest = englishdatacontext.testdeinteresinteresespersonales.tolist(); var element = allinterest.where(x => x.value.equals(s)).firstordefault(); if (element != null) { sharepointconnector.sharepointentities.testdeinteresinteresespersonalesvalue personal = new sharepointconnector.sharepointentities.testdeinteresinteresespersonalesvalue(); personal.value = element.value; test.interesespersonales.add(personal); //1 } } } englishdatacontext.addtotestdeinteres(test); //2 englishdatacontext.savechanges(); //3 --- //0 -> initially, list of elements (column when type election) empty. //1 -> element added //2 -> in step, information added correctly... //3 -> ...but save allinformation correctly less item cited (column when type election). element save default election (first element checkbox)
any ideas?
i've solved problem. context wrong.
http://msdn.microsoft.com/en-us/library/office/fp179912%28v=office.15%29.aspx
Comments
Post a Comment