Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
259 views
I am evaluating RadGrid control. I am having two issues in the evaluation

1. Cascade dropdown loading

There is one ASP dropdownlist for "Project" selection in asp.net page. Once I select the Project from dropdownlist binding the related data in RADGRID in Batchedit mode. In that one column "Module"  RadDropdownlist is populated in grid prerender event. In another column "SubModule" RadDropdownlist is there.
I want that, if I change the Module dropdown, the "SubModule should be populated. Each row may have different module, so each row submodule should be different. RadDropdownlists are in Edittemplatecolumn
How to achieve this? Can you please share the code.

2. I am using RADTextbox in the same grid for "Description" column. If type text and want to give carriage return by pressing enter key. When I press Enter key the focus is lost from the control. I want to type the text with carriage return in this text box. How to achieve this?

Please help me with code samples.

Thanks in advance


Konstantin Dikov
Telerik team
 answered on 01 Jan 2015
1 answer
83 views
Hi Team,

I have a grid with some rows in it. When I expand each row I am displaying the 3 tabs.
I wanted to implement the following scenario.

1)Based on some predefined values(we defining them in enumerations.cs file)need to select the one of the tab by default.
If the enum value is zero need to make the  second tab selected by default and if the enum value is 1 need to make the third tab selected by default.

I am using the telerik dll version of 2014.3.1216.45 and implementing batch editing functionality.

