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
30
How do I get UltraWebGrid to restore my previous value instead of defaulting to 0 when I enter a non-numeric character
posted

I am using an ultraWebGrid and have not specified what data type the column should be. Instead the data type is determined from the data table that binds to it instead.   

I allow data entry for several numeric columns. My problem is when I try to enter a character into the cell. I am trying to validate that the cell value should only be numeric but I find that it is converted to 0 instead. Since 0 is a valid numeral, I can't detect that it's invalid and therefore cannot restore the previous value. Also, I'm afraid that since I can't detect the error, users will end up with 0s across the grid if they are not careful during data entry.   

Parents
No Data
Reply
  • 30
    posted

    After browsing some of the posts on this forum, I decided to try my luck with the WebNumericEditor. I dropped a numeric editor on the page and linked the ultrawebgrid column to the editor via the editorID.I am using infragistics35.Web.v10.1 for both the Infragistics.Web.UI.EditorControls and the Infragistics.WebUI.UltraWebGrid. 

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

    <ig:WebNumericEditor ID="WebNumericEditor1" runat="server" DataMode="Decimal" MinValue="0" MaxValue="100"></ig:WebNumericEditor>

    ...

     <igtbl:UltraGridColumn BaseColumnName="[col_name]" EditorControlID="WebNumericEditor1">

    But, I get this error message instead.

    The control WebNumericEditor1 references a control that does not implement IProvidesEmbeddableEditor and cannot be used as the editor control for column ctl00xContentPlaceHolder1xUltraWebGrid1_c_0_32

    Am I missing something here? 

Children
No Data