We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

DatePicker Binding null reference

Hi,

I'm developing a page for edit values.

I've this code:

....
<td>
    <asp:DropDownList ID="ddlAAConGas" runat="server" SelectMethod="GetEmpresasGN" DataTextField="Nombre" DataValueField="IdEmpresa" SelectedValue='<%# Item.AAConGas %>' />
</td>
<td>
    <ej:DatePicker ID="dateFechaConcesionGND" runat="server" WatermarkText="Seleccione Fecha" DateFormat="dd/MM/yyyy" Value='<%# (Item.FechaConcensionGND) %>'/>
</td>
......
<div align="center">
    <asp:Button ID="btnAceptar" runat="server" Text="Aceptar" OnClick="btnAceptar_Click" Width="100" />
    <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" OnClick="btnCancelar_Click" Width="100" />
</div>

The page load values perfectly, but when I click on btnAceptar, I get an exception: "System.NullReferenceException' in App_Web_btt5vogx.dll" on datepicker control, the item is null, but Drop Down List load data perfectly.

Ah, The property FechaSolicitudGND is DateTime?

Any idea?

8 Replies

MS Muralishankar Sundaram Syncfusion Team March 13, 2015 12:13 PM UTC

Hi Manolo,

Thanks for using Syncfusion Products.

We are unable understand your use case scenario and unable reproduce the reported exception from the Datepicker control. Could you please confirm your use case scenario, whether you are using Datepicker control inside of a FormView and then tried to bind the value to this control or did you tried to get the value from DatePicker in code behind.

Please share us the issue reproducing sample with reproducing steps, otherwise modify the attached sample and share the same with us that would be helpful for us to analyze the problem and provide you prompt solution ASAP.

We have prepared the sample for accessing DatePicker value from the code-behind. Please find the sample in a below link:

http://www.syncfusion.com/downloads/support/directtrac/118487/DatepickerSample-497881357.zip

Please let us know if you have further queries.

Thanks,

Muralishankar




MA Manolo March 16, 2015 08:01 AM UTC

Hi,

I attach the modified project to reproduce my problem


MS Muralishankar Sundaram Syncfusion Team March 17, 2015 05:16 AM UTC

Hi Manolo.

Thanks for your update.

The attachment is missing in your last update, so please kindly share the issue reproducing sample with us for analyzing your problem and providing better solution It ASAP.

Please let us know if you have any other concerns.

Regards,

Muralishankar



MA Manolo March 17, 2015 07:53 AM UTC

Sorry




MA Manolo March 17, 2015 07:59 AM UTC

Ups, the file is not attached!



I shared the file:

https://copy.com/fPYgfPF3zlVf1V71





MS Muralishankar Sundaram Syncfusion Team March 18, 2015 09:57 AM UTC

Hi Manolo,

Thanks for sharing the sample.

We were able to reproduce the problem and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let me know if you have any questions.

Regards,

Muralishankar



MA Manolo March 18, 2015 10:14 AM UTC

Ok, Thank you!


MS Muralishankar Sundaram Syncfusion Team March 19, 2015 10:24 AM UTC

Hi Manola,

Thanks for your update.

Kindly get back to us if you have further queries.

Regards,

Muralishankar


Loader.
Live Chat Icon For mobile
Up arrow icon