ASPX CODE
-----------------
<telerik:RadGrid ID="DischargeRadGrid"   OnItemDataBound="DsichargeRadGridFormat_OnItemDataBound" runat="server" AutoGenerateColumns="false"
                            CssClass="TransferGridPanel" Height="363px" Width="548px" OnItemCommand="DischargeRadGrid_ItemCommand"
                            OnBatchEditCommand="DischargeRadGrid_BatchEditCommand" OnNeedDataSource="DischargeRadGrid_NeedDataSource" OnPreRender="DischargeRadGrid_PreRender" OnItemCreated="DischargeRadGrid_ItemCreated">
                           <MasterTableView ShowHeadersWhenNoRecords="true" CommandItemDisplay="Top" EditMode="Batch"  HierarchyLoadMode="ServerOnDemand" DataKeyNames="Discharge_ID">
                            <CommandItemSettings ShowRefreshButton="false" AddNewRecordText="Add NewDelivery" />
                               <BatchEditingSettings EditType="Cell" />
                            <NestedViewTemplate>
                             <telerik:RadTabStrip runat="server" ID="DischargeTabStrip" MultiPageID="DischargeMultipage" ClickSelectedTab="True"
                                 SelectedIndex="0" OnTabClick="DischargeTabStip_TabClick">
                        <Tabs>
                            <telerik:RadTab runat="server" Text="Details" PageViewID="DischargePageViewDetails">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Compartments" PageViewID="DischargePageViewCompartments">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Products" PageViewID="DischargePageViewProducts">
                            </telerik:RadTab>
                        </Tabs>
                    </telerik:RadTabStrip>
                    <telerik:RadMultiPage runat="server" ID="DischargeMultipage" SelectedIndex="0" RenderSelectedPageOnly="false">
                        <telerik:RadPageView runat="server" ID="DischargePageViewDetails">
                            <div class="contactWrap">
                                <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_ShipTo" Text='ShipTo:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_ShipToValue" Enabled="false"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_SiteName" Text='Name:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_SiteNameValue" Enabled="false"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_Address" Text='Address:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_AddressValue" Enabled="false" TextMode="MultiLine"></asp:TextBox></td>
                                    </tr>                                    <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_SplInstruction" Text='SpecialInstructions:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_SplInstructionValue" Enabled="false"></asp:TextBox></td>
                                    </tr>                                    <tr>
                                    <td>
                                            <asp:Label runat="server" ID="lbl_PONumber" Text='PONumber:' Font-Bold="true"></asp:Label></td>
                                    <td>
                                            <asp:TextBox runat="server" ID="txt_PONumberValue"  Enabled="false"></asp:TextBox>
                                            <asp:ImageButton ImageUrl="~/images/PenEditIcon.gif" runat="server" ID="btn_editPONumber"  OnClick="btn_editPONumber_Click"></asp:ImageButton>                                    </td>
                                </tr>
                                 
                                   
                            </table>
                            </div>
                        </telerik:RadPageView>
                        <telerik:RadPageView runat="server" ID="DischargePageViewCompartments">
                            <telerik:RadGrid ID="CompartmentLevelDischargeRadGrid" runat="server" AutoGenerateColumns="false"
                                CssClass="TransferGridPanel" Height="233px" Width="475px" OnItemDataBound="CompartmentLevelDischargeRadGrid_ItemDataBound" 
                                OnBatchEditCommand="CompartmentLevelDischargeRadGrid_BatchEditCommand" OnNeedDataSource="CompartmentLevelDischargeRadGrid_NeedDataSource"
                                 OnPreRender="CompartmentLevelDischargeRadGrid_PreRender">
                               
                                <MasterTableView ShowHeadersWhenNoRecords="true" CommandItemDisplay="Top" EditMode="Batch" DataKeyNames="CompartmentIndex">
                                    <CommandItemSettings ShowRefreshButton="false" AddNewRecordText="Add LineItem" />
                               <BatchEditingSettings EditType="Cell" />
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="Comp No." HeaderStyle-Width="50px" UniqueName="ItemNo" DataField="CompartmentIndex">
                                            <ItemTemplate>
                                                <%# Eval("CompartmentIndex") %>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <telerik:RadComboBox runat="server" ID="ddlDischargeCompartment" OnLoad="ddlDischargeCompartments" Width="50px">
                                                </telerik:RadComboBox>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Planned Product" HeaderStyle-Width="70px" UniqueName="PlannedDischargeProd" DataField="PlannedProductName" ReadOnly="true" InsertVisiblityMode="AlwaysVisible">
                                            <ItemTemplate>
                                                <%# Eval("PlannedProductName") %>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <telerik:RadComboBox runat="server" ID="ddlPlannedDischargeProduct" OnLoad="ddlPlannedProductDischarge" Width="70px">
                                                </telerik:RadComboBox>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Actual Product" HeaderStyle-Width="70px" UniqueName="ActualDischargeProd" DataField="ActualProductName">
                                            <ItemTemplate>
                                                <%# Eval("ActualProductName") %>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <telerik:RadComboBox runat="server" ID="ddlActualDischargeProduct" OnLoad="ddlActualProductDischarge" Width="70px">
                                                </telerik:RadComboBox>
                                            </EditItemTemplate>
                                        </telerik:GridTemplateColumn>
                                       
                                                        <telerik:GridTemplateColumn HeaderText="Planned Quantity" HeaderStyle-Width="50px" UniqueName="PlannedDischargeQty" DataField="PlannedQuantity" ReadOnly="true" InsertVisiblityMode="AlwaysVisible">
                                                            <ItemTemplate>
                                                                <%# Eval("PlannedQuantity") %>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                               <telerik:RadTextBox ID="plannedDischargeQty" runat="server" DataField="PlannedQuantity" HeaderStyle-Width="30px" HeaderText="Planned Quantity" UniqueName="PlannedDischargeQty">
                                                             </telerik:RadTextBox>
                                                            </EditItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Actual Quantity" HeaderStyle-Width="50px" UniqueName="ActualDischargeQty" DataField="ActualQuantity">
                                                            <ItemTemplate>
                                                                <%# Eval("ActualQuantity") %>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                               <telerik:RadTextBox  ID="ActualDischargeQty" runat="server"  DataField="ActualQuantity" HeaderStyle-Width="30px" HeaderText="Actual Quantity" UniqueName="ActualDischargeQty">
                                                             </telerik:RadTextBox>
                                                            </EditItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                       
                                        <telerik:GridTemplateColumn HeaderText="Planned Tank" HeaderStyle-Width="50px" UniqueName="PlannedTank" DataField="TankIndex" ReadOnly="true" InsertVisiblityMode="AlwaysVisible">
                                                            <ItemTemplate>
                                                                <%# Eval("TankIndex") %>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                               <telerik:RadTextBox runat="server" ID="plannedTank"  DataField="TankIndex" HeaderStyle-Width="30px" HeaderText="Planned Tank" UniqueName="PlannedTank">
                                                               </telerik:RadTextBox>
                                                            </EditItemTemplate>
                                           
                                       
                                                        </telerik:GridTemplateColumn>
                                       
                                        <telerik:GridTemplateColumn HeaderText="Actual Tank" HeaderStyle-Width="50px" UniqueName="ActualTank" DataField="ActualTankIndex">
                                                            <ItemTemplate>
                                                                <%# Eval("ActualTankIndex") %>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                               <telerik:RadTextBox runat="server" ID="actualTank" DataField="ActualTankIndex" HeaderStyle-Width="30px" HeaderText="Actual Tank" UniqueName="ActualTank">
                                                             </telerik:RadTextBox>
                                                            </EditItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                        <telerik:GridBoundColumn UniqueName="LeftOnBoard" DataField="LOB" HeaderText="LOB" ReadOnly="true">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="Adjustment" DataField="Adjustment" HeaderText="Adjustment" ReadOnly="true">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </telerik:RadPageView>
                    <telerik:RadPageView runat="server" ID="DischargePageViewProducts">
                    <telerik:RadGrid ID="ProductLevelDischargeRadGrid" runat="server" AutoGenerateColumns="false"
                                CssClass="TransferGridPanel" Height="233px" Width="475px" OnItemDataBound="ProductLevelDischargeRadGrid_ItemDataBound"
                          OnNeedDataSource="ProductLevelDischargeRadGrid_NeedDataSource">
                            <MasterTableView ShowHeadersWhenNoRecords="true">
                                <Columns>
                                    <telerik:GridBoundColumn UniqueName="PlannedDischargeProd" DataField="PlannedProductName" HeaderText="Planned Product" Visible="false">
                                        </telerik:GridBoundColumn>                                       
                                        <telerik:GridBoundColumn UniqueName="ActualDischargeProd" DataField="ActualProductName" HeaderText="Actual Product">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PlannedDischargeQty" DataField="PlannedQuantity" HeaderText="Planned Quantity">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="ActualDischargeQty" DataField="ActualQuantity" HeaderText="Actual Quantity">
                                        </telerik:GridBoundColumn>                                       
                                        <telerik:GridBoundColumn UniqueName="ActualTank" DataField="ActualTankIndex" HeaderText="Actual Tank">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="CaluculatedDifference" DataField="CaluculatedDifference" HeaderText="Caluculated Difference">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PreDip" DataField="PreDip" HeaderText="PreDip">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PostDip" DataField="PostDip" HeaderText="PostDip">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PreSMR" DataField="PreSMR" HeaderText="SMR Start">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PostSMR" DataField="PostSMR" HeaderText="SMR End">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="LeftOnBoard" DataField="LOB" HeaderText="LOB">
                                    </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="Adjustment" DataField="Adjustment" HeaderText="Adjustment">
                                    </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                    </telerik:RadPageView>
                    </telerik:RadMultiPage>
                    </NestedViewTemplate>                                <Columns>
                                    <telerik:GridBoundColumn  UniqueName="DeliveryNo" DataField="Discharge_ID">
                                        <ColumnValidationSettings EnableRequiredFieldValidation="true">
                                            <RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">                               
                                            </RequiredFieldValidator>
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  UniqueName="ShipTo"
                                        DataField="Site_ID">
                                        <ColumnValidationSettings EnableRequiredFieldValidation="true">
                                            <RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">                               
                                            </RequiredFieldValidator>
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  UniqueName="ShipToName"
                                        DataField="SiteAddress" ReadOnly="true">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  UniqueName="DischargeStart"
                                        DataField="DischargeStartTime" ReadOnly="true">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  UniqueName="DischargeEnd"
                                        DataField="DischargeEndTime" ReadOnly="true">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  UniqueName="PlannedFlag"
                                        DataField="Planned" Display="false">
                                    </telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>                           
                           
                            <Scrolling AllowScroll="true"/>
                              <ClientEvents OnBatchEditOpened="OnBatchEditOpened" /> 
                            </ClientSettings>
                        </telerik:RadGrid>
