syntax for disable or freeze specific cell of Blazor Grid.

Hi All 

I need the syntax for disable next grid column cell on Cumbobox selection change event.  Could you please share me the syntax ?





<GridColumn Field=@nameof(Inspection.Icolumn4) Width="100">
            <EditTemplate>
                <SfComboBox TValue="string" TItem="Col4Data" @ref="combobox4"
                            Placeholder="Select"
                            bind-Value="@((context as Inspection).Icolumn4)" o
                            DataSource="@Col4DataList">
                    <ComboBoxFieldSettings Text="Name" Value="Name" />
                    <ComboBoxEvents Created="Created" TValue="string" TItem="Col4Data" ValueChange="OnValueChangeforCol4" />
                </SfComboBox>
            </EditTemplate>
        </GridColumn>

 private async Task OnValueChangeforCol4(Syncfusion.Blazor.DropDowns.ChangeEventArgs<string, Col4Data> args)
    {
        if (args.ItemData != null)
        {
            //Need syntax for disable the next Grid Column
           
        }
    }






3 Replies 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team December 17, 2020 11:12 AM UTC

Hi chandradev, 

Greetings from Syncfusion support. 

We suspect that you would like to disable the editing for the next cell based on the value selection from combobox. If so, then we suggest you to enable/disable the AllowEditing property of particular GridColumn to achieve this requirement. We have also prepared a sample based on this scenario, please download the sample form the link below, 
 

Please refer the codes below, 

<GridColumn Field=@nameof(Order.ShipCountry) HeaderText="Ship Country" AllowEditing="@ShipCountryEdit" EditType="EditType.DropDownEdit" Width="150"></GridColumn>
 
public bool ShipCountryEdit = true; 
 
private async Task OnValueChangeForCol6(Syncfusion.Blazor.DropDowns.ChangeEventArgs<int?, Games> args) 
{ 
    ShipCountryEdit = false; 
} 


If we have misunderstood your requirement, or if you still need further assistance, then the following details would be helpful for us to proceed further. 

  1. Share a detailed explanation of your complete requirement.
  2. Share with us a video demo showing your complete requirement.

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran 


Marked as answer

CH chandradev December 19, 2020 03:58 PM UTC

Thanks Renjith, It solved my requirement.


RS Renjith Singh Rajendran Syncfusion Team December 21, 2020 07:03 AM UTC

Hi chandradev, 

Thanks for your update. We are glad to hear that the suggestion solution helped you in achieving this requirement. 

Please get back to us if you need further assistance. 

Regards, 
Renjith R 


Loader.
Up arrow icon