i have a gridview and inside i have a TimeSelector, but how am i going to retrieve the time from the gridview cause if normally it is a TextBox we will use this
Dim rbSelect As TextBox = DirectCast(GridView2.Cells(1).FindControl("TextBox"), TextBox)
so how should i retrieve the time from the timeselector in the gridview?
time picker control:
<%@ Register Assembly=”TimePicker” Namespace=”MKB.TimePicker” TagPrefix=”cc1″ %>
<ItemTemplate>
<table style="width: 79%; height: 31px;">
<tr>
<td class="style1">
<asp:Label ID="Label1" runat="server" Text="Time to start:"></asp:Label>
</td>
<td>
<cc1:TimeSelector ID="TimeSelector3" runat="server" AllowSecondEditing="false" DisplaySeconds="False" Height="25px" MinuteIncrement="15" Width="150px" />
</td>
</tr>
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Button"
onclick="Button1_Click" />
</td>
</tr>
</table>
</ItemTemplate>
<ControlStyle Width="100px" />
<ItemStyle Width="210px" />
</asp:TemplateField>
So here is some information for you how to do this:
Add reference to the TimePicker.dll. See more information about it here. The picker I just was this
On the aspx page that you are working at the to you write. To see more information about how to formulate the register tag see this:
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="mkb"%>To use the
TimePickerakaTimeSelector(I know this because I looked at the dll in .net reflector see this). You need to have oneScriptManagerper page.<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>To use the control on the page write:
<mkb:TimeSelector ID="TimeSelector1" runat="server"></mkb:TimeSelector>This is how you add a single
TimeSelectorto you page.Here is a full example of a
TimeSelectorinside of a gridview:Default.aspx
Default.aspx.vb