Hello,
I'm trying to send selected values (from grid) but the creation is coming from the scheduler ..
I saved the values in a global variable and i tried to this ..
THIS is the ActionMethod in the Controller :
public
ActionResult Cal_Create ([DataSourceRequest]DataSourceRequest request, KommunikationViewModel kommunikation,
string
[] SIDMITARBEITER,
string
[] SIDPERSONEN, List<UserViewModel> MITARBEITER_OBJ)
{}
Create() method from my scheduler :
.Create(create => create.Action(
"Cal_Create"
,
"Home"
).Data(
"pass_Einladung_Miatarbeiter_Personen"
))
PS : i copy pasted only the create() so that i don't need to copy my whole scheduler !
This is the additional function that attached to the create() function :
function
pass_Einladung_Miatarbeiter_Personen() {
console.log(
"passing the array"
);
console.log(Global_Array_Grid_mitarbeiter_Selected);
var
Mitarbeiter_Grids_IDs =
new
Array();
var
Personen_Grids_IDs =
new
Array();
Global_Array_Grid_mitarbeiter_Selected.forEach(
function
(item, index) {
var
SID_MITARBEITER_AUS_GLOBAL = item.Sid_mitarbeiter;
Mitarbeiter_Grids_IDs.push(SID_MITARBEITER_AUS_GLOBAL);
});
Global_Array_Grid_person_Selected.forEach(
function
(item, index) {
var
SID_Personen_AUS_GLOBAL = item.Sid_personen;
Personen_Grids_IDs.push(SID_Personen_AUS_GLOBAL);
});
var
xxoop = JSON.stringify(Global_Array_Grid_mitarbeiter_Selected);
return
{
SIDMITARBEITER: Mitarbeiter_Grids_IDs,
SIDPERSONEN: Personen_Grids_IDs,
MITARBEITER_OBJ: xxoop}
}
// so i took one value from the object and put it into an array .. and that worked like a charm .. so defining a string[] as a parameter in the create ActionMethod .. did not make any problem .. but defining a List of object (like the code snippet) or a list of Objects .. is giving always NULL ! and it's not NULL because I'm console logging this variable in almost every step .. to follow if kendo delete the values after some action .. but no .. it's there .. but not getting sent to the ActionMethod ..
Thanks in Advance ..