Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
124 views
I have gridview of a table so I can export it.
if I can export off of some other item like a panel - that may help.
anyhow my grid has html and I put a single plain text at top to test and when I export to pdf - only that text shows.
when I export to word - everything shows (properly)

is there a command I need to do to tell pdf to use html table?
Doug
Top achievements
Rank 1
 answered on 09 Dec 2016
0 answers
184 views

Is it possible to apply Bootstrap styling to a version '2013.3.1324.40' RadGrid? 

(Please don't discuss upgrades.  It's just not politically possible at this time.)

Boris
Top achievements
Rank 1
 asked on 09 Dec 2016
1 answer
142 views

Hi,

I have a site where I display a list of available Camps that the users can register for.  What I would like to do is group them by "CampStartDate".  I have the code below but no matter how I try to group, I always get the error "The RadListView control does not have an item placeholder specified."

 

<telerik:RadListView ID="RadListView1" ItemPlaceholderID="DataGroupPlaceHolder2" DataGroups="CampStartDate" GroupPlaceholderID="DataGroupPlaceHolder1" runat="server" DataKeyNames="CampId" Skin="Bootstrap" OnSelectedIndexChanged="RadListView1_SelectedIndexChanged">
                <LayoutTemplate>
                    <asp:Panel ID="CampHolder" runat="server">
                    </asp:Panel>
                </LayoutTemplate>
                <GroupTemplate>
                     <div class="vc_row wpb_row vc_inner vc_row-fluid">
                        <asp:PlaceHolder ID="CampsHolder" runat="server"></asp:PlaceHolder>
                    </div>
                </GroupTemplate>
                <ItemTemplate>
                        <div class="rlvI vc_col-sm-4 wpb_column vc_column_container ">
                        <asp:Label ID="CampNameLabel" CssClass="camptitle" runat="server" Text='<%# "Camp: " + Eval("CampName") %>' />
                        <br /><br />
                        <strong>Start Date:</strong> <asp:Label ID="CampStartDateLabel" runat="server" Text='<%# Eval("CampStartDate", "{0:D}") %>' />
                    </div>
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <div class="rlvA vc_col-sm-4 wpb_column vc_column_container ">
                        <asp:Label ID="CampNameLabel" CssClass="camptitle" runat="server" Text='<%# "Camp: " + Eval("CampName") %>' />
                        <br /><br />
                        <strong>Start Date:</strong> <asp:Label ID="CampStartDateLabel" runat="server" Text='<%# Eval("CampStartDate", "{0:D}") %>' />
                    </div>
                </AlternatingItemTemplate>
                <EmptyDataTemplate>
                    <div class="RadListView RadListView_Bootstrap">
                        <div class="rlvEmpty">
                            There are no camps to be displayed.</div>

                    </div>
                </EmptyDataTemplate>
                <ValidationSettings EnableModelValidation="False" EnableValidation="False" />
                   <DataGroups>
                     <telerik:ListViewDataGroup GroupField="CampStartDate" DataGroupPlaceholderID="DataGroupPlaceHolder1"
                         SortOrder="Ascending">
                         <DataGroupTemplate>
                             <asp:Panel runat="server" ID="Panel4" GroupingText='<%# (Container as RadListViewDataGroupItem).DataGroupKey %>'>
                                 <asp:PlaceHolder runat="server" ID="DataGroupPlaceHolder2"></asp:PlaceHolder>
                             </asp:Panel>
                         </DataGroupTemplate>
                     </telerik:ListViewDataGroup>
                 </DataGroups>
            </telerik:RadListView>

Konstantin Dikov
Telerik team
 answered on 09 Dec 2016
2 answers
86 views

Hi,

My application requires to have grid navigation with up/down arrow keys and this is working, however, changing the selected row does not generates

raises the SelectedIndexChanged in the server side which I need to execute some other code to populate a panel with other information. The  SelectedIndexChanged  is only raised if a row is selected with a mouse click, and I need it to happen when changing the selected row with the arrow keys.

How do I need to configure the Grid to support this behavior?

 

 

Miguel
Top achievements
Rank 1
 answered on 09 Dec 2016
3 answers
631 views

Hey I have a RadGrid that pulls information from the database and I'm using my NeedDataSource Event to pull the data from the DB, make a few tweaks and assign it to my RadGrid DataSource property. We're using the default paging,sorting, etc and what happens when a user moves to the next page is that the NeedDataSource even is fired again and my data starts pulling from the database again and goes through the same process and it just went for no apparent reason. Is there a way to use the existing DataSource that is already in the RadGrid ? For Reference I'm using Telerik.Web.UI Version 2013.1.403.35

Thanks