ASPX.CS CODE
------------ protected void DischargeRadGrid_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            dischargeID = Convert.ToInt64(item["DeliveryNo"].Text);
            Session[_selectDischargeId] = dischargeID;
        }
       
        //loading compartment level discharge data
        List<DischargeDetailExtraEntity> dischargeTabListinstance = new List<DischargeDetailExtraEntity>();
        dischargeTabListinstance = dischargeDetailManager.GetDischargeDetailWSListByDischargeId(dischargeID);
        Session["_storeCompartmentDischargeTable"] = dischargeTabListinstance;        //loading compartment level discharge data
        List<DischargeDetailExtraEntity> ProductTabinstance = new List<DischargeDetailExtraEntity>();
        ProductTabinstance = dischargeDetailManager.GetDischargeDetailByDischargeIdAtProductlevel(dischargeID);
        Session["_storeProductDischargeTable"] = ProductTabinstance;    }
protected void DischargeTabStip_TabClick(object sender, RadTabStripEventArgs e)
    {
       
            e.Tab.PageView.Selected = true;
            string selectedtabindex = e.Tab.Text;
            Int64 shipmentID = Convert.ToInt64(ShiftTreeView.SelectedNode.Value);
            Int64 discharge = 0;
            discharge = Convert.ToInt64(Session[_selectDischargeId].ToString());
            switch (selectedtabindex)
            {
                case "Details":
                    {
                        RadPageView page = (RadPageView)e.Tab.PageView;                        List<DischargeEntity> dischargeDetails = new List<DischargeEntity>();
                        dischargeDetails = dischargeManager.GetDischargeDetailsByDischargeId(discharge);//.GetDischargeByID(discharge);
                        Session[_sesDischargeList] = dischargeDetails;
                        TextBox txtShipTo = (TextBox)page.FindControl("txt_ShipToValue");
                        TextBox txtSiteName = (TextBox)page.FindControl("txt_SiteNameValue");
                        TextBox txtAddress = (TextBox)page.FindControl("txt_AddressValue");
                        TextBox txtSplInstructions = (TextBox)page.FindControl("txt_SplInstructionValue");
                        TextBox txtPONumber = (TextBox)page.FindControl("txt_PONumberValue");
                        if (dischargeDetails.Count > 0)
                        {
                            txtShipTo.Text = dischargeDetails[0].Site_ID.ToString();
                            txtSiteName.Text = dischargeDetails[0].SiteName;
                            txtAddress.Text = dischargeDetails[0].SiteAddress + dischargeDetails[0].SiteName2;
                            txtSplInstructions.Text = dischargeDetails[0].DeliveryWindow;
                            txtPONumber.Text = dischargeDetails[0].PONumber.ToString();
                        }
                        else
                        {
                            txtShipTo.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
                            txtSiteName.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
                            txtAddress.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
                            txtSplInstructions.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
                            txtPONumber.Text = MyGlobal.SDP_GUI_RADGRID_NO_RECORDS_FOUND;
                        }                        break;
                    }
                case "Compartments":
                    {
                        DischargeCompartmentGrid();
                        (e.Tab.PageView.FindControl("CompartmentLevelDischargeRadGrid") as RadGrid).Rebind();
                        break;
                    }
                case "Products":
                    {
                        DischargeProductGrid();
                        (e.Tab.PageView.FindControl("ProductLevelDischargeRadGrid") as RadGrid).Rebind();
                        break;
                    }
            }
       
    }

