Automatic row resizing as the user types in an Editor in a templated column

Hi,

I have a grid in my ContentPage which has a templated column with an editor in it:

<grid:GridTemplateColumn HeaderText="Item Name"
MappingName="Values[1].StringDisplayValue"
AllowEditing="True"
MaximumWidth="200">
<grid:GridTemplateColumn.CellTemplate>
<DataTemplate>
<Editor Text="{Binding Path=Values[1].StringDisplayValue,Mode=TwoWay}"
FontSize="Small"/>
</DataTemplate>
</grid:GridTemplateColumn.CellTemplate>
</grid:GridTemplateColumn>

Is there any way to set it up so that the row height automatically updates as I'm typing in the editor and the editor changes size?  I would like for the row to resize automatically with the entered text.

What's the best way to accomplish this?

Thanks,

Alfredo Diaz

5 Replies 1 reply marked as answer

KK Karthikraja Kalaimani Syncfusion Team June 16, 2020 12:46 PM UTC

Hi Alfredo,

Currently, we are validating your requirement. We will update further details on or before 18th June 2020. We appreciate your patience until then.

Regards,
Karthik Raja



KK Karthikraja Kalaimani Syncfusion Team June 18, 2020 02:24 PM UTC

 
Hi Alfredo,

 
We need some more time to check the possibilities for your requirement. So, we will update further details on or before 22nd June 2020. We appreciate your patience until then.

Regards,
Karthik Raja 



KK Karthikraja Kalaimani Syncfusion Team June 22, 2020 01:38 PM UTC

Hi Alfredo,

Thanks for your patience.

Your requirement can be achieved by Refreshing the whole grid in CurrentCellEndEdit event with some delays. Please refer the below code snippet to achieve your requirement.

code snippet :

 
        private async void DataGrid_CurrentCellEndEdit(object sender, GridCurrentCellEndEditEventArgs e) 
        { 
            await Task.Delay(100); 
            this.dataGrid.Refresh(); 
        } 
 
 
Regards,
Karthik Raja 


Marked as answer

AL Alfredo June 25, 2020 11:07 PM UTC

I'll give that a try.  Thank you Karthik!


KK Karthikraja Kalaimani Syncfusion Team June 26, 2020 05:32 AM UTC

Hi Alfredo,

Thanks for the update.

We will wait to hear from you.

Regards,
Karthik Raja 


Loader.
Up arrow icon