Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
207 views
I have chart with some values as shown on the picture. I want X label value to be project name, but now I have data in series and on x i have (1) not the project name. so How to force X values to bound the project name from database Programmatically ?
 heres my code:

ChartSeries series1 = new ChartSeries("Estimated Hours", ChartSeriesType.Bar);
ChartSeries series2 = new ChartSeries("Actual Hours", ChartSeriesType.Bar);
ChartSeries series3 = new ChartSeries("Variance", ChartSeriesType.Bar);

foreach (DataRow dtrow in dt.Rows)
{
series1.Items.Add(new ChartSeriesItem(Convert.ToDouble(dtrow["estimated_total"]), dtrow["estimated_total"].ToString()));
series2.Items.Add(new ChartSeriesItem(Convert.ToDouble(dtrow["actual_total"]), dtrow["actual_total"].ToString()));
series3.Items.Add(new ChartSeriesItem(Convert.ToDouble(dtrow["variance_total"]), dtrow["variance_total"].ToString()));

}

RadChart1.Series.Clear();
RadChart1.Series.Add(series1);
RadChart1.Series.Add(series2);
RadChart1.Series.Add(series3);
mahmoud
Top achievements
Rank 1
 answered on 05 Feb 2014
1 answer
67 views
Hello,

I am using telerik radfileexplorer. when i try to rename a file or folder, right and left arrow key are not working.
Shinu
Top achievements
Rank 2
 answered on 05 Feb 2014
1 answer
140 views
Hi,
I have a grid with detail table.
I want to allow only one row selection on Master Table.
But I want to allow multi row selection on Detail Table.

How can i do in Javascript.?
Princy
Top achievements
Rank 2
 answered on 05 Feb 2014
1 answer
24 views
editor's insert media is not working , when placed inside jquery tabs

This is happening in chrome only.

Thanks
Dobromir
Telerik team
 answered on 05 Feb 2014
1 answer
119 views
If you add a form element to the Rad Editor then click on it you should get the Rad Editor Node Inspector to show on the bottom (if it is enabled). However, if I add any elements to the Rad Editor in IE11 I am having trouble getting the Node Inspector to display consistently.

If I were to remove all content from the Rad Editor and add a textbox and click on it I will get the Node Inspector, if I then enter a space and add another textbox and click on that one, there will be no Node Inspector. It also seems that it will completely stop working at times, then randomly start working for some elements, then stop.

I was able to reproduce this behavior on the demo site.

Does anyone know of a work around for this?
Slav
Telerik team
 answered on 05 Feb 2014
8 answers
763 views
This really should be a very simple task to perform, but so far, we have only been able to find quite complex solutions based on "faiking postbacks" for it, that also seem hard to maintain over time (think Classic ASP). How do we  catch Close events of a RadWindow in server side code so that we can execute some of our own code? This must be a very common scenario so I can't believe it not to be a simple built in solution for it? In case there really is not good solution for this, what is the least bad one to achieve the same thing? 
Marin Bratanov
Telerik team
 answered on 05 Feb 2014
5 answers
105 views
Hi.  I'm trying to get the DAValidation control to render client side errors with the telerik ListView control in either InsertItemTemplate or EditItemTemplate.  At the minute nothing is rendered when I break one of my entity rules.  The DAValidation control works fine within templates in a standard asp FormView template but not with Telerik controls.  Any help would be greatly appreciated.  I have provided a sample ListView below:


<telerik:RadListView ID="frm" runat="server" OnPreRender="frm_PreRender" >

<ItemTemplate>
<asp:Label ID="lbl" runat="server" Text='<%#: Bind("Forename") %>' />
</ItemTemplate>

<EditItemTemplate>

<dav:MetadataSource ID="MetadataSource1" runat="server" ObjectType="<%$ Code: typeof(LE.Entities.Employee) %>">
</dav:MetadataSource>
<dav:DataAnnotationsValidator ID="davName" runat="server" ForeColor="Red" ValidationGroup="PersonalDetails" MetadataSourceID="MetadataSource1" ControlToValidate="txtName"
ObjectProperty="Name" />
<asp:TextBox ID="txtName" runat="server" ></asp:TextBox>

</EditItemTemplate>
</telerik:RadListView>




















Marin
Telerik team
 answered on 05 Feb 2014
1 answer
53 views
Hi all,

I have a a editor tool group with a editordropdown in it, it is being loaded server side which populates the items into it - when clicked it is pasting in its contents into the editing field.  In all other browsers the control works as expected, but in chrome and opera, when you click on a item it does not paste the text into the editor box, and in opera you can not scroll down the list as it closes the drop down altogether !

Any suggestions ? Thanks

