Multiple fields to edit to generate one column

Hi,

I am doing a grid with a CRON expression maker. (Like this one: http://www.cronmaker.com/?0).

In my grid, I have one string field “Cron” but I need the user to complete several fields to be able to generate the “Cron” field.


While trying to do this I encounter two difficulties:

1)     1) I tried first to put the Cron expression maker into the grid “EditTemplate” (see Example1Page.razor joined)

But numeric fields can’t be edited with arrows. Do you know why? Is there any work-around?

Example1

1)     2) Then, I put the Cron expression maker into a separate dialog. (see Example2Page.razor joined)

The numeric fields work, but my value doesn’t update in the grid after I close the Cron edition dialog. How can I update the “Cron” field of the edit template after closing CRON editor?

Example2

Thanks for your help.

Best regards.

Francois


Attachment: CronEditor_da7aaa4a.zip

1 Reply 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team February 26, 2021 06:42 AM UTC

 
Greetings from Syncfusion support. 
 
Query 1 : But numeric fields can’t be edited with arrows. 
We suggest you to use the Value property for the SfNumericTextBox to overcome the reported problem. Please refer and use as like the codes below, 
 
 
        <GridColumn Field=@nameof(Order.Cron) HeaderText="Cron" EditType="EditType.DropDownEdit" Width="150"> 
            <EditTemplate> 
                @{ 
                    ... 
                            <label class="e-float-text e-label-top">Cron value 1</label> 
                            <SfNumericTextBox ID="Minutes" 
                                              Value="@CronValue1" 
                                              ...> 
                            </SfNumericTextBox> 
                     ... 
                            <label class="e-float-text e-label-top">Cron value 2</label> 
                            <SfNumericTextBox ID="Minutes" 
                                              Value="@CronValue2" 
                                              ...> 
                            </SfNumericTextBox> 
                } 
            </EditTemplate> 
        </GridColumn> 
 
 
Query 2 : How can I update the “Cron” field of the edit template after closing CRON editor? 
We suggest you to bind OnActionComplete event to Grid, and set the PreventRender to false, based on RequestType as BeginEdit or Add. Please refer and use the codes below, 
 
 
<GridEvents OnActionComplete="OnActionComplete" TValue="Order"></GridEvents>
 
public void OnActionComplete(ActionEventArgs<Order> args){    if (args.RequestType.ToString() == "Add" || args.RequestType.ToString() == "BeginEdit")    {        args.PreventRender = false;    }}
 
 
References :  
 
Please get back to us if you need further assistance. 
 
Regards, 
Renjith Singh Rajendran 


Marked as answer
Loader.
Up arrow icon