网格中的文本框搜索 [英] TextBox search in Grid

查看:69
本文介绍了网格中的文本框搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个文本框和一个按钮,我想从sql server数据库中搜索数据,然后在网格中显示结果.网格必须首先隐藏,当我单击搜索按钮时,它应该显示并显示结果.然后,当我单击网格中的任何结果时,它将单击的数据填充到第二个网格中.
谁能告诉我该怎么做?
感谢任何小的帮助.

Hi,

I have one textbox and one button and I want to search the data from my sql server database and then show the result in a grid. The grid has to be hidden initially and when I click the search button, it should show up and display the results. Then, when I click on anyone of result from grid, it will populate clicked data into second grid.
Can anyone tell me how to do this?
Any small help is appreciated.

推荐答案

步骤:
1.搜索面板-文本框和按钮
2.单击按钮时,使用文本框文本,形成搜索查询,点击DB并取回数据
3.将此数据绑定到datagrid并将其可见性设置为true
4.在行选择事件中,捕获行唯一标识符,然后在另一个面板/网格中填充该选定行的值.使此新面板/网格的可见性变为现实.

完毕.尝试!
Steps:
1. Search panel - a textbox & a button
2. On button click, use the textbox text, form a search query, hit DB and get back data
3. Bind this data to datagrid and set its visibility to true
4. On row selection event, trap the row unique identifier and fill the values of that selected row in another panel/grid. Make the visbility of this new panel/grid to true.

Done. Try!


应该可以帮助您开始.
This should get you started.


这篇关于网格中的文本框搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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