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

Databind in a formview to DatePicker and datetimepicker controls

Good afternoon
i try to use the datepicker control in a formview in trhis way

<ej:DatePicker ID="DPDAtaDiNascita" runat="server" ButtonText="Oggi" DateFormat="dd/MM/yyyy"
                                    WatermarkText="Seleziona la data" Locale="it-IT"  EnableRTL="true" DataDate= '<%# Bind("DataDiNascita") %>'/>

but doesn't works.
How to use this controls?

Thank you

Furio

6 Replies

MS Muralishankar Sundaram Syncfusion Team January 23, 2015 12:01 PM UTC

Hi Furio,

Thanks for using Syncfusion products.

Query: “i try to use the datepicker control in a formview in trhis way- <ej:DatePicker ID="DPDAtaDiNascita" runat="server" ButtonText="Oggi" DateFormat="dd/MM/yyyy" WatermarkText="Seleziona la data" Locale="it-IT"  EnableRTL="true" DataDate= '<%# Bind("DataDiNascita") %>'/>.but doesn't works.””

DataDate” -There is no such a property available in Datepicker control. We suggest you to use  “Value” attribute for the value binding on the datepicker control.

<code>

[ASPX]

<ej:DatePicker ID="DPDAtaDiNascita5" runat="server" ButtonText="Oggi" DateFormat="dd/MM/yyyy" WatermarkText="Seleziona la data" Locale="it-IT" ReadOnly="false" Value='<%# Bind("Date") %>' EnableRTL="true" />

</code>

The Datepicker control is working properly in the FormView control at our end and we are unable to get the reported issue. If your facing issue in (Inside the FormView)  Datepicker control please share us the issue reproducing sample (or) issue reproducing steps and template details.

We have prepared a simple sample to exhibit this behavior of the control and it is available in the following link:

http://www.syncfusion.com/downloads/support/directtrac/118024/WebApp1687986118.zip

Please let me know if you have any other queries.

Regards,

Muralishankar S.




FC Furio Curti January 25, 2015 04:21 PM UTC

Hi Muralishankar
I have tried with Value property before and  now I try again, but is not running.
In Attachement the error.
The translation of the error is
"The methods of data binding as Eval (), XPath (), and Bind () can only be used in the context of a data-bound control."

I can't see your example because I use vs2010 and SyncFusion 12.24, but I check the files inside.
I Add in my project "validateRequest="false"  in pages tag in web.config, I add ReadOnly =false and I am using Value in binding.
I have checked if there are the same references, all the references , you have used, is in my project.

I have the problem in richtexteditor also  , it writes html and It saves it in db, but when I return value in RTE from db if there are some html tag it don't works and the page don't charge correctly also the menu.
I think the two  problems arrived from the some trouble.

thank you

Furio

Attachment: ErrorDataPicher_34558d0c.zip


FC Furio Curti January 26, 2015 10:26 AM UTC

Hi Muralishankar
I tried to insert ej: maskedit same formview and returns the same error.
Probably the problem is upstream.
What DLLs and what scripts have I to use for these controls?
And which Imports (using) do  I must insert in the .vb pages?
Thank you
Furio


RA Rajaveni Syncfusion Team January 28, 2015 11:55 AM UTC

Hi Furio,

We regret for the inconvenience caused.

The reported issue occurs in our end whenever postback is raised in the form.

Please try the sample in the following link:

http://www.syncfusion.com/downloads/support/directtrac/general/WebApplication2752031055.zip

And we have prepared a video demo exhibiting this behavior, video sample is available in the following link:

http://www.syncfusion.com/downloads/support/directtrac/general/issue-1807499874.zip

Can you please check the attached demo video and confirm with us whether the above scenario is the reported issue?

If the above scenario is not the actual reported issue, kindly try modifying the sample, to reproduce the reported error and share the same with us. So that we can analyse on this issue and provide you better solution.

Query: What DLLs and what scripts have I to use for these controls?

Please refer the following UG documentation links for script and DLL references:

http://help.syncfusion.com/ug/js/default.htm#!documents/createmanually1.htm

http://help.syncfusion.com/ug/js/default.htm#!documents/addingthereferences1.htm

Query:  I have the problem in richtexteditor also  , it writes html and It saves it in db, but when I return value in RTE from db if there are some html tag it don't works

Can you share with us the error  screenshot for this issue.  Please update with us whether you were facing issue while raising postback.

And also update us the details on Html Tags causing this issue and what type of Html tags used.

Kindly update with us the requested details.

Please let us know if you have any other concerns.

Regards,

Rajaveni




FC Furio Curti February 1, 2015 08:14 PM UTC

Thank you for answer,.
The scenario is exactly.
The error appair when I post back a page for change formview in insert mode o update mode.
The error is exactly wath you show in video.
How can I resolve this?

Query: What DLLs and what scripts have I to use for these controls?
I check the page you show me, may be I added more DLL then necessary, but I not undestand the exactly work for each one.

I use Syncfusion from 2007 but in my  old project I have used only for pdf creations togheter Ajax for other controls.
Now I want Use only Syncfusion but I'm like a beginner.

Query: For RichTextBox
I take out this control from a formview because it has the some problem of datapicker or maskedit.
Working out I resolve my troubles replacing " with ' in the saved text, because when I add the Value the string with " was catted and goes in error, if there is an other way please show me how.

Thank you.
Regards

Furio



RA Rajaveni Syncfusion Team February 2, 2015 11:04 AM UTC

Hi Furio,

We regret for the inconvenience caused.

We were able to reproduce the following issue and we have logged report on these issues.

1) DatePicker when data bind with Bind () method on postback it throws error.

2) RichTextEditor with value string having “ (Double Quotation mark) is not rendering.

The fix for the above issues will be available in our upcoming releases.

Needed Dll and Scripts:

The Syncfusion ASP.NET Tools controls require only the following assembly reference in the project:

•Syncfusion.EJ.dll

•Syncfusion.EJ.Web.dll

The necessary widget script files for Tools controls are as follows,

•ej.web.all.min.js

•ej.webform.min.js

Please let us know if you have any other concerns.

Thanks,

Rajaveni



Loader.
Live Chat Icon For mobile
Up arrow icon