Nick
Top achievements
Rank 1
 answered on 09 Dec 2016
4 answers
665 views

Hello,

I thought this would be straight-forward, and maybe it is -- I am probably missing something obvious.  I have a RadGrid that has DropDownList inside a GridTemplateColumn.

<telerik:RadGrid ID="RadGridTestsInstruments" runat="server"
                                        DataSourceID="SqlDataSourceTestsInstruments"
                                        AutoGenerateColumns="False"
                                        AllowSorting="True"
                                        Height="220px"
                                        Width="430px"
                                        AllowMultiRowSelection="false"
                                        AllowAutomaticUpdates="True"
                                        OnItemUpdated="RadGridTestsInstruments_ItemUpdated"
                                        style="margin-top: 0px">
                                        <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
                                        <ClientSettings AllowKeyboardNavigation="true"
                                            EnableRowHoverStyle="true">
                                            <Selecting AllowRowSelect="true"></Selecting>
                                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                        </ClientSettings>
                                        <MasterTableView
                                            DataSourceID="SqlDataSourceTestsInstruments"
                                            DataKeyNames="set_test_id,test_id"
                                            EditMode="Batch">
                                            <BatchEditingSettings EditType="Cell"/>
                                            <Columns>
                                                <telerik:GridBoundColumn DataField="set_test_id" HeaderText="set_test_id" SortExpression="set_test_id" UniqueName="set_test_id" DataType="System.Int32" ReadOnly="True" Display="False">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="test_id" DataType="System.Int32" HeaderText="test_id" ReadOnly="True" SortExpression="test_id" UniqueName="test_id" Display="False">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="grid_instrument_id" DataType="System.Int32" HeaderText="grid_instrument_id" ReadOnly="True" SortExpression="grid_instrument_id" UniqueName="grid_instrument_id" Display="False">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="test" HeaderText="Test" SortExpression="test" UniqueName="test" ReadOnly="True">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridTemplateColumn HeaderText="Instrument" HeaderStyle-Width="110px" UniqueName="instrument_id" DataField="instrument_id" AllowFiltering="false">
                                                    <ItemTemplate>
                                                        <%# Eval("instrument") %>
                                                    </ItemTemplate>
                                                    <EditItemTemplate>
                                                        <telerik:RadDropDownList RenderMode="Lightweight" runat="server" ID="RadDropDownListInstruments"
                                                            DataField="set_test_id"
                                                            DataValueField="instrument_id"
                                                            DataTextField="instrument"
                                                            AllowCustomText="true"
                                                            EmptyMessage="Choose Instrument"
                                                            DataSourceID="SqlDataSourceInstruments"
                                                            Width="100px">
                                                        </telerik:RadDropDownList>
                                                    </EditItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridBoundColumn DataField="workflow_id" DataType="System.Int32" HeaderText="workflow_id" ReadOnly="True" UniqueName="workflow_id" Display="False">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="workflow" HeaderText="Workflow" SortExpression="workflow" UniqueName="workflow" ReadOnly="True">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </telerik:RadGrid>

 

I need the DropDownList datasource to have a parameter from a cell value on the selected row. The DataKeyName also contains the same value that could be used as a parm.

<asp:SqlDataSource ID="SqlDataSourceInstruments" runat="server" ConnectionString="<%$ ConnectionStrings:MineLIMSConnection %>"
            SelectCommand="SELECT distinct i.instrument_id, i.instrument, tst.set_test_id
                                FROM instruments i
                                Inner Join tests_instruments ti on ti.instrument_id = i.instrument_id
                                Inner Join ml_temp_dest_sets_tests tst on tst.test_id = ti.test_id
                            WHERE tst.set_test_id = @set_test_id">
            <SelectParameters>
                <asp:ControlParameter ControlID="RadGridTestsInstruments" DefaultValue="999" Name="set_test_id" PropertyName="SelectedValues['set_test_id']" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>

 

When I try to use a ControlParameter from the Grid itself as shown above, I get this error:

Could not find control 'RadGridTestsInstruments' in ControlParameter 'set_test_id'.

<asp:SqlDataSource ID="SqlDataSourceInstruments" runat="server" ConnectionString="<%$ ConnectionStrings:MineLIMSConnection %>"
            SelectCommand="SELECT distinct i.instrument_id, i.instrument, tst.set_test_id
                                FROM instruments i
                                Inner Join tests_instruments ti on ti.instrument_id = i.instrument_id
                                Inner Join ml_temp_dest_sets_tests tst on tst.test_id = ti.test_id
                            WHERE tst.set_test_id = @set_test_id">
            <SelectParameters>
                <asp:Parameter Name="set_test_id" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>

 

If I just use a Parameter from the Grid itself as shown above, there is nothing returned.

