开发者

TextBox column in GridView

I added a textbox column in the gridview by using the following code.

<asp:TemplateField HeaderText="Order">
                    <ItemStyle/>
                      <ItemTemp开发者_如何学JAVAlate>
               <asp:TextBox ID="txtPriority" runat="server" width="15px" />
                        </ItemTemplate>
                    </asp:TemplateField>

The user will enter the an order for rows in the text box,which i have to use for my program. The issues that involved are 1.Preventing the user from entering duplicate values.we have to use javascript or jquery. 2.Persisting the values between gridview page changes.

My idea is to keep one hidden column in the grid and save the values into it as soon as user enter the value into textbox and thus persisting is done..

Give your ideas,Code snippets,links ...

Thanking you very much


  1. Javascript to prevent duplicate values is a fine idea.
  2. ViewState automatically persists the values. Do you not want to use ViewState?
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