This is a migrated thread and some comments may be shown as answers.

DataGrid custom editing problems

6 Answers 77 Views
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 21 Mar 2019, 11:11 AM

I'm trying to configure a DataGrid with various custom editing functionality and have some issues/questions related to the attached vue file:

1.  I have various columns that are editable by combobox/drop down.  I would like the name/description to show in the grid but only the underlying id value be pushed to the server.  The bit I can't get working is getting the name/description to show.  I'm guessing it's something to do with the :template attribute but I don't know what I should put here?

2.  For the date column I'd like to display using the local date/time display settings but when I would like the date pushed to the server to be in  some standard format like ISO 8601.  Is this possible?

3.  For the multi-column comboboxes, it is possible for the user to put any value that they want in.  Is there a multi-column dropdownlist type option that prevents invalid values being entered or some way to achieve this behaviour?

6 Answers, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 25 Mar 2019, 11:30 AM
Hello Rob,

If only the "value" field is available in the items bound to the Grid, the Grid will not be able to retrieve the text representation from the editor. For handling such requirement, a foreign key column could be used:
For the second question, you could use column template to customize or format the value as per your exact requirement:
Regarding the last question, you could use DropDownList with custom template that could simulate the multi-column layout:

Regards,
Konstantin Dikov
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Rob
Top achievements
Rank 1
answered on 25 Mar 2019, 03:39 PM

Thanks for the reply.

In regards to the 2nd answer, this certainly allows you to modify the displayed value but I'm not sure how it allows you to modify the saved value.  This probably wouldn't be an issue if the default format that you use was something useful like ISO-8601 or some other common computer readable format that you might want to transport/convert.  I might even be ok with it just using the local culture settings but I can't work out who would want whatever horrible format you use as default!  Perhaps I'm missing something.

 

In regards the 3rd answer. I ended up sticking with the MultiColumnComboBox because it's behaviour is exactly what I want other than the allowing values that aren't in the list and then used the change event to clear the value if it is set to an invalid item.  I feel like it would be really great to have an option on this control to prevent custom values being added because the filter behaviour is so much better than for the DropDownList.

0
Konstantin Dikov
Telerik team
answered on 27 Mar 2019, 11:53 AM
Hi Rob,

The Grid will render the values from its dataSource and we try not to manipulate the values in any way, especially when it comes to dates, because each project requires different handling of the dates. The suggested "template" approach will change only the displayed value (which could also be set through the "format" property of the column), but for the update requests, the dataSource will send the Date object as is. One option for manipulating the Date objects send from the service is demonstrated in the following HowTo example for the MVC helper, where the dates are manipulated within the "requestEnd" event of the dataSource:


Regards,
Konstantin Dikov
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Stephen
Top achievements
Rank 1
answered on 23 May 2019, 04:34 AM

I can't use the DataGridTextBoxColumn for this particular column because it is a combination of several fields, but only one of the fields needs to be editable (i.e. the column contains a expand/collapse button, an image, and a text field).  

I don't see the C1Text property in the C1TextBoxBase class.  I tried doing this:

<c1:C1TextBoxBase C1Text="{Binding Content.Name, Mode=TwoWay}" />

...but the C1Text property "does not exist on type 'C1TextBoxBase'"  

Any thoughts?

0
Konstantin Dikov
Telerik team
answered on 27 May 2019, 08:30 AM
Hello Stephen,

It seems that you are using component that is not from our Kendo UI suite. If you have any particular questions about the components from Kendo UI wrappers for Vuew, please let us know.

Regards,
Konstantin Dikov
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Stephen
Top achievements
Rank 1
answered on 29 May 2019, 03:59 AM
Thank you so much Konstantin Dikov...
Asked by
Rob
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Rob
Top achievements
Rank 1
Stephen
Top achievements
Rank 1
Share this question
or