I am thinking that I should be going this route, but I must not be setting the right field on the Grid and/or dropdown to set the parameter properly.

If I remove the parameter completely, I get data, but from all rows in the Grid, which is incorrect.

Thanks in advance,

g.

 

 

 

 

Jeff
Top achievements
Rank 1
 answered on 09 Dec 2016
1 answer
681 views

 

How to get the edit value from the GridBoundColumn in RadGrid.

telerik:GridBoundColumn UniqueName="Title" ReadOnly="true" DataField="TBL_Jobs_Titles.Title" HeaderText="Title" DataType="System.String" HeaderStyle-Width="40px" FilterControlWidth="40px"></telerik:GridBoundColumn>

I am getting null value and send how to implement it
Eyup
Telerik team
 answered on 09 Dec 2016
1 answer
212 views

Hi,

I'm using the RadWizard inside a custom advanced template for the RadScheduler Insert/Edit. Said RadScheduler is itself in a UserControl that is loaded from a master page on menu button click (All working from AJAX, no page ever reloaded).

 

Here's the chain of event to help you understand my situation : 

 

Master page loads usercontrol containing RadScheduler.

RadScheduler loads a custom template on Insert/Edit

Custom template uses a RadWizard to guide the user through an appointment insertion

I've used test cases provided in various threads that had similar question but they do not work : User can press "Next" without validation triggering

I also tried to add this line to my web.config but since I'm using .Net 4.0 I think it should not even matter : 

<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />

 

Here is one of the template I tried, I can press "Next" on it without entering any info on the textboxes

 

<telerik:RadWizard runat="server" ID="RadWizard2" RenderedSteps="All">
    <WizardSteps>
        <telerik:RadWizardStep ID="RadWizardStep3" ValidationGroup="Group1"  >
 
            <asp:TextBox runat="server" ID="TextBox1" ValidationGroup="Group1" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="ADD TEXT"
                ControlToValidate="TextBox1" ValidationGroup="Group1">
            </asp:RequiredFieldValidator>
        </telerik:RadWizardStep>
       <telerik:RadWizardStep ID="RadWizardStep1" ValidationGroup="Group2">
 
            <asp:TextBox runat="server" ID="TextBox2" ValidationGroup="Group2" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="ADD TEXT"
                ControlToValidate="TextBox2" ValidationGroup="Group2">
            </asp:RequiredFieldValidator>
        </telerik:RadWizardStep>
          <telerik:RadWizardStep ID="RadWizardStep2" ValidationGroup="Group3">
 
            <asp:TextBox runat="server" ID="TextBox3" ValidationGroup="Group3" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="ADD TEXT"
                ControlToValidate="TextBox3" ValidationGroup="Group3">
            </asp:RequiredFieldValidator>
        </telerik:RadWizardStep>
      
    </WizardSteps>
</telerik:RadWizard>

 

Version of Telerik is 2016.3.1027

Target Framework is .Net 4.0

 

Thank you in advance

Bozhidar
Telerik team
 answered on 09 Dec 2016
9 answers
237 views
Hi,

<telerik:RadButton runat="server" ID="menuBtn" AutoPostBack="false" OnClientClicked="BtnClick"
    HoveredCssClass="menuImageHover" CssClass="menuImage" PressedCssClass="menuImagePressed">
    <ContentTemplate>
        <div id="mButton" class="mainMenuButton" runat="server">
            <table border="0">
                <tr>
                    <td>
                        <img id="icon" alt="" runat="server" />
                    </td>
                    <td style="width: 100%; text-align: center">
                        <span id="text" runat="server"></span>
                    </td>
                </tr>
            </table>
        </div>
    </ContentTemplate>
</telerik:RadButton>

CSS:
.menuImageHover
{
    background-position: -150px;
}
 
.menuImagePressed
{
    background-position: -300px;
}
 
.menuImage
{
    background: url('../Images/menu_button.png') no-repeat;
    height: 70px;
    width: 150px !important;
    position: relative;
    display: block;
}

I got the image in the menuImage class, but when I hover or click on the button, nothing happens.

Did I miss something?

Thanks
Bozhidar
Telerik team
 answered on 09 Dec 2016
0 answers
126 views

Hi!

 

I'm in need of using the RadOrgChart for showing some data and the point of the Tooltip is to show details of the Item I'm hovering over.

I did a demo just to try and see how it would look with some basic data on a Table.

I used this Demo as a reference...pretty much, I just copied and pasted it and modified it to see how it would look and then I would start doing some changes on it.

My problem: I don't know if its what I'm thinking, that the OnAjaxUpdate is not getting triggered, or if I messed up somewhere else.

