当我在文本框中输入值时,如何并排显示Gridview [英] How To Show Gridview Side By Side When I Enter Value In Textbox

查看:55
本文介绍了当我在文本框中输入值时,如何并排显示Gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hai all



i有atextbox控件,所以我想要的是如果我在文本框中输入一些值,例如,如果我在文本框中输入3,则gridviws应显示在旁边一边



所以plz给我任何例子或链接

hai all

i have atextbox control so whati want is if i enter some value in textbox for example if i enter three in textbox 3 gridviws should be displayed side by side

so plz give me any examples or links

推荐答案

可以动态创建网格视图。 />


使用占位符控制 [ ^ ]在设计页面上创建占位符。

然后根据需要将gridview控件添加到此占位符(基于文本框中的条目数)。

例如
Gridviews can be created dynamically.

Use the Placeholder control[^] and create a placeholder on the design page.
Then add gridview controls to this placeholder on demand (based on number of entries in the text box).
E.g.
for(int i=0; i++, i<= numCount)
{
    GridView gv = new GridView();
    gv.ID = "_gridview" + i;
    placeholder1.Controls.Add(gv);
}





根据需要设置网格视图的数据源。



Set the data source of the grid views as required.


这篇关于当我在文本框中输入值时,如何并排显示Gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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