الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

سؤال فى Gridview

بدأه shosho842000 في 19 مايو 2009 · 0 رد · 340 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1

السلام عليكم ورحمته الله وبركاته

عازياه افهم الكود دا ممكن حد يشرحوا لى

<asp:templatefield headertext="Actions">

<itemtemplate>

<asp:linkbutton id="btnEdit" runat="server" commandname="Edit" text="Edit" CausesValidation="False" />

<asp:linkbutton id="btnDelete" runat="server" commandname="Delete" onclientclick="return confirm('Are you sure you want to delete this shipper?');"

text="Delete" CausesValidation="False" />

<asp:linkbutton id="btnSelect" runat="server" commandname="Select" text="Select" CausesValidation="False" />

</itemtemplate>

<edititemtemplate>

<asp:linkbutton id="btnUpdate" runat="server" commandname="Update" text="Update" CausesValidation="False" />

<asp:linkbutton id="btnCancel" runat="server" commandname="Cancel" text="Cancel" CausesValidation="False" />

</edititemtemplate>

<footertemplate>

<asp:linkbutton id="btnInsert" runat="server" commandname="Insert" text="Insert" />

<asp:linkbutton id="btnCancel" runat="server" commandname="Cancel" text="Cancel" CausesValidation="False" />

</footertemplate>

</asp:templatefield>

<asp:boundfield datafield="ShipperID" headertext="ShipperID" readonly="True"

sortexpression="ShipperID" />

<asp:templatefield headertext="CompanyName" sortexpression="CompanyName">

<itemtemplate>

<%# Eval("CompanyName") %>

</itemtemplate>

<edititemtemplate>

<asp:textbox id="txtCompanyName" runat="server" text='<%# Bind("CompanyName") %>' />

</edititemtemplate>

بس فى حاجات معينة الى عايزاه فيه زى

معنى id="txtCompanyName" runat="server" text='<%# Bind("CompanyName

الbind هنا يقصد بيها ايه او معناه ايه بيستخدمها فى ايه ولازم الاثنين يكونوا نفس الاسم

ال Eval("CompanyName" معناه ايه برضه او يقصد بيها ايه

هو ازاى احط ادوات فى footertemplet بايدى يعنى يكونوا ظاهريين فى footer 2 textbox مثلا

على اساس اقدر اضيف من خلالهم مثلا للgridview

مواضيع مشابهة