Someone can help me?
Tks,
Duan Brito
Hi All,I need to add the mask to columns of the grid dynamically, but no luck so for , but the i can add the mask as below1.Create Mask control in aspx page with required InputMask<igtxt:WebMaskEdit id="WebMaskEdit1" runat="server" BorderStyle="None" InputMask="(###) ###-####" Font-Size="8pt" Font-Names="Verdana"></igtxt:WebMaskEdit>2.In the code behind page , to the column of the grid add the mask id as belowgrdMain.DisplayLayout.Bands(0).Columns.FromKey(col.ColumnName.ToUpper()).EditorControlID = WebMaskEdit1.UniqueIDBut when i create the WebMaskEdit control dynamically as Dim WebMaskEdit1 As New WebDataInput.WebMaskEdit WebMaskEdit1.Visible = True WebMaskEdit1.ID = "wmControl" & col.ColumnName WebMaskEdit1.BorderStyle = BorderStyle.None WebMaskEdit1.Style.Add("Font-Size", "8pt") WebMaskEdit1.InputMask = "(###) ###-####" grdMain.Controls.Add(WebMaskEdit1)and add the grid column as belowgrdMain.DisplayLayout.Bands(0).Columns.FromKey(col.ColumnName.ToUpper()).EditorControlID = WebMaskEdit1.UniqueIDnot working as expectedThanks-Ramesh.P
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>