Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
How to clear selection from dropdown and select nothing?
posted

Hello,

I have a dropdown in webdatagrid cell and It has two list items bound by asp object datasource. Inital value remains blank but once i make a selection I have to select either of it and I can never clear that cell. I want to be able to clear that cell . In short its a nullable column and the option should be like Y, N and blank(clear the cell).

<ig:DropDownProvider ID="exclPosnDropdown">
<EditorControl ID="exlPosn" runat="server" DisplayMode="DropDownList" DataSourceID="exclPosn" ValueField ="excl_posn_ind_id" TextField="code" >

<DropDownItemBinding TextField="code" ValueField="excl_posn_ind_id" />
</EditorControl>

</ig:DropDownProvider>

</asp:ObjectDataSource>

<asp:ObjectDataSource ID="exclPosn" runat="server" SelectMethod="GetExclPosn"
TypeName="RiskManagementWeb.GridsForms.ModifyPositions" >


</asp:ObjectDataSource>

Please let me know how can I implement this. 

Parents
No Data
Reply
  • 2095
    posted

    Hi Jdag,

    Thank you for post in our community!

    There is no problem to use empty string if you want to achieve blank value in the dropdown editor. I'm sending you a sample that demonstrate such behavior.

    Please, let me know whether you need any further assistance!

    CAS-173285.zip
Children
No Data