如何在C#中使用单个网格视图进行不同的操作/目的 [英] How Do I Use Single Grid View For Different Operation/Purposes In C#

查看:77
本文介绍了如何在C#中使用单个网格视图进行不同的操作/目的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有网格视图来显示产品信息。我正在使用组合框。有不同的搜索类型是1.按名称搜索,2.按类别等在这里我使用select *但是当我要搜索产品库存量时,只有一列,因为我在这里使用产品中的选择库存。 br />
所以我的问题是我的股票在选择*列完成后打印。

是否有任何解决方案可以显示它?

I have grid view to show product information . I am using combo box. There is different search type that is 1. search by name, 2.by category etc here I use select * but when i am going to search amount of product stock there is only one column because here I am using select stock from product.
So my problem is my stock is printed after select * column finishes.
Is there any solution to display it ?

推荐答案

让我的建议是。

我在这里给出退出语法..它可以帮助你..

Let my suggestion is.
I am giving quit syntax here.. it may help u..
<pre lang="vb"><gridview autogenerated column="false">
<column>
<asp:templatefield header="product name>
<itemtemplate>
<asp:label id="lProd" text='<% Eval(# "product name") >'></label>
</item template>
<templatefield>
<asp:templatefield header="product prize>
<itemtemplate>
<asp:label id="lProd" text='<% Eval(# "product  prize") >'></label>
</item template>
<templatefield>
</column>
</gridview></pre>







它只是一种语法..请忽略我所做的错误只是掌握了这个想法..

通过eval值和模板头你可以得到输出。 。并在gridview中自动生成column =false




Its just a syntax.. please neglectthe errors i done just grasp the idea..
By means of eval value and template header u can get the output.. and in gridview auto generated column="false"


这篇关于如何在C#中使用单个网格视图进行不同的操作/目的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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