Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
Hi team,

we are facing an issue working with stacked bar chart. suppose we have each bar representing month and each portion of bar displays different diseas count .

now the thing is if we have 5 portion(diseas) in each bar .

but when we receive 5 rows for each bar in our dataset thats okay.

but sometimes we have only 4 rows per bar. and in that case our bar overlaps. means it takes 5th value from bar next to it. which we dont want. 

we want if some bar has only 4 portion it should display 4 only. 

any help will be appreciated.
Danail Vasilev
Telerik team
 answered on 28 Apr 2014
1 answer
119 views
Hello

Why in my version 2014.1.225.45 , the DropDownWidth="200" or DropDownWidth="200px"
doesn't work,

in Css it's work very well not with this attribute DropDownWidth

<telerik:RadComboBox runat="server" ID="PlaComboBox1" Width="240" DataSourceID="WbTA" DataTextField="TA_LIBELLE" DataValueField="TA_ID" DropDownWidth="200"></telerik:RadComboBox>

Can you help to understand ?

thanks
Shinu
Top achievements
Rank 2
 answered on 28 Apr 2014
3 answers
215 views
I'm using RadDropDownList inside a RadGrid. The RadDropDownList has its own sqlsource because it binds to a lookup table. It works somewhat fine and returns data, but whenever the ID value is 0 (a common case), the RadDropDownList does not display until I click on the space where it should be--then it appears. This seems like strange default behavior. Figuring the control was getting confused because of the cases of "0" IDs, I changed my query to the lookup table so that it would see 0 as a real value with the corresponding text "** Main Contract **". Even when I click the space where the ddl should be, and the ddl then appears, it still doesn't have "** Main Contract **" selected -- it is in the list though.

How can I fix this so that (1) the RadDropDownList appears even when the value is 0; and (2) the "** Main Contract **" line item is selected when the value is 0.

It seems like when the value for that ddl field is 0, rad wants to hide it. I attached 2 screenshots and my declarative code.

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
                <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
                    <telerik:RadListBox runat="server" ID="SavedChangesList" Width="600px" Height="200px" Visible="false"></telerik:RadListBox>
                    <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
                        AllowAutomaticInserts="True" PageSize="10" Skin="Default" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted"
                        OnItemUpdated="RadGrid1_ItemUpdated" OnPreRender="RadGrid1_PreRender" AllowAutomaticUpdates="True" AllowPaging="True"
                        AutoGenerateColumns="False" Width="950px" OnBatchEditCommand="RadGrid1_BatchEditCommand" DataSourceID="sqlContractMatrix">
                        <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="ID" DataSourceID="sqlContractMatrix" HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False">
                            <BatchEditingSettings EditType="Cell" />
                            <SortExpressions>
                                <telerik:GridSortExpression FieldName="SiteID,ProductID" SortOrder="Descending" />
                            </SortExpressions>
                            <Columns>
                                <telerik:GridTemplateColumn HeaderText="Site" HeaderStyle-Width="150px" UniqueName="SiteID" DataField="SiteID">
                                    <ItemTemplate>
                                        <%# Eval("SiteName") %>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <telerik:RadDropDownList runat="server" ID="ddlSites" AppendDataBoundItems="true" DataValueField="SiteID" DataTextField="SiteName" DataSourceID="sqlSites">
                                             
                                        </telerik:RadDropDownList>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
 
                                <telerik:GridTemplateColumn HeaderText="Product" HeaderStyle-Width="150px" UniqueName="ProductID" DataField="ProductID">
                                    <ItemTemplate>
                                        <%# Eval("ProductName") %>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <telerik:RadDropDownList runat="server" ID="ddlProducts" DropDownWidth="250" DropDownHeight="400" DefaultMessage="Product" AppendDataBoundItems="true" DataValueField="ProductID" DataTextField="ProductName" DataSourceID="sqlProducts">
                                             
                                        </telerik:RadDropDownList>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                 
                                 
                                <telerik:GridBoundColumn DataField="TemplateFile" HeaderStyle-Width="200px" HeaderText="Template"
                                    SortExpression="TemplateFile" UniqueName="TemplateFile">
                                </telerik:GridBoundColumn>
 
                                <telerik:GridBoundColumn DataField="PDFName" HeaderStyle-Width="200px" HeaderText="PDFName"
                                    SortExpression="PDFName" UniqueName="PDFName">
                                </telerik:GridBoundColumn>
                                <telerik:GridButtonColumn ConfirmText="Delete this record?" ConfirmDialogType="RadWindow"
                                    ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px" ButtonType="ImageButton"
                                    CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                </telerik:GridButtonColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </telerik:RadAjaxPanel>
                <asp:SqlDataSource ID="sqlContractMatrix" runat="server" ConnectionString="<%$ ConnectionStrings:FitTrack %>"
                    DeleteCommand="DELETE FROM ContractMatrix WHERE ID = @ID"
                    InsertCommand="INSERT INTO ContractMatrix (SiteID, ProductID, TemplateFile, PDFName, LastModifiedDate, LastModifiedByID) VALUES (@SiteID, @ProductID, @TemplateFile, @PDFName, @LastModifiedDate, @LastModifiedByID)"
                    UpdateCommand="UPDATE ContractMatrix SET SiteID = @SiteID, ProductID = @ProductID, TemplateFile = @TemplateFile, PDFName = @PDFName, LastModifiedDate = GETDATE(), LastModifiedByID = @LastModifiedByID WHERE ID = @ID">
                    <DeleteParameters>
                        <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="SiteID" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="ProductID" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="TemplateFile" Type="String"></asp:Parameter>
                        <asp:Parameter Name="PDFName" Type="String"></asp:Parameter>
                        <asp:Parameter Name="LastModifiedDate" Type="DateTime"></asp:Parameter>
                        <asp:Parameter Name="LastModifiedByID" Type="DateTime"></asp:Parameter>
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="SiteID" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="ProductID" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="TemplateFile" Type="String"></asp:Parameter>
                        <asp:Parameter Name="PDFName" Type="String"></asp:Parameter>
                        <asp:Parameter Name="LastModifiedDate" Type="DateTime"></asp:Parameter>
                        <asp:Parameter Name="LastModifiedByID" Type="DateTime"></asp:Parameter>
                        <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
                    </UpdateParameters>
                </asp:SqlDataSource>
                 
                <!-- SQL data sources for various lookup tables -->
                <asp:SqlDataSource ID="sqlSites" runat="server" ConnectionString="<%$ ConnectionStrings:FitTrack %>" ProviderName="System.Data.SqlClient" SelectCommand="..."></asp:SqlDataSource>
                <asp:SqlDataSource ID="sqlProducts" runat="server" ConnectionString="<%$ ConnectionStrings:FitTrack %>" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>

