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.
Unfortunately, activation email could not send to your email. Please try again.

Bug in grid with no records

Thread ID:

Created:

Updated:

Platform:

Replies:

130392 May 10,2017 03:14 PM May 11,2017 06:51 AM ASP.NET Core 1
loading
Tags: Grid
R Brian Lindahl
Asked On May 10, 2017 03:14 PM

I have a grid with a datasource of a RemoteSaveAdaptor, which is then hooked up to a ForeignKeyAdaptor using javascript. The datasource uses json="@model.data", where data is a generic List<T> of the records. The records have (among other fields) 4 boolean fields, with edit-type="Boolean". (Note that I'm not certain that this is involved with the ForeignKeyAdaptor, or specific to the RemoteSaveAdaptor - I don't have any other grids at the moment that don't have data.)

If the grid has existing records, the insert & post works fine. However, if I try to insert a new record into the grid, the params get messed up, as shown in the linked screenshot: https://screencast.com/t/TgjoIOyr

Note that the booleans (including UnSliced and LightBake fields) have a value of "On". This is of course not recognized by the model binder in the server-side code, thus sending a null CrudModel value to the Insert action. When there are existing records in the original data, these boolean fields pass as false, as they should.

I've tried adding default.value="false" to the e-column for those fields, but it has no effect. Neither does actually clicking on the checkboxes to set the values - even if the checkbox is checked, the passed value is still "On".

I'm hoping there's a workaround for this, as it's currently a show-stopper for my next release.

brian

Jayaprakash Kamaraj [Syncfusion]
Replied On May 11, 2017 06:51 AM

Hi Brain, 

Thank you for contacting Syncfusion support. 

We were able to reproduce the issue at our end. To overcome this problem, we suggest you to use type property of Columns in Grid. Because you have rendered grid with empty dataSource so we need to specify the type in Grid columns while rendering empty dataSource in Grid. Please refer to the below help document, code example and sample. 


<e-columns> 
    <e-column field="OrderID" header-text="Order ID" is-primary-key="true" type="number" validation-rules='new Dictionary<string, object>() { {"required",true}, {"number",true} }' text-align="Right" width="75"></e-column> 
    <e-column field="CustomerID" header-text="Customer ID" type="string" validation-rules='new Dictionary<string, object>() { {"required",true}, {"minlength",3} }' width="80"></e-column> 
    <e-column field="EmployeeID_FirstName" header-text="Employee ID" type="string" datasource="ViewBag.data" edit-type="@(EditingType.Dropdown)" text-align="Right" width="75"></e-column> 
    <e-column field="Verified" header-text="Verified" default-value="false" edit-type="Boolean"  type="boolean" width="110"  text-align="Left"></e-column> 
    </e-columns> 


Regards, 

Jayaprakash K. 
  
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;