Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
157 views
I have an empty menu declaration and I add items to the menu client-side in response to various JavaScript events. I would like the menu items to expand up. I tried setting the DefaultGroupSettings ExpandDirection but the menu items still expand down. I have also tried setting the expand direction on the dynamically-added root menu items client-side, but I don't know if my syntax is right and this doesn't appear to work:

<telerik:RadMenu ID="rmTaskMenu"
                                                    runat="server"
                                                    EnableRoundedCorners="true"
                                                    EnableShadows="true"
                                                    style="position:absolute;"
                                                    OnClientItemClicked="TaskMenuClickedHandler_D">
                                        <DefaultGroupSettings ExpandDirection="Up" />
                                    </telerik:RadMenu>


function CreateItem_D(text, value) {
 
                var menuItem = new Telerik.Web.UI.RadMenuItem();
                menuItem.set_text(text);
                menuItem.set_value(value);
 
                return menuItem;
            }
 
function AddRootMenuItem_D(menu, category) {
 
      
                 var  categoryMenuItem = CreateItem_D(category, 'Category_' + category);
                 categoryMenuItem.get_attributes().setAttribute("category", category);
 
                 categoryMenuItem.get_groupSettings().set_expandDirection('Up'); // is this the correct syntax? If so, it isn't working
 
                 menu.get_items().add(categoryMenuItem);
                    
                return categoryMenuItem;
 
 
               
            }

Shinu
Top achievements
Rank 2
 answered on 22 May 2013
3 answers
219 views
Hi,

I am using View-Model binding in Rad-scheduler MVC. 
I have two RadComboBox.
1)AppointmentType
2)Appointment purpose
these RadCombobox in
when I select item of Appointment-type then i want to fill Appointment purpose resources dropdown on runtime.
Please help.

Thanks ,
Kuldeep

Plamen
Telerik team
 answered on 22 May 2013
2 answers
106 views
Hi,

Our requirement is to maintain the status of the grid when user navigates from parent page to child page. So, when child page link in the grid is clicked, we are saving entire page state (dropdown list control selected values, grid sort, display of columns etc). Upon coming back from child page, we are assigning dropdown values back to controls from session and binding the grid to object that gets data from db based on dropdownlist control values. Then we are planning to set grid state (like sort order, display of columns etc)..

For this, when saving grid state, I need to loop thru columns and get col sort order. This code is out of radgrid events. I am doing this way:

foreach (GridColumn col in RadGrid1.MasterTableView.Columns)
{
   if (col is GridBoundColumn)
     {
          GridBoundColumn gbc = col as GridBoundColumn;
           object sortOrder = gbc.SortExpression;
     }

}

I know that I sorted column. But SortExpression (if I mouse over SortExpression, is always empty).
Please let me know how to get the sort expression or sort order programatically and also how to set grid sort order.

Thanks
Prathibarani
Top achievements
Rank 1
 answered on 21 May 2013
2 answers
96 views
We are having issues when applying refreshed combo box filters in addition to using NestedViews. Once we apply filters and rebind the NestedViews will no longer open/expand.

What I believe is happening is that Prerender is being invoked for both the filter as well as the NestedView expand. In PreRender I am calling a function that refreshes our filter combo boxes to relevant options post filter and rebinds the grid. At this point the filter is != string.Empty and when the row is clicked to expand the NestedView prerender fires again and my function is again called rebinding the grid and collapsing the NestedView. My question: is there any way to avoid this collision? Would it be possible to detect who invoked Prerender or move the combo refresh to Javascript?

We want to achieve the following goals:
  1. Refresh several combobox filter dropdowns after the user has filtered on a field, and rebind the grid
  2. Utilize nested views after filtering

Code is below:
protected void RadGrid1_PreRender(object sender, EventArgs e)
        {
            if (RadGrid1.MasterTableView.FilterExpression != string.Empty)
            {
                RefreshCombos();
            }
        }

protected void RefreshCombos()
{
SqlDataSourceVP.SelectCommand = SqlDataSourceVP.SelectCommand + " WHERE " +                               RadGrid1.MasterTableView.FilterExpression;
            SqlDataSourceTransStatus.SelectCommand = SqlDataSourceTransStatus.SelectCommand + " WHERE " + RadGrid1.MasterTableView.FilterExpression;
            SqlDataSourceTransType.SelectCommand = SqlDataSourceTransType.SelectCommand + " WHERE " + RadGrid1.MasterTableView.FilterExpression;
 RadGrid1.MasterTableView.Rebind();
}
Ulonda
Top achievements
Rank 1
 answered on 21 May 2013
1 answer
103 views
This is the first time I got this error.  Can someone please help?
I used a datetime picker on my form and choose the embedded skin called WebBlue.  My control is set to EnableEmbeddedSkins = true.
After I deploy the project, this is the error I get when trying to run the app:

