Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
104 views
We're currently using an ASCX page as the edit template for a grid. We have some dates and times in the grid, but in this particular grid we want to allow the user to change the time but not change the date when editing an existing item. We use a label to display the date, and a RadTimePicker to display the time.

The problem is, whenever the user edits the time, the date is changing to today's date rather than maintaining the original date and only changing the time. Below is the definition of the control. Is our definition of the control missing something that would cause it to keep the date stored? Do RadTimePickers not store the date at all and I need to find some way of concatenating the results?

Below is the definition for one of these label-radtimepicker pairs.

<asp:Label id="txtDateIn" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.DateIn","{0:MM/dd/yy}") %>' Width="48px" />
                        <telerik:RadTimePicker ID="RadDateTimePicker3" EnableEmbeddedSkins="false" Skin="UCP_Vista" Width="85px" DbSelectedDate='<%# DataBinder.Eval( Container, "DataItem.DateIn")%>' runat="server">
                            <TimeView ID="TimeView1" runat="server" Interval="00:15:00" Columns="6" EnableEmbeddedSkins="false" Skin="UCP_Vista" ShowHeader="false" />
                            <DateInput ID="DateInput1" runat="server" Font-Size="11px" Font-Bold="true" ForeColor="#396F96" CssClass="itemt" />
                        </telerik:RadTimePicker>

I didn't see a forum for the date/time pickers, so if I missed one this belongs in, please feel free to move it to the correct forum.
Vasil
Telerik team
 answered on 17 Oct 2011
4 answers
115 views

Hello,

I have my RadScheduler configured to display our business week – Monday thru Sunday – but all the other popup date pickers display the standard Sunday thru Saturday display. 

How do I get these date pickers to synchronize with the FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" I set on the RadScheduler?

IE:  New Appointment Date Pickers, Today Date Picker, etc.

Regards,

Dean

Dean
Top achievements
Rank 1
 answered on 17 Oct 2011
1 answer
150 views
I have the problem that when the Rad Menu is in the aspx page after other controls like dropdown control or Listbox, the Rad menu overlap the items in the other controls and some ones cannot be selected. Please see the attachment . How can I avoid this problem??

Thx
HANK
Princy
Top achievements
Rank 2
 answered on 17 Oct 2011
4 answers
458 views
Hello Telerik Team,

I have an issue with radbutton control which acts as checkbox. What I've tried to achieve is to have same onclick event when user will click on asp:label control as it has when he clicks on radbutton itself. I don't want to use text property of radbutton because of css formatting. For further information, please check code below and picture in the attachment.

<asp:Panel runat="server" ID="pnl_spustit_schvalovaci_proces">
      <div class="LabelStyle1" style="clear: both; float: left; padding: 20px 10px 0px 2px">
               <asp:Label ID="Label35" runat="server" Text="Spustiť schvaľovací proces"></asp:Label>
       </div>
       <div style="float: left; padding: 20px 0px 0px 0px">
                 <telerik:RadButton ID="chk_spustit_schvalovaci_proces" runat="server" 
                               ButtonType="ToggleButton" ToggleType="CheckBox" 
                               OnClientClicking="spustit_schvalovaci_proces_OnClientClicking">                                    
                  </telerik:RadButton>
          </div>
</asp:Panel>

The question is, how to bind onclick event to label control with same object id as radbutton. Maybe via some jquery commands ?

Please help me to solve this issue.

Best regards

Vasssek
Vasssek
Top achievements
Rank 1
 answered on 17 Oct 2011
3 answers
109 views
I create tabstrip and multipage with js.how to trigger the pageview created event on server side or load the user control on client side?
 function openLink(linkName, linkValue) {  
            var tabStrip = $find("<%= RadTabStrip1.ClientID %>");  
            var multiPage = $find("<%= RadMultiPage1.ClientID %>");  
 
            tabStrip.trackChanges();  
            multiPage.trackChanges();  
 
            var tab = new Telerik.Web.UI.RadTab();  
            tab.set_text(linkName);  
            tab.set_value(linkValue);  
            tabStrip.get_tabs().add(tab);  
            AttachCloseImage(tab, "../Images/close.gif");  
              
            var page = new Telerik.Web.UI.RadPageView();  
            page.set_id(linkValue);  
            multiPage.get_pageViews().add(page);  
 
            tab.set_pageViewID(linkValue);  
              
            tabStrip.commitChanges();  
            multiPage.commitChanges();  
 
        }  
 
Sachin
Top achievements
Rank 1
 answered on 17 Oct 2011
1 answer
374 views
I'm trying to use the color picker to load and save values. My values are stored in normal HTML format (#000000). The demos show that you can set the selected color in the control property like so: SelectedColor = "#000000" however the property is really a System.Drawing.Color type. You cannot set the property like this: ColorPicker.SelectedColor = "#000000"; in the code. Instead you must convert the HTML string to System.Drawing.Color.

This seems so basic, I think I must be missing something. Are there no built in routines to allow us to easily load and save HTML colors or do we really have to convert everything to and from the database?

Can you give me two examples of the recommended way of setting and getting an HTML color value from code?
Slav
Telerik team
 answered on 17 Oct 2011