Regards,
Sudhakar.
Konstantin Dikov
Telerik team
 answered on 01 Jan 2015
1 answer
142 views
What is the recommended method of accessing a record's old values when it is updated via a data form control?  I've tried accessing 'e.Item.SavedOldValues' from the 'ItemUpdated' event, but the values are null.
Konstantin Dikov
Telerik team
 answered on 01 Jan 2015
1 answer
97 views
I am attempting to increase the performance of the Radsheduler by pulling only those appointments within the visible range. The control is extremely slow if I do not. I have recurring appointments that span 3 months and if I navigate past the original appointment and retrieve the appointments from my database based on the visible range I lose the recurring appointments. If I expand the range to overlap the original appointment I get all the recurring appointments. Is there a way to query via linq using the visible start and end range and still get the recurring appointments without having to increase the range which defeats the purpose of using only the visible range? The documentation below contradicts itself from one sentence to the next. If I utilize a great deal of recurring appointments them I stuck with poor performance?  Getting all data from the database is really not an option because the control performs terribly.

From Documentation:

You can use the RadScheduler properties to optimize your query. For example, the VisibleRangeStart and VisibleRangeEnd properties can be used to limit the number of records that the query retrieves. Recurring appointments are evaluated in-memory, however, so they should be always retrieved regardless of VisibleRangeStart and VisibleRangeEnd.
Plamen
Telerik team
 answered on 01 Jan 2015
5 answers
198 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
159 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
118 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
149 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
200 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
407 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?