Telerik.Web.UI.DatePickingInput with ID='dateInput' was unable to find an embedded skin with the name 'WebBlue'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

Thanks for any and all help.
Gary
Top achievements
Rank 1
 answered on 21 May 2013
4 answers
184 views
Hi.
Is something very curious with the RadDatePicker performance in Chrome (I have the latest version: 26.0.1410.64 m)
My code is very simple:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadDatePicker ID="RadDatePicker1" runat="server">
</telerik:RadDatePicker>
<telerik:RadButton ID="RadButton1" runat="server" Text="RadButton">
</telerik:RadButton>

If you use the RadDatePicker calendar before any button click, you can use the navigation arrows quickly, but if you use the RadDatePicker after some button clicks, the arrow navigation performance starts to decrease and the calendar freezes. This issue is not present in Internet Explorer or Firefox.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
    <telerik:RadDatePicker ID="RadDatePicker1" runat="server">
    </telerik:RadDatePicker>
    <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton">
    </telerik:RadButton>
</telerik:RadAjaxPanel>

On the other hand, if you add a RadAjaxPanel the RadDatePicker performance is okay even after a few postbacks if you click the button in Chrome.

Best regards.
Juan
Top achievements
Rank 2
 answered on 21 May 2013
1 answer
122 views
I also have a double postback issue but I think it will be resolved once this issue is resolved. I have this radgrid that appears to be getting data but it is not displaying. After binding the grid, the grid.Items.Count is set to the number of rows expected. I'll include the ajax manager settings and grid. Thanks!

<telerik:radajaxmanager id="RadAjaxManager1" runat="server">
         <clientevents onrequeststart="onRequestStart" />
        <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1">
                </telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadBtnRetrieve">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadPanelBar1" loadingpanelid="RadAjaxLoadingPanel1">
                </telerik:AjaxUpdatedControl>
                <telerik:ajaxupdatedcontrol controlid="RadAjaxPanel1" loadingpanelid="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadGridPartsWashers">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGridPartsWashers" loadingpanelid="RadAjaxLoadingPanel1">
                </telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:radajaxmanager>
<telerik:radajaxpanel ID="RadAjaxPanel1" runat="server" loadingpanelid="RadAjaxLoadingPanel1" enableajax="true">
        <table>
            <tr>
                <td>
                    <telerik:RadGrid ID="RadGridPartsWashers" runat="server" Width="100%" AllowPaging="True"
                        CellSpacing="0" GridLines="None" AllowSorting="True" AutoGenerateColumns="False"
                        CssClass="RadGrid.rgMasterTable" onneeddatasource="RadGridPartsWashers_NeedDataSource">
                        <ClientSettings>
                            <Selecting AllowRowSelect="True"></Selecting>
                            <Scrolling AllowScroll="True" ScrollHeight="" UseStaticHeaders="True"></Scrolling>
                            <Resizing AllowColumnResize="true" />
                        </ClientSettings>
                        <MasterTableView EnableHeaderContextMenu="true" EnableNoRecordsTemplate="true" DataKeyNames="AssetNumber"
                            EnableSplitHeaderText="true" TableLayout="Auto" Width="100%">
                            <PagerStyle AlwaysVisible="true" />
                            <NoRecordsTemplate>
                                <div>
                                    There are no records to display
                                </div>
                            </NoRecordsTemplate>
                            <Columns>
                              .....
                             </Columns>

Will Lopez
Top achievements
Rank 1
 answered on 21 May 2013
1 answer
114 views
Good Morning, I have a RadGrid that inserts and updates records through a usercontrol in development pc, it works perfectly, but in the usercontrol Server does not appear when you click on "GridEditCommandColumn" or the Add Record button RadGrid.
I've also noticed that deleting a record in the server before asking me for confirmation through the RadWindows, while the development PC only delete it once results confirmed the deletion.
The development pc has Windows 7 with IIS 6.1.
The server has Windows Server 2003 R2 Standard Edition SP2
The application works with FW4 and other RadControls work well.
Pavlina
Telerik team
 answered on 21 May 2013
3 answers
372 views

 have a Rad Calender. I have to apply some code logic with database and If my code logic gives me FALSE for a particular selected date of Rad Calender than I have to show that Date in RED color of that Rad Calender. In other words I have to set RED color for different dates of Rad Calender through Server Side.

For a brief view I am attaching some Screen shots that will elaborate my Scenrio

1- http://screencast.com/t/LJUhqaLM
2- http://screencast.com/t/BOPDNNMJuh

Any Help ?

Regards: Kamran

Angel Petrov
Telerik team
 answered on 21 May 2013