Telerik RadControls for ASP.NET Ajax - version no 2013.3.1114.40
Marin Bratanov
Telerik team
 answered on 05 Feb 2014
2 answers
36 views
Hi,
I am using the trial copy of telerik for asp.net. It's working fine for all type of browsers. In a scenario where the IT team have restrict the user access and allowing the domain URL on which the Application is hosted, the browser giving error : 'Telerik' is undefined".
Telerik controls are then stuck and fails to populate. I am using .net 4.0.

Regards
Jiten
Top achievements
Rank 1
 answered on 05 Feb 2014
1 answer
213 views
Hi, 

I want to know that how i can refresh grid client side on external button and how to bind 
radgrid both programmatically and client side both.

Here is my aspx code
 <script type="text/javascript">
        
        $(document).ready(function () {
            $("#form1").validate();

        });
        function onRequestStart(sender, args) {
            if (args.get_eventTarget().indexOf("ExportMasterDataButton") > 0) {
                args.set_enableAjax(false);
            }
            if (args.get_eventTarget().indexOf("ExportDetailDataButton") > 0) {
                args.set_enableAjax(false);
            }
            if (args.get_eventTarget().indexOf("ExportMasterGridButton") > 0) {
                args.set_enableAjax(false);
            }
        }

    </script>

 <script type="text/javascript">
            //<![CDATA[
            function pageLoad(sender, eventArgs) {
                var tableView = $find("<%= GridView1.ClientID %>").get_masterTableView();

                PageMethods.GetData(0, tableView.get_pageSize(),
                tableView.get_sortExpressions().toString(), tableView.get_filterExpressions().toList(),
                    updateGrid);

                PageMethods.GetCount(tableView.get_filterExpressions().toList(), updateVirtualItemCount);
            }

            function RadGrid1_Command(sender, args) {
                args.set_cancel(true);

                var pageSize = sender.get_masterTableView().get_pageSize();

                var sortExpressions = sender.get_masterTableView().get_sortExpressions();
                var filterExpressions = sender.get_masterTableView().get_filterExpressions();

                var currentPageIndex = sender.get_masterTableView().get_currentPageIndex();

                if (args.get_commandName() == "Filter")
                    currentPageIndex = 0;

                var sortExpressionsAsSQL = sortExpressions.toString();

                $find("<%= RadAjaxLoadingPanel1.ClientID %>").show("<%= GridView1.ClientID %>");

                PageMethods.GetData(currentPageIndex * pageSize, pageSize, sortExpressionsAsSQL, filterExpressions.toList(), updateGrid);

                if (args.get_commandName() == "Filter") {
                    PageMethods.GetCount(filterExpressions.toList(), updateVirtualItemCount);
                }
            }

            function updateGrid(result) {
                var tableView = $find("<%= GridView1.ClientID %>").get_masterTableView();
                tableView.set_dataSource(result);
                tableView.dataBind();

                $find("<%= RadAjaxLoadingPanel1.ClientID %>").hide("<%= GridView1.ClientID %>");
            }

            function updateVirtualItemCount(result) {
                var tableView = $find("<%= GridView1.ClientID %>").get_masterTableView();
                tableView.set_virtualItemCount(result);
            }

            function RadGrid1_RowDataBound(sender, args) {
                var radTextBox1 = args.get_item().findControl("LastName"); // find control
                radTextBox1.set_value(args.get_dataItem()["LastName"]);

                // conditional formatting
                args.get_item().get_cell("TitleOfCourtesy").style.fontWeight = (args.get_dataItem()["TitleOfCourtesy"] == "Dr.") ? "bold" : "normal";
            }
            //]]>
        </script>