Princy
Top achievements
Rank 2
 answered on 28 Apr 2014
3 answers
310 views
I was looking for documentation on what the date is supposed to be of the .NET DateTime object that is returned from SelectedDate.

I would have hoped it would be the first day of the selected month/year.  But I have just discovered that sometimes it is, and sometimes it's not.

How about fixing this so it always returns the first day of the month?
Shinu
Top achievements
Rank 2
 answered on 28 Apr 2014
1 answer
143 views
I have the following in my Telerik Grid:

<telerik:GridCalculatedColumn HeaderText="Remark Code" DataFields="RemarkCodeID, RemarkCodeName" Expression='{0} + " - " + {1}' DataFormatString="{0:N}" ></telerik:GridCalculatedColumn>

I get an error that cannot convert an Int and RemarkCodeID is an int above.  Is there a way I can convert RemarkCodeID to a string?  Also, when I replace RemarkCodeID with a data field that is of type string, no error so I know it is RemarkCodeID that is causing the error.

Error:
System.ArgumentException: Expression of type 'System.Nullable`1[System.Int32]' cannot be used for parameter of type 'System.Object' of method 'System.String Concat(System.Object, System.Object)'
Princy
Top achievements
Rank 2
 answered on 28 Apr 2014
11 answers
471 views
Is there a way to cause the combo box to dropdown automatically when you hover the mouse over it?
Princy
Top achievements
Rank 2
 answered on 28 Apr 2014
4 answers
500 views
I have been digging through the help and could not find a solution.

I need to select a row server side based on the ID. The following piece of code does not find the item:

if (Session["selID"] != null)
            {
                GridDataItem item = RadGrid1.MasterTableView.FindItemByKeyValue("Container_ID", Session["selID"].ToString());
                item.Selected = true;
                Session["selID"] = null;
            }

So I'm using the following method 
if (Session["selID"] != null)
            {
                foreach (GridItem item in RadGrid1.MasterTableView.Items)
                {
                    if (item is GridDataItem)
                    {
                        GridDataItem dataItem = (GridDataItem)item;
                        if (Session["selID"].ToString().Equals(dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["Container_ID"].ToString()))
                        {
                            dataItem.Selected = true;
                            Session["selID"] = null;
                            break;
                        }
                    }
                }
            }

Somehow I feel that there has to be a better way to do it. I will appreciate if you could please suggest the optimum way.

Thanks
Som
NEX
Top achievements
Rank 1
 answered on 27 Apr 2014
1 answer
100 views
I am wanting to expand the parent node after I add a child node using the "PerformInsert" command.  Currently the child does get added but is not visible since the parent is collapsed.
Andy
Top achievements
Rank 1
Iron
 answered on 25 Apr 2014