I've never tried this before, so I'm pretty new at this and a little help would be useful ^^

OrgChartNew.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrgChartNew.aspx.cs" Inherits="RadOrgChart3.OrgChartNew" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
    <link href="css/styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-wide no-bg">
        <div class="qsf-demo-canvas">
            <h2>
                <span>Test</span>
            </h2>
  
            <telerik:RadOrgChart RenderMode="Lightweight" ID="RadOrgChart1" runat="server" Skin="Default" DataSourceID="SqlDataSource1" EnableDrillDown="true"
                DataFieldID="hijo" DataFieldParentID="padre">
                <ItemTemplate>
                    <asp:Panel runat="server" ID="Panel1" CssClass="TemplateHolder">
                        <div class="rocCustomTextWrap">
                            <span>
                                <%# Eval("nombre")%>
                            </span>
                        </div>
                    </asp:Panel>
                </ItemTemplate>
            </telerik:RadOrgChart>
        </div>
  
    </div>
    <telerik:RadToolTipManager RenderMode="Lightweight" runat="server" ID="RadToolTipManager1" Skin="Default" OnAjaxUpdate="OnAjaxUpdate"
        Position="BottomRight" OffsetX="16" OffsetY="16" EnableShadow="false" Width="195" Height="135" />
  
    <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:masterConnectionString %>"
        SelectCommand="SELECT [hijo], [padre], [nombre], [edad], [color] FROM [PADREHIJOTABLETEST]"></asp:SqlDataSource>
  
    </form>
</body>
</html>

 

OrgChartNew.aspx.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace RadOrgChart3
{
    public partial class OrgChartNew : System.Web.UI.Page
    {
        private bool isDrillDown = false;
 
        protected void Page_Load(object sender, EventArgs e)
        {
            RadOrgChart1.GroupItemDataBound += new Telerik.Web.UI.OrgChartGroupItemDataBoundEventHandler(RadOrgChart1_GroupItemDataBound);
            RadOrgChart1.DrillDown += RadOrgChart1_DrillDown;
        }
 
        void RadOrgChart1_DrillDown(object sender, OrgChartDrillDownEventArguments e)
        {
            isDrillDown = true;
        }
 
        void RadOrgChart1_GroupItemDataBound(object sender, Telerik.Web.UI.OrgChartGroupItemDataBoundEventArguments e)
        {
            var panel = (Panel)e.Item.FindControl("Panel1");
            RadToolTipManager1.TargetControls.Add(panel.ClientID, e.Item.Node.ID, true);
        }
 
        protected override void OnPreRenderComplete(EventArgs e)
        {
            base.OnPreRenderComplete(e);
 
            if (isDrillDown)
            {
                var nodes = RadOrgChart1.GetAllNodes();
 
                foreach (var node in nodes)
                {
                    var panel = (Panel)node.GroupItems[0].FindControl("Panel1");
                    RadToolTipManager1.TargetControls.Add(panel.ClientID, node.ID, true);
                }
            }
        }
 
        public void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs e)
        {
            Control ctrl = Page.LoadControl("OrgChartUC.ascx");
            ctrl.ID = "OrgChartUC";
 
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);
            OrgChartUC details = (OrgChartUC)ctrl;
            details.Hijo = e.Value;
        }
 
    }
}

 

OrgChartUC.ascx:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrgChartUC.ascx.cs" Inherits="RadOrgChart3.OrgChartUC" %>
 
<asp:Repeater runat="server" ID="Repeater1">
    <ItemTemplate>
        <div class="rtCustomTemplate">
            <h3 class="title">
                <asp:Literal runat="server" ID="ltrEdad" Text='<%# Eval("edad")%>' />
            </h3>
            <p class="phone">
                <asp:Literal runat="server" ID="ltrColor" Text='<%# Eval("color")%>' />
            </p>
        </div>
    </ItemTemplate>
</asp:Repeater>
  
<asp:SqlDataSource ID="EmployeesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:masterConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT [edad], [color] FROM [PADREHIJOTABLETEST] WHERE hijo = @hijo">
    <SelectParameters>
        <asp:Parameter Name="hijo" Type="Int32" />
    </SelectParameters>
</asp:SqlDataSource>

 

OrgChart.ascx.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace RadOrgChart3
{
    public partial class OrgChartUC : System.Web.UI.UserControl
    {
        public string Hijo { get; set; }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            EmployeesDataSource.SelectParameters["hijo"].DefaultValue = Hijo;
            Repeater1.DataSource = EmployeesDataSource;
            Repeater1.DataBind();
        }
    }
}

 

Thanks for your help ^^!!!

Andres
Top achievements
Rank 1
 asked on 09 Dec 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?