Aug 24, 2015, 9:32 AM
[CLOSED] from listener cellclick to directmethod with e.raw parameter
Hi,
In version 2.5 I used a listener on a gridrow which under certain conditions calls a directmethod passing e.raw.
This e.raw is not accepted anymore in the directmethod in version 3 (latest release).
Error:
System.ArgumentException: DirectMethod: 'gpOrganisation_onClick', The parameter 'cJson' is undefined bij Ext.Net.DirectMethod.Invoke(Object target, HttpContext context, ParameterCollection args)
Hans
In version 2.5 I used a listener on a gridrow which under certain conditions calls a directmethod passing e.raw.
This e.raw is not accepted anymore in the directmethod in version 3 (latest release).
Error:
System.ArgumentException: DirectMethod: 'gpOrganisation_onClick', The parameter 'cJson' is undefined bij Ext.Net.DirectMethod.Invoke(Object target, HttpContext context, ParameterCollection args)
var cellClickOrganisation = function (grid, rowIndex, columnIndex, e) {
var baseid = e.get("organisation_id"); // Get the Record
var description = e.get("organisationname");
if (columnIndex == 0) {
//the delete button is pressed
var before = #{hiddenTextDeleteQuestionBefore}.value;
var after = #{hiddenTextDeleteQuestionAfter}.value;
if (confirm(before + ' ' + description + ' '+after)) {
#{DirectMethods}.DeleteOrganisation(baseid);
} else {
return false;
}
} else {
#{DirectMethods}.gpOrganisation_onClick(e.raw);
}
};
<DirectMethod()> _
Public Sub gpOrganisation_onClick(ByVal cJson As String)
Dim jsonevent As jsonEventArgs = New jsonEventArgs
Dim xml As XmlNode = JSON.DeserializeXmlNode("{records:{record:" + cJson + "}}")
Dim cId As String = ""
For Each row As XmlNode In xml.SelectNodes("records/record")
cId = row.SelectSingleNode("organisation_id").InnerXml
' etc etc
Next
End Sub
Any idea how to pass the row data?Hans
Last edited by Daniil; Aug 24, 2015 at 4:50 PM.
Reason: [CLOSED]