यह ग्रिड व्यू का मेरा मार्कअप है।ग्रिड व्यू में टेम्पलेट फ़ील्ड से मूल्य कैसे प्राप्त करें?
<Columns>
<asp:TemplateField HeaderText="Customer Name">
<ItemTemplate>
<asp:Label ID="lblname" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Customer.Name")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PickUpPoint">
<ItemTemplate>
<asp:Label ID="lblPickUpPoint" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Pickuppoint")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
मेरे पास एक बटन है जो एक्सेल ऑब्जेक्ट की वर्कशीट कोशिकाओं में मानों को संग्रहीत करता है।
for (int i = 0; i < GridView2.Rows.Count; i++)
{
for (int j = 0; j < GridView2.Rows[i].Cells.Count; j++)
{
xlWorkSheet.Cells[i + 1, j + 1] = GridView2.Rows[i].Cells[j].Text;
}
}
कैसे के रूप में GridView2.Rows[i].Cells[j]
.text रिक्त स्ट्रिंग रिटर्न मैं GridView के मूल्यों को प्राप्त और एक वर्कशीट में संग्रहीत है,।
ठीक है ... लेकिन, इसे कैसे करें अन्य नियंत्रणों के लिए ... यदि लूप दूसरे tym में प्रवेश करता है ... मैं लेबल को 'lblPickUpPoint' पर कैसे इंगित कर सकता हूं .... धन्यवाद – Kulkarni
एक आकर्षक आदमी की तरह काम करता है .... धन्यवाद ...... संपादित करें: अब मुझे ग्रिडव्यू के अंदर सभी डेटा मिल रहा है .. मैं 'टेम्पलेटफिल्ड हैडरटेक्स्ट' वर्कशीट के अंदर भी कैसे प्राप्त कर सकता हूं ... ??? अग्रिम धन्यवाद ... – Kulkarni
मैं वर्कशीट के अंदर 'टेम्पलेटफिल्ड हैडरटेक्स्ट' कैसे प्राप्त कर सकता हूं ... ?? – Kulkarni