How can I use my Own control in DataGrid?

I

Information

Hi,
I am trying to use my own calender control into datagrid but on clicking on
it, i can not open that control. I am having date by choosing it from that
control into input textbox.
 
S

Steve Goodyear

You can add your control inside a TemplateColumn:
<Columns>
<asp:TemplateColumn>
<ItemTemplate>

<uc1:MyControl ...

</ItemTemplate>
<EditItemTemplate></EditItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>

Cheers,
Steve Goodyear
 
I

Information

Thanx Steve :)
I've tried to use my calendar control by putting it in User Control and use
it as u've told me but still it doesn't open on clicking on icon.

<asp:TemplateColumn HeaderText="Date">
<ItemTemplate>
<asp:Label id=lbldate runat="server" Text='<%#
DataBinder.Eval(Container.DataItem,"Date") %>'>
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<uc1:Calendar id="Calendar1" runat="server"></uc1:Calendar>
</FooterTemplate>
<EditItemTemplate>
<INPUT id="txtDate" Runat="server">
</EditItemTemplate>
</asp:TemplateColumn>
i want it in footer
thanx for ur cooperation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top