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
334
How to put a mask in the cell dynamically?
posted
I need to put a mask on the cell of webgrid, but I need this works DYNAMICALLY on the client side.

Someone can help me?

Tks,

 Duan Brito

 

Parents
  • 28464
    posted

    If you set the EditorControlID property of the respective column to the ID of an editor control (Infragistics WebMaskEdit control) that can be anywhere on the page, then the editor will be shown on client without postback e.g.

      </igtbl:UltraGridColumn>                    
        <igtbl:UltraGridColumn BaseColumnName="ContactName" IsBound="True" EditorControlID="WebMaskEdit1" Key="ContactName">
            <Header Caption="ContactName">
                <RowLayoutColumnInfo OriginX="2" />
            </Header>
            <Footer>
                <RowLayoutColumnInfo OriginX="2" />
            </Footer>
        </igtbl:UltraGridColumn>         

        <igtxt:WebMaskEdit ID="WebMaskEdit1" runat="server" InputMask="someMask" >
        </igtxt:WebMaskEdit>

    If you need to do that dynamically with script, you can use something similar to this:


        <script language="javascript">

            function changeEditor()
            {
                var grid = igtbl_getGridById("UltraWebGrid1");
                grid.Bands[0].Columns[1].EditorControlID = "WebMaskEdit1"
            }
           
       
        </script>
     

Reply Children
No Data