This is a migrated thread and some comments may be shown as answers.

Elapsed Time Entry?

2 Answers 94 Views
Input
This is a migrated thread and some comments may be shown as answers.
Bryan Kowalchuk
Top achievements
Rank 1
Bryan Kowalchuk asked on 24 Sep 2012, 08:22 PM
I need to enter elasped time in the format hh:mm:ss

The RadTimePicker is almost perfect except it is designed for time of day, not elapsed time, its not correct how it looks and  behaves for elapsed time.

Using the Masked Text box as shown below is less than ideal, since unless the user completey enters the data correctly(never happens), it will generate an error on the server side.

Any Ideas?
<telerik:RadMaskedTextBox ID="sesTotalTime" Label="Total Time:" runat="server" Text="<%# Bind('sesTotalTimeFormatted') %>"
    ToolTip="Total Session Time (hh:mm:ss)" Mask="##:##:##">
</telerik:RadMaskedTextBox>



2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Sep 2012, 06:06 AM
Hi,

One suggestion is that you can use 3 RadComboboxes for getting elapsed time as follows.

ASPX:
<telerik:RadComboBox ID="rcb_hours" runat="server"></telerik:RadComboBox>
<telerik:RadComboBox ID="rcb_mins" runat="server"></telerik:RadComboBox>
<telerik:RadComboBox ID="rcb_secs" runat="server"></telerik:RadComboBox>

C#:
protected void Page_Load(object sender, EventArgs e)
{
   ArrayList itemsList = new ArrayList();
   for (int i = 0; i < 60; i++)
   {
      itemsList.Add(i);
   }
   rcb_mins.DataSource = itemsList;
   rcb_mins.DataBind();
   rcb_secs.DataSource = itemsList;
   rcb_secs.DataBind();
   ArrayList hours = new ArrayList();
   for (int i = 0; i < 24; i++)
   {
      hours.Add(i);
   }
   rcb_hours.DataSource = hours;
   rcb_hours.DataBind();
}

Thanks,
Shinu.
0
Bryan Kowalchuk
Top achievements
Rank 1
answered on 25 Sep 2012, 02:56 PM
The three combo box idea could work if I can make it look right (pretty)
Thanks for the suggestion, I will give it a try. 
Tags
Input
Asked by
Bryan Kowalchuk
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Bryan Kowalchuk
Top achievements
Rank 1
Share this question
or