Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
192 views
Hi,
I want to use a Radcombobox like this : Radcombobox template in my advancedform.ascx.
But javascript functions seem not to be called.

P.S : the radcombobox works fine in a simple aspx page.

<div class="rsAdvancedEdit" style="position: relative"
    <div class="rsAdvTitle"
        <h1 class="rsAdvInnerTitle"
            <%= Owner.Localization.AdvancedEditAppointment %></h1
        <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose" 
            CommandName="Cancel" CausesValidation="false" ToolTip='<%# Owner.Localization.AdvancedClose %>'
            <%= Owner.Localization.AdvancedClose %> 
        </asp:LinkButton> 
    </div> 
    <div class="rsAdvContentWrapper"
        <div class="rsAdvOptionsScroll"
            <asp:Panel runat="server" ID="AdvancedEditOptionsPanel" CssClass="rsAdvOptions"
                <asp:Panel runat="server" ID="BasicControlsPanel" CssClass="rsAdvBasicControls" OnDataBinding="BasicControlsPanel_DataBinding">                     
                    <telerik:RadTextBox runat="server" ID="SubjectText" Width="100%" Rows="5" Columns="50" 
                        TextMode="MultiLine" Label='<%# Owner.Localization.AdvancedSubject + ":" %>' 
                        Text='<%# Eval("Subject") %>' /> 
                    <asp:RequiredFieldValidator runat="server" ID="SubjectValidator" ControlToValidate="SubjectText" 
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" /> 
                    <ul class="rsTimePickers"
                        <li class="rsTimePick"
                            <label for='<%= StartDate.ClientID %>_dateInput_text'
                                <%= Owner.Localization.AdvancedFrom %> 
                            </label> 
                            <telerik:RadDatePicker runat="server" ID="StartDate" CssClass="rsAdvDatePicker" 
                                Width="83px" SharedCalendarID="SharedCalendar" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>' 
                                MinDate="1900-01-01"
                                <DatePopupButton Visible="False" /> 
                                <DateInput ID="DateInput2" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>' 
                                    EmptyMessageStyle-CssClass="riError" EmptyMessage=" " /> 
                            </telerik:RadDatePicker>                             
                            <telerik:RadTimePicker runat="server" ID="StartTime" CssClass="rsAdvTimePicker" 
                                Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'
                                <DateInput ID="DateInput3" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" " /> 
                                <TimePopupButton Visible="false" /> 
                                <TimeView ID="TimeView1" runat="server" Columns="2" ShowHeader="false" StartTime="08:00" 
                                    EndTime="18:00" Interval="00:30" /> 
                            </telerik:RadTimePicker> 
                        </li> 
                        <li class="rsTimePick"
                            <label for='<%= EndDate.ClientID %>_dateInput_text'
                                <%= Owner.Localization.AdvancedTo%> 
                            </label> 
                            <telerik:RadDatePicker runat="server" ID="EndDate" CssClass="rsAdvDatePicker" 
                                Width="83px" SharedCalendarID="SharedCalendar" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>' 
                                MinDate="1900-01-01"
                                <DatePopupButton Visible="False" /> 
                                <DateInput ID="DateInput4" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>' 
                                    EmptyMessageStyle-CssClass="riError" EmptyMessage=" " /> 
                            </telerik:RadDatePicker>                         
                            <telerik:RadTimePicker runat="server" ID="EndTime" CssClass="rsAdvTimePicker" 
                                Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'
                                <DateInput ID="DateInput5" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" " /> 
                                <TimePopupButton Visible="false" /> 
                                <TimeView ID="TimeView2" runat="server" Columns="2" ShowHeader="false" StartTime="08:00" 
                                    EndTime="18:00" Interval="00:30" /> 
                            </telerik:RadTimePicker> 
                        </li> 
                        <li class="rsAllDayWrapper"
                            <asp:CheckBox runat="server" ID="AllDayEvent" CssClass="rsAdvChkWrap" Checked="false" /> 
                        </li> 
                    </ul> 
                    <asp:RequiredFieldValidator runat="server" ID="StartDateValidator" ControlToValidate="StartDate" 
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" /> 
                    <asp:RequiredFieldValidator runat="server" ID="StartTimeValidator" ControlToValidate="StartTime" 
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" /> 
                    <asp:RequiredFieldValidator runat="server" ID="EndDateValidator" ControlToValidate="EndDate" 
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" /> 
                    <asp:RequiredFieldValidator runat="server" ID="EndTimeValidator" ControlToValidate="EndTime" 
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" /> 
                    <asp:CustomValidator runat="server" ID="DurationValidator" ControlToValidate="StartDate" 
                        EnableClientScript="false" Display="Dynamic" CssClass="rsValidatorMsg rsInvalid" 
                        OnServerValidate="DurationValidator_OnServerValidate" /> 
                </asp:Panel> 
                <asp:Panel runat="server" ID="AdvancedControlsPanel" CssClass="rsAdvMoreControls"
                    <label> 
                        Test id_projet : 
                    </label> 
                    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
                        <script type="text/javascript" language="javascript"
                            var cancelDropDownClosing = false
                                                         
                            function StopPropagation(e) 
                            { 
                                //cancel bubbling 
                                e.cancelBubble = true
                                if (e.stopPropagation) 
                                { 
                                    e.stopPropagation(); 
                                } 
                            } 
 
                            function onDropDownClosing() 
                            { 
                                cancelDropDownClosing = false
                            } 
 
                            function OnClientNodeClickingHandler(sender, e) 
                            { 
                                var node = e.get_node(); 
                                if (node.get_category() == "Client") 
                                { 
                                    node.toggle(); 
                                } 
                                else 
                                { 
                                    //find the combobox, set its text and close it 
                                    var combo = $find("<%= RCB_projet.ClientID %>"); 
                                    combo.set_text(node.get_text()); 
                                    cancelDropDownClosing = false
                                    combo.hideDropDown(); 
                                } 
                            } 
 
                            function OnClientDropDownClosingHandler(sender, e) 
                            { 
                                //do not close the second combo if 
                                //a checkbox from the first is clicked 
                                e.set_cancel(cancelDropDownClosing); 
                            } 
                        </script> 
                    </telerik:RadCodeBlock>              
                    <telerik:RadComboBox ID="RCB_projet" runat="server" OnClientDropDownClosing="OnClientDropDownClosingHandler"
                        <ItemTemplate> 
                            <div onclick="StopPropagation(event)"
                                <telerik:RadTreeView ID="RadTreeView1" runat="server" DataSourceID="SqlDataSourceTreeview" 
                                    DataTextField="projet" DataValueField="ID" DataFieldID="ID" DataFieldParentID="client_id" 
                                    OnClientNodeClicking="OnClientNodeClickingHandler"
                                    <DataBindings> 
                                        <telerik:RadTreeNodeBinding Depth="0" Category="Client" /> 
                                    </DataBindings> 
                                </telerik:RadTreeView> 
                            </div> 
                        </ItemTemplate> 
                        <Items> 
                            <telerik:RadComboBoxItem /> 
                        </Items> 
                    </telerik:RadComboBox> 
                    <asp:SqlDataSource ID="SqlDataSourceTreeview" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                        SelectCommand="SELECT ('client_' + CAST(id_client AS VARCHAR)) AS ID, nom_client AS projet, NULL AS client_id 
                        FROM dbo.tbl_client_ca 
                        UNION 
                        SELECT CAST(projet.id_projet AS VARCHAR) AS ID, projet.projet AS projet, ('client_' + CAST(lppc.id_client AS VARCHAR)) AS client_id 
                        FROM dbo.tbl_projet projet 
                        LEFT OUTER JOIN dbo.lnk_projet_projet_ca lppc ON lppc.id_projet = projet.id_projet 
                        ORDER BY projet"> 
                    </asp:SqlDataSource> 
                    <asp:Panel runat="server" ID="ResourceControls"
                        <ul class="rsResourceControls"
                            <li> 
                                <scheduler:ResourceControl runat="server" ID="ResRessource" Type="Ressource" Label="Ressource : " 
                                    Skin='<%# Owner.Skin %>' /> 
                            </li> 
                            <li> 
                                <scheduler:ResourceControl runat="server" ID="ResRole" Type="Role" Label="Role : " 
                                    Skin='<%# Owner.Skin %>' /> 
                            </li> 
                        </ul> 
                    </asp:Panel> 
                </asp:Panel> 
                <span class="rsAdvResetExceptions"
                    <asp:LinkButton runat="server" ID="ResetExceptions" OnClick="ResetExceptions_OnClick" /> 
                </span> 
                <telerik:RadSchedulerRecurrenceEditor runat="server" ID="AppointmentRecurrenceEditor" /> 
                <asp:HiddenField runat="server" ID="OriginalRecurrenceRule" /> 
                <telerik:RadCalendar runat="server" ID="SharedCalendar" Skin='<%# Owner.Skin %>' 
                    CultureInfo='<%# Owner.Culture %>' ShowRowHeaders="false" RangeMinDate="1900-01-01" /> 
            </asp:Panel> 
        </div> 
        <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea"
            <div class="rsAdvButtonWrapper"
                <asp:LinkButton runat="server" ID="UpdateButton" CssClass="rsAdvEditSave"
                    <span><%= Owner.Localization.Save %></span
                </asp:LinkButton> 
                <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel" 
                    CausesValidation="false"
                    <span><%= Owner.Localization.Cancel %></span
                </asp:LinkButton> 
            </div> 
        </asp:Panel> 
    </div> 
