Saturday 15 March 2014

MaskedEditExtender is not working from 2nd line in gridview in Asp.Net -


I have a gridview on my page, there are three columns, for a quantity, I have a masked editor with simple textbox To use, but it is only working on the first line, the text box from the second line is displayed without the mask.

Here's my code:

  & lt; Columns & gt; & Lt; Asp: TemplateField Header Text = "Quantity" & gt; & Lt; ItemTemplate & gt; & Lt; ASP: text box id = "textcat" runat = "server" validation group = "mke" maxlend = "5" style = "text-align: true" width = "100px" text = '& lt;% # BIND "QUAN")% & Gt; '/ & Gt; & Lt; AjaxToolkit: MaskAditEditor ID = "txtQuan_MaskedEditExtender" runat = "server" enabled = "true" mask = "99999" TargetControlID = "txtQuan" /> & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; The reason for this is because when GridWave provides a line in the line with the Defined Autogenerated ID, the Textbox and You have given a certain name in the TargetControlID property in the Mask Adapter. So you need to use a robotic data to insert a masked entry in each textbox.   

No comments:

Post a Comment