6 answers
225 views
I have a Radio Button in header template of Rad grid columns. When user selects the radiobutton that particular column should be highlighted remaining should be greyed out.

<telerik:GridTemplateColumn DataField="BR" UniqueName="BR" HeaderStyle-Font-Bold="true" DataType="System.Double" HeaderText="BR" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                        <HeaderTemplate>
                            <asp:RadioButton ID="rbBR" Text="Board Repair" runat="server" OnCheckedChanged="rbBR_CheckedChanged" AutoPostBack="true" />                            
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbBR" runat="server" Text= '<%# DataBinder.Eval(Container.DataItem,"BR") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>

Please let me know how to accomplish this.
Neetha
Top achievements
Rank 1
 answered on 25 Apr 2014
4 answers
143 views
I have a page with a master page in a C# 4.0 Web app (Visual Studio 2012.)

From my reading I am aware that there are potential problems in making a RadSplitter fill a page.
This page consists of 3 horizontal sections on the left and one vertical one on the right.  
Up till now this page has been operated using Javascript to expose/hide controls and expand/collapse the RadPaneForm control.
Basically, the expand/collapse of RadPaneForm needs to be controlled by a RadComboBox in the center left section of the splitter.

I've been trying to 'Ajax-ify' the splitter in order to replace the JavaScript with code-behind C#.  
(And for once I've had the time and ability to boil the problem down to a demo.  Here it is.
The page has no code-behind in either the master page or the TestPage.  Note that there are two RadComboBoxes in Panel1.

The problem is as follows: The splitter displays at half page height unless I remove one of the RadComboBoxes.  Then it displays at full height.

Master Page html:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="SiteTest.Master.cs" Inherits="WebApplicationSplitterTest.SiteTest" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
        <asp:ContentPlaceHolder ID="head" runat="server">
        </asp:ContentPlaceHolder>
    </head>
    <body >
        <form id="form1" runat="server" >
            <asp:ContentPlaceHolder ID="cph1" runat="server">              
            </asp:ContentPlaceHolder>            
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                </Scripts>
            </telerik:RadScriptManager>         
            <header>              
            </header>
            <div id="ParentDivElement" style="height:85%">
                <asp:ContentPlaceHolder ID="MainContent" runat="server">
                </asp:ContentPlaceHolder>
            </div>
            <div style="text-align: center; margin: auto; margin-left: auto; margin-right: auto; width: 100%; margin-bottom: auto;height:20px">
                <br />
                <br />
                <p> This is a footer</p>
            </div>

        </form>
    </body>
</html>

Main Page HTML:

<%@ Page Language="C#" Async="true" MasterPageFile="~/SiteTest.Master" AutoEventWireup="true" CodeBehind="TestPage.aspx.cs" Inherits="WebApplicationSplitterTest.TestPage" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadSplitter1">

            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddlOne">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ddlTwo" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddlTwo">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadSplitter1"  />
                    <telerik:AjaxUpdatedControl ControlID="Panel1" />
                    <telerik:AjaxUpdatedControl ControlID="Panel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadInputManager ID="RadInputManager1" runat="server">
    </telerik:RadInputManager>

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" VisibleStatusbar="false" VisibleTitlebar="true" Width="600px">
    </telerik:RadWindowManager>

    <script src="Scripts/jquery-1.7.1.js"></script>

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

       
        <style type="text/css">
            html, body, form {
            height: 100%;
            margin: 0px;
            padding: 0px;
            }
        </style>

    </telerik:RadCodeBlock>
    
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%" HeightOffset="20" Orientation="Vertical"  >

        <telerik:RadPane ID="RadpaneTicket" runat="server" Height="100%" Width="70%" Scrolling="Y" >
            <telerik:RadSplitter runat="server" Height="100%" Width="100%" Orientation="Horizontal">
                <telerik:RadPane ID="RadPane1" runat="server" Scrolling="None" Height="25px">
                    <div style="width: 100%; text-align: center">
                        <asp:Label ID="lblAnnouncements" runat="server" Text='Announcements' Font-Bold="True" ForeColor="Blue" Font-Size="Large"></asp:Label>
                    </div>
                </telerik:RadPane>
                <telerik:RadSplitBar ID="RadSplitBar3" runat="server" Visible="false"></telerik:RadSplitBar>
                <telerik:RadPane ID="RadpaneAnnouncements" runat="server" Height="15%" Scrolling="Both" BackColor="AliceBlue">
                    <div style="width: 100%; text-align: center;">
                        <asp:Label ID="lblNone" runat="server" Text='There are no current announcements' Visible="false" Font-Bold="True" BackColor="AliceBlue" ForeColor="Black" Font-Size="Large"></asp:Label>
                    </div>
                    <div style="width: 95%; height: 100%; margin-left: auto; margin-right: auto">
                       
                    </div>
                </telerik:RadPane>
                <telerik:RadSplitBar ID="RadSplitBar2" runat="server" ></telerik:RadSplitBar>
                <telerik:RadPane runat="server" Scrolling="Y" >
                    <telerik:RadSplitter ID="RadSplitterEditor" runat="server" >
                        <telerik:RadPane ID="RadPaneEditor" runat="server">

                            <table style="width: 100%; height: 100%; margin-top: auto; margin-bottom:auto">
                                <tr>
                                    <td colspan="2">
                                        <asp:ValidationSummary ID="ValidationSummary2" runat="server" Font-Bold="True" ForeColor="Red" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2"></td>
                                </tr>
                                <tr style="width: 100%; vertical-align: top; height: 5%;">
                                    <td style="text-align: left;" colspan="2">
                                        <asp:Panel ID="Panel1"  runat="server" Width="100%" Height="100%" >                                          
                                          
                                            <telerik:RadComboBox ID="ddlOne" runat="server"  
                                                                 Height="100px" Label="RadComboBox 1" Sort="Ascending" NoWrap="true" Font-Size="Large"  Width="301px" Font-Names="Arial" AutoPostBack="true" CausesValidation="False">
                                            </telerik:RadComboBox>
                                              <telerik:RadComboBox ID="ddlTwo" runat="server"   
                                                                 Height="200px" Label="RadComboBox2" Sort="Ascending" NoWrap="True" Font-Size="Large"  Width="275px" Font-Names="Arial" AutoPostBack="true"  >
                                            </telerik:RadComboBox>
                                           
                                        </asp:Panel>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 100%; height: 85%" colspan="2">
                                    </td>
                                </tr>
                            </table>

                            <div>
                                <telerik:RadProgressManager ID="RadProgressManager1" runat="server" />
                                <telerik:RadProgressArea ID="RadProgressArea1" runat="server" ProgressIndicators="TotalProgressBar, TotalProgress, TotalProgressPercent, RequestSize, FilesCountBar, FilesCount, SelectedFilesCount, CurrentFileName, TimeElapsed, TimeEstimated, TransferSpeed"></telerik:RadProgressArea>
                            </div>

                        </telerik:RadPane>

                        <telerik:RadSplitBar ID="RadSplitBarForm" runat="server"></telerik:RadSplitBar>
                        <telerik:RadPane ID="RadPaneForm" runat="server" Scrolling="Both" Collapsed="false" Width="100%" Height="100%">
                            <asp:Panel ID="Panel2" runat="server">
                                
                            </asp:Panel>
                        </telerik:RadPane>

                    </telerik:RadSplitter>

                </telerik:RadPane>
                <telerik:RadSplitBar ID="RadSplitBar5" runat="server" EnableResize="false">
                </telerik:RadSplitBar>

                <telerik:RadPane ID="RadPane3" runat="server" Height="40px" Scrolling="None" Width="100%" >
                    <table style="width:100%">
                        <tr style="height: 40px; width:100%">
                            <td style="width: 70%; float: left;">
                                <telerik:RadUpload ID="RadUpload1" runat="server" ControlObjectsVisibility="ClearButtons" TargetFolder="~/Files" InputSize="40"    ></telerik:RadUpload>
                            </td>
                            <td style="width: 25%; float: right; text-align: right;">
                                <telerik:RadButton ID="btnSave" runat="server" Text="Save"  ></telerik:RadButton>
                                &#160;&#160;
                                <telerik:RadButton ID="btnCancel" runat="server" Text="Clear"  CausesValidation="False" ></telerik:RadButton>
                            </td>
                        </tr>
                    </table>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </telerik:RadPane>

        <telerik:RadSplitBar ID="RadSplitBar1" runat="server"></telerik:RadSplitBar>

        <telerik:RadPane ID="RadPaneRightSide" runat="server" Width="30%" Height="15%" Scrolling="None">
            <telerik:RadSplitter ID="RadSplitter2" runat="server" Orientation="Horizontal">
                <telerik:RadPane ID="RadPane2" runat="server" Scrolling="None" Height="25px">
                    <div style="width: 100%; text-align: center">
                        <asp:Label ID="Label2" runat="server" Text='System Status' Font-Bold="True" ForeColor="Blue" Font-Size="Large"></asp:Label>
                    </div>
                </telerik:RadPane>
                <telerik:RadSplitBar ID="RadSplitBar4" runat="server" Visible="false"></telerik:RadSplitBar>
                <telerik:RadPane ID="RadPaneSys" runat="server" Scrolling="Both" Height="100%">
                    <div style="width: 95%; margin-left: auto; margin-right: auto;">
                    </div>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>


Boris
Top achievements
Rank 1
 answered on 25 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?