GridView绑定 [英] GridView Bound

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

问题描述

//< asp:Gridview/>
之后

// after <asp:Gridview />

<columns>
                            <asp:BoundField DataField="SrNo" Visible="false" ItemStyle-ForeColor="Black">
                            <asp:BoundField DataField="Name" HeaderText="NAME" ItemStyle-ForeColor="Black">
                            <asp:BoundField DataField="Birth" HeaderText="BIRTH" ItemStyle-ForeColor="Black">
                            
                            <asp:BoundField DataField="Age" HeaderText="AGE" ItemStyle-ForeColor="Black">
                            <asp:TemplateField HeaderText="EDIT?">
                                <itemtemplate>
                                    <asp:LinkButton ID="lnkEdit" ForeColor="black" CommandName="Edit" CommandArgument='<%# Eval("SrNo") %>'

                                        runat="server" Text="Edit">
                                    
                                </itemtemplate>
                            
                            <asp:TemplateField HeaderText="DELETE?">
                                <itemtemplate>
                                    <asp:LinkButton ID="lnkDelete" OnClientClick="return confirm('Are you sure, you want to delete Record?');return false;"

                                        ForeColor="black" CommandName="Delete" CommandArgument='<%# Eval("SrNo") %>'

                                        runat="server" Text="Delete">
                                    
                                </itemtemplate>
                            
                        </columns>

推荐答案

是的,HTML看起来不错,但gridview绑定将需要更多代码来显示结果!

您需要付出更多的努力,并建议您停止出现此类问题的论坛.请尝试并具体说明发布问题.
Yes the HTML looks ok but the gridview bind would need more code to show result!

You need to make more effort and would suggest you to stop flooding forum with such questions. Please try and be specific in posting issues.


没有问题,并从标题中删除了((是对的))".我们无法告诉您您的代码是否正确",因为我们没有(也不想要)您的所有代码.如果可以编译,请在调试器下运行它.如果不正确,您很快就会知道.
Not a question, and removed "(Is it right)" from title. We can''t tell you if your code is "right", because we don''t have (nor do we want) all of your code. If it compiles, run it under the debugger. If it''s not right, you''ll know in short order.


这篇关于GridView绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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