1 answer
182 views
Hi I am relatively new to Ajax so bear with me.  I have an RadAjaxPanel on my page.  inside the radajaxpanel i have two dropdown list, calender and a button.  The button is not firing.  However, when i move the radbutton outside of the radajaxpanel it works just fine.  Please help........... how do i get the radbutton inside the radajaxpanel to work.  Code is below..... btnViewReport is the one not working

                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="188px" 
                    style="margin-top: 0px" width="568px">
                    <telerik:RadComboBox ID="cbxRecipe" Runat="server" DataSourceID="dsRecipe" 
                   Height="600px" Width="250px" EnableLoadOnDemand="true"
                            DropDownWidth="249px" 
    EmptyMessage="Select a Recipe" HighlightTemplatedItems="true"
                 EnableAutomaticLoadOnDemand="True" 
                    DataTextField="RecipeCode" DataValueField="RecipeCode" 
                    AutoPostBack="True"  >
                        <HeaderTemplate>
                            <table style="width: 249px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 40px;">
                                        Recipe</td>
                                    <td style="width: 149px;">
                                        Description</td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table style="width: 249px" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width: 40px;">
                                        <%# DataBinder.Eval(Container.DataItem, "RecipeCode")%>
                                    </td>
                                    <td style="width: 149px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Recipe")%>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="dsRecipe" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:oCon_Riverside %>" SelectCommand="select RecipeCode, Recipe
from [dbo].[CCFIProduction_recipe]
Order by RecipeCode "></asp:SqlDataSource>
                    <br />
                    <br />
                    <telerik:RadComboBox ID="RadComboBox1" Runat="server" AutoPostBack="True" 
                        DataSourceID="dsGetUBI" DataTextField="UBI" DataValueField="UBI" 
                        DropDownWidth="298px" EmptyMessage="Select a UBI" Enabled="False" 
                        Height="600px" HighlightTemplatedItems="True" ShowDropDownOnTextboxClick="True" 
                        Width="300px">
                        <HeaderTemplate>
                            <table cellpadding="0" cellspacing="0" style="width: 298px">
                                <tr>
                                    <td style="width: 40px;">
                                        Recipe</td>
                                    <td style="width: 60px;">
                                        PackingDate</td>
                                    <td style="width: 80px;">
                                        MakingBatch</td>
                                    <td style="width: 60px;">
                                        UBI</td>
                                    <td style="width: 20px;">
                                        Shift</td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table cellpadding="0" cellspacing="0" style="width: 298px">
                                <tr>
                                    <td style="width: 40px;">
                                        <%# DataBinder.Eval(Container.DataItem, "RecipeCode")%>
                                    </td>
                                    <td style="width: 60px;">
                                        <%# DataBinder.Eval(Container.DataItem, "PackingDate")%>
                                    </td>
                                    <td style="width: 80px;">
                                        <%# DataBinder.Eval(Container.DataItem, "MakingBatch")%>
                                    </td>
                                    <td style="width: 60px;">
                                        <%# DataBinder.Eval(Container.DataItem, "UBI")%>
                                    </td>
                                    <td style="width: 20px;">
                                        <%# DataBinder.Eval(Container.DataItem, "Shift")%>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="dsGetUBI" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:oCon_Riverside %>" 
                        
                        SelectCommand="SELECT recipe.RecipeCode, Packing.MakingBatch, CONVERT(varchar(20), Packing.PackingDate, 101) as PackingDate, Packing.SellByLetter, Packing.UBI, Packing.Shift FROM recipe INNER JOIN Packing ON recipe.RecipeCode = Packing.RecipeCode WHERE (Packing.PackingDate &gt; dateadd(yyyy,-1,GETDATE())) AND (recipe.RecipeCode = @recipeCode) AND (NOT (Packing.UBI IS NULL)) ORDER BY recipe.RecipeCode, Packing.PackingDate DESC, Packing.SellByLetter">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="cbxRecipe" Name="recipeCode" 
                                PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    <asp:Label ID="Label1" runat="server" Font-Size="Small" 
                        Text="*Last 12 months shown"></asp:Label>
                    <br />
                    <br />
                    <asp:Label ID="LblMkDate" runat="server" Text="Select Make Date:"></asp:Label>
                    <telerik:RadDatePicker ID="RadDatePicker1" Runat="server" AutoPostBack="True" 
                        Culture="en-US">
                        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False">
                        </Calendar>
                        <DateInput AutoPostBack="True" DateFormat="M/d/yyyy" 
                            DisplayDateFormat="M/d/yyyy" LabelWidth="40%">
                        </DateInput>
                        <DatePopupButton HoverImageUrl="" ImageUrl="" />
                    </telerik:RadDatePicker>
                    <br />
                    <br />
                    <telerik:RadButton ID="btnViewReport" runat="server" Text="View Report" AutoPostBack="True">
                    </telerik:RadButton>
                </telerik:RadAjaxPanel>


thanks
Pavlina
Telerik team
 answered on 21 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?