Hi Danferd,
Thanks for using Syncfusion Products.
Query 1: check all option doesn't remain as checked after postback. How can i keep it checked after postback?
We have achieved your requirement please find the sample under the following location,
In this above sample, we have get the checkbox value and store it in hidden element of asp.net in the client side of checkbox change event and please find the below code,
<code>
<script>
$("#check").ejCheckBox({ text: "Check All", change: "onallChange" });
function onallChange(args) {
window.flag = true;
var obj = $("#<%=ddlMulPlumber.ClientID%>").ejDropDownList("instance");
if (args.isChecked) obj.checkAll();
else obj.uncheckAll();
var data = $("#check").data("ejCheckBox");
$("#<%=HiddenField1.ClientID%>").val(data.checked());
window.flag = false;
}
</script>
Protected Sub button10_Click(Sender As Object, e As Syncfusion.JavaScript.Web.ButtonEventArgs)
Dim val As Boolean = HiddenField1.Value
End Sub</code>
Now, we have assigned the hidden element value in “checked” property of Checkbox control in the client side “create” event of DropDownlist control to maintain the checked state of check all option as shown below code:
<code>
function OnCreate(args) {
$("#check").ejCheckBox({ text: "Check All", change: "onallChange" });
var data = $("#check").data("ejCheckBox");
if($("#<%=HiddenField1.ClientID%>").val() == "true")
val=true;
else
val=false;
data.option("checked", val);
}
</code>
Query 2: I tried to get the selectedvalue value with the code below, during the first postback, i will get value like 'PLUMBER1 - PLUMBER NO. 1','PLUMBER2 - PLUMBER NO. 2' which is not what i want. But during the second postback, i will get the value in the form i want,'PLUMBER1','PLUMBER2'. Anything goes wrong here?
We are able to reproduce the issue in our side. The fix for this issue will be available in our upcoming Vol2,2016 which is expected to be rolled out at the end of this month.
Note: If you required patch in your specific version, could you please let us know your product version details? So that we will prepare patch and update you.
Please let us know if you have any query.
Regards,
Kasithangam