</div> 
<asp:SqlDataSource ID="SqlDataSourceProjetID" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" SelectCommand="SELECT [id_projet], [projet] FROM [tbl_projet]"></asp:SqlDataSource> 

Plamen
Telerik team
 answered on 01 Jan 2015
11 answers
153 views
When I upload a Picture using Image Manager I want it to be scaled down to max width of 400px (according to scale) if a picture is about 1200px wide.
How can I do that?
If an image is about 250 px, do nothing.

And i try "Resizing an image during upload" in Code Library/Editor
If I choose a .jpg file and uploads it is saved with the name and extension as the original. But it is converted into .png
How can I change it? I upload a .jpg image I want it to still .jpg after it is stripped down to the new size
Konstantin Dikov
Telerik team
 answered on 01 Jan 2015
1 answer
114 views
It seems like the built-in styles for PanelBar using the Metro-skin has it's styles defined with !important which makes it impossible to override for us.

.RadPanelBar_Metro .rpSelected,.RadPanelBar_Metro .rpExpanded {background-color: #25a0da!important;color: white!important;border-color: transparent!important;}

Is this by design ? The Silk-skin does not have !important defined on its style from the Telerik.WebResource

I saw another post about a similar query, where a solution was to use the PreRenderComplete to make sure our own css are loaded AFTER the built-in Telerik ones. However we are using MasterPages where this approach won't work.
Ivan Zhekov
Telerik team
 answered on 01 Jan 2015
4 answers
144 views
Hi,
           I want a grid export to PDF but after exporting formatting not showing on PDF.

I  am using this style for formatting but it not works

   item["Average"].Style["font-weight"] = "Bold";   item["Average"].Style["text-decoration"] = "underline";

OR
   item["Average"].Font.Bold=true;       item["Average"].Font.Underline=true;

Please Check the attachment .
rahul
Top achievements
Rank 1
 answered on 01 Jan 2015
1 answer
194 views
I have implemented a RadProgressArea for a RadFileUpload control.  Works great locally but when rolled to my production server (IIS 7.5) what happens is this:

1. Select a file
2. Click Upload
3. I select a large file so it takes a while
4. I see the time remaining ticking down, 8, 6, 4, 2, 0 and THEN AFTER the time remaining has went to 0 then the progress bar starts moving to the right, 20%, 44%, 100%.

So I put event log entries in the code to try and see what's up.  I tried every forum suggestion on web.config changes, handler changes and none of that works.  However I have found the issue.  I update the progress bar in my server side code.  I have a method that uploads my file in chunks to the destination folder and as it is doing that I update the RadProgressContext.  Here's the problem though.  When I click my Upload button it takes EXACTLY the length of time to upload the file before that server side button click method is executed.  So in step 4 above as that time is ticking down the RadProgressHandler is being called client side and then once it is completed my button method is executed and my progress bar starts updating and the file is ACTUALLY being uploaded then. 

Can someone explain to me what the crap is going on?  Why is it when I click my Upload button (it's just an asp.net button) it acts as if the file is being uploaded and then once complete with time remaining of 0 the actual button click method is executed?



Plamen
Telerik team
 answered on 01 Jan 2015
9 answers
398 views
Hello,

We have implemented RadProgressArea in our web application for Import function.
We are reading file and then processing each record one by one to insert/update in database. It is long running task depends on file's data. We added RadProgressArea to show import progress in percentage. We did not use RadProgressArea in file upload though.

It is working fine in our local environment but when we posted that on server, it is not working. Progress bar is not shown in Firefox, IE10 shows sometime and in chrome shows from start but not update percentage count.

We read articles and forums but did not find perfect solution for that. We make all web.config changes as per the article.

Can you please guide us in that?

Regards,

Plamen
Telerik team
 answered on 01 Jan 2015
4 answers
204 views
Hi,
 
I'm using Style Builder to modify the Silk theme, it works ok. But I need to remove the background image for "Button normal state right rounded corner", on the web browser it's ok, but when I download the style and test on my project, display the background image.

And when I upload the Zip file to modify the button, the background image is displayed on the editor.

It is the same case for Tabstrip and Menu.


Regards.

Mike

Ivan Zhekov
Telerik team
 answered on 01 Jan 2015
1 answer
123 views
Hello

I have attached to photos in this thread , i want to set my style in a way that , my tab looks like photo2,what ever I do i cant make it looks like photo2 ,i have attached my style ,please help me...

Thanks a lot


.RadTabStrip
{
    
   margin-top:3px;    
   height:37px;
   float:right;
   margin-right:200px;
}
.RadTabStrip div
{
    float:right;
}

.RadTabStripTop_Default_rtl .rtsLevel .rtsLink
{
    padding-right:0 !important
}
.RadTabStrip .rtsUL, .RadTabStripVertical .rtsUL
{
    
}
.RadTabStrip_Default .rtsLI, .RadTabStrip_Default .rtsLink
{


}
.RadTabStrip .rtsLI .rtsLink
{
   
}
.RadTabStrip .rtsLevel1 .rtsLI .rtsLink
{
    color:#fff;
    background:url(../Images/Cool_Tab/tab-uselected-left.png) 10px 0 no-repeat;
    height:37px;
    font-family:Yekan,YekanNumbers,Tahoma;
    font-size:9pt;
    font-weight:normal;
    padding-left:53px;
    margin-left:0;
 
}
.RadTabStrip .rtsLevel1 .rtsLI .rtsLink .rtsOut
{
   background:url(../Images/Cool_Tab/tab-uselected-right.png) right 0px no-repeat;
    height:37px;
    padding-right:53px;
 
     
}
.RadTabStrip .rtsLevel1 .rtsLI .rtsLink .rtsIn
{
      background-image:url('../Images/Cool_Tab/tab-uselected.png');
 height:37px;
   background-repeat:repeat-x;
   line-height:37px;
}
.RadTabStrip .rtsLevel1 rtsLI .rtsLink:hover
{
    color:Green;
}
.RadTabStrip .rtsLevel1 .rtsLI .rtsLink.rtsSelected
{
    padding-top: 0px;
   background: transparent url('../Images/Cool_Tab/tab-selected-left.png') 10px 0px no-repeat;
   line-height:40px;
   width:53px;
   
   z-index:2 !important
 
}
.RadTabStripTop_Default_rtl .rtsLevel .rtsLink
{
   /*padding-right:5px !important*/
}
.RadTabStrip .rtsLevel1 .rtsLI .rtsLink.rtsSelected .rtsOut
{
   background-image:url('../Images/Cool_Tab/tab-selected-right.png');
   background-position:right;
   background-repeat:no-repeat;
   height: 40px;
   color: #fff;   
   font-family:Yekan,YekanNumbers,Tahoma;
   font-size:9pt;
   font-weight:normal;
 
   
}
.RadTabStrip .rtsLevel1 .rtsLI .rtsLink.rtsSelected .rtsIn
{
  background-image:url('../Images/Cool_Tab/tab-selected.png');
 height:40px;
   background-repeat:repeat-x;
   color:#000
    
}

Ivan Zhekov
Telerik team
 answered on 01 Jan 2015
1 answer
150 views
Hello,
I'm still using radgrid for asp.net (2007 edition).
I have many grids with edit form in user controls.
Usually I have on the user control (the edit form) two link buttons with command names "Update" and "Cancel".
I handle the command in an ItemCommand event procedure.
When those links are clicked I get in the event argument an item which is "EditFormItem".
I tried to add a third link with new commandname "Attach".
When the the event procedure is called after clicking the new link, I get an item of type "Item".
Can I use commandname which is not "Update", "Insert", "Cancel" and still get EditFormItem item?
If it's hardwired, what can I do to access the edit form when using a different commandname like "Attach"?

TIA
Gad
Konstantin Dikov
Telerik team
 answered on 01 Jan 2015
1 answer
54 views
Hello,
     Its a simple question with some misunderstanding i-e if I set the property of InsertItemDisplay to bottom and iterate through the rows newly inserted they always show at top. This is normal scenario if InsertItemDisplay is at top but weird when New Item is inserted at bottom. It looks like this:

Display Order                      RowIndex (Client JS)
4 (new row)                                     1
3 (new row)                                     2
1 (old row)                                       3
2 (old row)                                       4

Please provide a solution.
Appreciate your help.
Konstantin Dikov
Telerik team
 answered on 01 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?