views:

1706

answers:

1

I want to add Mask textbox in datagridview in windows application.

The mask textbox will hold the mask for time value.

How this can be done in the windows datagridview? Any help?

+1  A: 

it is simple: just add it inside a template column

    <asp:GridView ID="gv" runat="server">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:TextBox ID="txt" runat="server" />
                    <ajaxtoolkit:maskededitextender targetcontrolid="txt" mask="9,999,999.99" messagevalidatortip="true"
                        onfocuscssclass="MaskedEditFocus" oninvalidcssclass="MaskedEditError" masktype="Number"
                        inputdirection="RightToLeft" acceptnegative="Left" displaymoney="Left" errortooltipenabled="True" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>

you changed... now you say Windows application :D

for Windows Forms you should read this article

balexandre
Changed??? No, Is there any edit history?
Dhana
so, it was me ... I read one thing and thought the other, but you do have the answer for both :)
balexandre