<telerik:RadGrid ID="GridView1" runat="server" Width="100%" AutoGenerateColumns="false" AllowFilteringByColumn="true"
                PageSize="100" AllowPaging="true" AllowSorting="true" OnPreRender ="GridView_OnPreRender" CellSpacing="1" Style="padding: 1px;"
                Skin="Default">
                 <ItemStyle Wrap="false"></ItemStyle>
                <ClientSettings>
                    <Selecting AllowRowSelect="False" />
                    <Scrolling AllowScroll="true" ScrollHeight="500px" />
                    <ClientEvents OnHierarchyExpanding="GridViewOnHierarchyExpending" />
                </ClientSettings>
                <ExportSettings Excel-Format="Html" ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
                </ExportSettings>
                <MasterTableView Name="AllMailSentDetails" CommandItemDisplay="Top" TableLayout="Fixed"
                    >
                    <HeaderStyle Font-Size="14px" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True" />
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True" />
                    <SortExpressions>
                        <telerik:GridSortExpression FieldName="Content_Viewed" SortOrder="Ascending" />
                    </SortExpressions>
                    <CommandItemTemplate>
                        <asp:Button ID="ExportMasterDataButton" runat="server" CommandName="ExportMasterData"
                            ClientIDMode="Static"></asp:Button>
                    </CommandItemTemplate>
                    <Columns>
                        <telerik:GridBoundColumn DataField="First_Name_Sender" 
                            HeaderText="Sender First Name" UniqueName="FirstNameSender"
                            ItemStyle-Width="130px">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Last_Name_Sender" SortExpression="Last_Name_Sender"
                            HeaderText="Sender Last Name" UniqueName="LastNameSender" ItemStyle-Width="100px">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Email_Sender"  HeaderText="Sender Email"
                            UniqueName="EmailSender" ItemStyle-Width="100px">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="First_Name"  HeaderText="Recipient First Name"
                            UniqueName="FirstName" ItemStyle-Width="100px">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Last_Name"  HeaderText="Recipient Last Name"
                            UniqueName="LastName" ItemStyle-Width="100px">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn DataField="Email_Address" SortExpression="Email_Address"
                            HeaderText="Recipient Email Address" ItemStyle-Width="100px" UniqueName="EmailAddress">
                            <ItemTemplate>
                                <a onclick="viewVirtualContact(<%#Eval("contact_id")%>,<%#Eval("isvirtualcontact")%>)">
                                    <%# Eval("Email_Address") %></a>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="Company"  HeaderText="Company"
                            UniqueName="Company" ItemStyle-Width="100px">
                         <%--   <FilterTemplate>
                                <div class="Drop-down-child">
                                    <uc1:CompanyFilter ID="CompanyFilter1" runat="server" />
                                </div>
                            </FilterTemplate>--%>
                            <ItemTemplate>
                                <%# Eval("Company")%>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="Create_Date_Std" 
                            HeaderText="Send Date" UniqueName="Create_Date_Std" ItemStyle-Width="100px">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn DataField="Video_content_sent" SortExpression="Video_content_sent"
                            HeaderText="Content Sent" UniqueName="Videocontentsent" ItemStyle-Width="100px">
                            <ItemTemplate>
                                <%# Eval("Video_content_sent")%>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="Content_Viewed" SortExpression="Content_Viewed"
                            HeaderText="Content Viewed" UniqueName="ContentViewed" ItemStyle-Width="100px">
                          <%--  <FilterTemplate>
                                <div class="Drop-down-child">
                                    <uc1:SessionFilter ID="SessionFilter1" runat="server" />
                                </div>
                            </FilterTemplate>--%>
                            <ItemTemplate>
                                <%# Eval("Content_Viewed")%>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="Content_Viewed_Date" SortExpression="Content_Viewed_Date"
                            HeaderText="Viewing Date" UniqueName="ContentViewedDate" ItemStyle-Width="100px">
                            <ItemTemplate>
                                <%# Eval("Content_Viewed_Date")%>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="Duration_Viewed" SortExpression="Duration_Viewed"
                            HeaderText="Viewing Duration" UniqueName="DurationViewed" ItemStyle-Width="100px">
                            <ItemTemplate>
                                <%# Eval("Duration_Viewed")%>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="iplocation" SortExpression="iplocation" HeaderText="Location"
                            UniqueName="iplocation" ItemStyle-Width="100px">
                            <ItemTemplate>
                                <%# Eval("iplocation")%>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False" />
            </telerik:RadGrid>

aspx.cs code

 private void BindGrid(int parentCompanyId, string parentCompanyName, int userId, int userLevel, string startDate, string endDate, string demoSession_Id
                                                        , string contentName, string searchText, string sortBy, int pageNum, int pageSize, ref string msg)
        {

            DataTable viewings = ViewingHelper.ViewingByEmailSent(parentCompanyId, parentCompanyName, userId, userLevel, startDate, endDate, demoSession_Id,
                contentName, searchText, pageNum, pageSize, sortBy, ref msg);
            GridView1.DataSource = viewings;
            GridView1.DataBind();
           
        }

 [WebMethod]
        public static DataTable GetData(int parentCompanyId, string parentCompanyName, int userId, int userLevel, string startDate, string endDate, string demoSession_Id
                                                        , string contentName, string searchText, string sortBy, int pageNum, int pageSize)
        {
            return ViewingHelper.ViewingByEmailSent(parentCompanyId, parentCompanyName, userId, userLevel, startDate, endDate, demoSession_Id,
                contentName, searchText, pageNum, pageSize, sortBy, ref Message);
        }

Thanks & Regards
Bharat Bhushan
Konstantin Dikov
Telerik team
 answered on 05 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?