根据在文本框中输入的行大小,如何生成这么多行的动态网格视图? [英] Based on the rowsize entered on the text box, how to generate a dynamic grid view of that many row?

查看:74
本文介绍了根据在文本框中输入的行大小,如何生成这么多行的动态网格视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个文本框,上面有2个验证(范围验证器和req字段验证器).
现在,如果我输入0到8之间的整数,刚好在失去文本框焦点之后,我需要生成一个网格,其中应该包含恰好这么多的行.
现在,我的问题是:
1. 如何捕获在文本框中输入的数字并且没有任何按钮单击事件,如何生成网格?我想,我需要在TextBox事件之一中编写代码.但是,哪一个?如何?
请为我提供紧急帮助.

Hi,
I have a text box.It is having 2 validation on it(Range validator and req field validator).
Now,if I enter an integer within 0-8,just after gettting out of focus of the text box,I need to generate a grid which should contain exactly that many number of rows.
Now,My question is:
1.How to capture that number entered in the text box and without any button click event,how to to generate the grid?I suppose,I need to write the code in one of the TextBox event.But,which one and how?
Please help me as I am in urgent need.

推荐答案

// 
protected void TextBox1_TextChanged(object sender, EventArgs e)
   {
      // capture number enterd in text box
       string Num = TextBox1.Text;

     // code to generate the grid

   }


这篇关于根据在文本框中输入的行大小,如何生成这么多行的动态网格视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