6 answers
202 views
Hi,
  I'm implementing a listview in which a chage page size combobox is used inside the layouttemplate. a ajaxmanager is added so that the trigger element is the listview and the updated element is also the listview and another control to prevent page flicker. I have some jquery code defined in the header section. when the page is first loaded, the jquery work fine, but when I change the pagesize by the combobox, the jquery stop working. Strange enough, when I change the jquery to javascript event, the event handler works in all cases. I use firebug from firefox to debug and find out that when change pagesize triggers a postback, the html is rendered back to the browser with a different version; the header part is completely missing, so is the jquery. If I define javascript event handler, it is missing too, but still functions, except I cannot step into the javascript source. I checked and find out this is caused by the ajaxmanager because when I checked off the listview from the ajax trigger control, the complete html is rendered back and the jquery works as expected. Is there any way to fix this but still retain ajax effect ? I wonder if moving the change pagesize combobox out of the listview and set it to the ajax update trigger would make it work. In that case how to get the pager control inside the layouttemplate equivalent to previouse code sample: combo.NamingContainer as RadDataPagerFieldItem).Owner.PageSize.
  I would appreciate it very much if you could explain the details and give some advice.
thank you.
Pavlina
Telerik team
 answered on 17 Oct 2011
1 answer
157 views
Hi,

I am using RadControls for ASP.NET Ajax 2011 Q2.

I've got a RadGrid with paging enabled, and the page sizes can be changed. To achieve custom page sizes, I got this:

void RadGridView1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
 
        PageSizeCombo.Items.Clear();
        PageSizeCombo.Items.Add(new RadComboBoxItem("25"));
        PageSizeCombo.FindItemByText("25").Attributes.Add("ownerTableViewId", RadGridView1.MasterTableView.ClientID);
        // and so on...

In the same aspx I have an overlay div which grays out the page and displays a waiting icon. It can be called via javascript, the code executing the overlay is simple and always works fine, because the elements both exist in every page:

function showLoadingOverlay() {
    try {
        $("#overlaydiv").css('visibility', 'visible');
        $(".loadingImage").css('visibility', 'visible');
    } catch (exc) { }
}
function hideLoadingOverlay() {
    try {
        $("#overlaydiv").css('visibility', 'hidden');
        $(".loadingImage").css('visibility', 'hidden');
    } catch (exc) { }
}


I use the RadComboBox'es OnClientSelectedIndexChanged Attribute on many ComboBoxes, that are Autopostback and do something time consuming, for this I have the function:

function OnClientSelectedIndexChanged(item) {
    showLoadingOverlay();
}


The trouble comes, when I set the OnClientSelectedIndexChanged method of the RadComboBox used for chaning page size, like this:

void RadGridView1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
        PageSizeCombo.OnClientSelectedIndexChanged = "OnClientSelectedIndexChanged";
        // ...

The PageSizeCombo actually does display the overlay div as it should, BUT there is no PostBack.

Several other RadComboBoxes on the same page are AutoPostBack==true also, and they all still fire the PostBack even with theOnClientSelectedIndexChanged  event.

When I manually enable the AutoPostBack of the RadComboBox, there is a PostBack, but the RadGrid's NeedDataSource event isn't called (in which I use the new page size, if there is any).

void RadGridView1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
        PageSizeCombo.OnClientSelectedIndexChanged = "OnClientSelectedIndexChanged";
        PageSizeCombo.AutoPostBack = true;


When I manually add a SelectedIndexChanged, that should refresh the data source (used by other RadComboBoxes!), the event still doesn't fire:

void RadGridView1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
        PageSizeCombo.OnClientSelectedIndexChanged = "OnClientSelectedIndexChanged";
        PageSizeCombo.AutoPostBack = true;
        PageSizeCombo.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(FilterChanged_RadComboBox);

I really don't know what else to try, and I am wondering if this might be a bug, or at least something that doesn't work because nobody expected anyone to use the OnClientSelectedIndexChanged attribute of this builtin RadComboBox?

I would appriciate any fixed or workarounds, apart from creating my own RadComboBox for the pagesizes, because I don't want to fiddle with getting my own RadComboBox right next to the other paging controls.

Cheers
Pavlina
Telerik team
 answered on 17 Oct 2011
2 answers
151 views
We are allowing users to choose multiple employees separated by semi-colons from a large list of employees, similar to the way MS Outlook allows you to choose multiple people to send an email to.

We are using a RadComboBox with an auto complete separator allowing us to choose multiple items from the combo box.

<telerik:RadComboBox

ID="cmbAuthors" runat="server"     

Width="400px" Height="140px"    

EmptyMessage="Type an author"         

MarkFirstMatch = "true"   

AutoCompleteSeparator = ";"

DataTextField="fullname"    >                                                                   

</telerik:RadComboBox>                           


We are seeing a bunch of strange stuff happen:
1) If you have nothing selected in the combobox and move to the next control, the first item is selected.
2) If you choose a couple of names from the drop down, hit semi-colon, and then tab to the next control, the first item in the dd is appended to the list.
3) If you just try to highlight everything in the text box and delete it in order to start over, some combination of what you originally had in the box reappears, sometimes just the last item you had choosen appears, sometimes the entire previous selection reappears.

This seems like a simple use case, anyone else seeing this behavior or have some tips.

Thanks
Ivana
Telerik team
 answered on 17 Oct 2011
2 answers
226 views

Hi Guys,

Here i radtextbox textmode="password" ,
Edit Mode's not assigned any value ,


<telerik:RadTextBox Width="50%" ID="password" AutoCompleteType="Disabled" runat="server"
MaxLength="10" TextMode="Password"
Text='<%# Bind("password") %>'>
</telerik:RadTextBox>


Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 17 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?