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. Image for the cookie policy date

How Fill DropDowns on Grid

Good day

I have a couple questions about dropdowns on GRID.

i fill one dropdown using from server code, but the others dropdowns they must be fill using web services, because i dont know make that .

And the other question is, how lock a dropdown when select data from other dropdown, and fill using data selected from dropdown that lock for call an a web service for filler the dropdown is locked?
Attach code and image

Thank you for your support.

Regards

Attachment: advicepool_76609da4.7z

3 Replies

RR Rajapandi Ravi Syncfusion Team December 5, 2019 01:50 PM UTC

Hi Alfonso, 

Thanks for using syncfusion support. 

From analyzing your query, we understand you like to disable the dropdown column from selecting a value from another dropdown. We have already discussed your requirement in our KB please follow the below link for more information.  
 
 
To disable the column you have to define allowEditing to be false. Please refer the below documentation for more information. 
 
 
Please confirm you want to disable the dropdown initially while editing and you want to enable the column after select a dropdown value from another column.  
 
Regards, 
Rajapandi R 



AL Alfonso replied to Rajapandi Ravi December 5, 2019 04:05 PM UTC

Hi Alfonso, 

Thanks for using syncfusion support. 

From analyzing your query, we understand you like to disable the dropdown column from selecting a value from another dropdown. We have already discussed your requirement in our KB please follow the below link for more information.  
 
 
To disable the column you have to define allowEditing to be false. Please refer the below documentation for more information. 
 
 
Please confirm you want to disable the dropdown initially while editing and you want to enable the column after select a dropdown value from another column.  
 
Regards, 
Rajapandi R 


Yes i want disable the dropdown initially while editing and you want to enable the column after select a dropdown value from another column


RR Rajapandi Ravi Syncfusion Team December 6, 2019 01:06 PM UTC

Hi Alfonso, 

Thanks for the update. 

Query#: Yes i want disable the dropdown initially while editing and you want to enable the column after select a dropdown value from another column 
 
Based on your query we have a prepared a sample and achieved your requirement by using grid actionComplete and dropdownlist select event. Please refer the below code example for more information. 

<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="true" > 
                    <ClientSideEvents  ActionComplete="complete" /> 
                    <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"></EditSettings> 
                   <Columns>  
                        .  .  .  .  .  .  . 
                       <ej:Column Field="ShipCity" EditType="DropdownEdit" HeaderText="ShipCity" Width="80" /> 
                        <ej:Column Field="ShipName" EditType="DropdownEdit" AllowEditing="false" HeaderText="ShipName" Width="80" /> 
//For disable the dropdown column initially while editing, you have to set allowEditing “false” 
                        .  .  .  .  .  .  . 
                    </Columns> 
                </ej:Grid> 
    </div> 
    <script> 
        function complete(args) { 
            if (args.requestType == "beginedit") { 
                $('#OrdersGridShipCity').ejDropDownList({          //Here we have binded the select event for dropdown column. 
                    select: (args) => {  This event triggers when the list of item is selected. So here we are enable the locked column 
                        $("#OrdersGridShipName").ejDropDownList("enable");   
                    } 
                }); 
        } 
        } 
    </script> 

Regards, 
Rajapandi R

Loader.
Live Chat Icon For mobile
Up arrow icon