Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
158 views
I have a RadChart Bar graph. It shows date values in X axis and some count on the Bars. My Bar graph has 2 series.

Now I am working on a requirement - User clicks on a Bar and will be shown a Pop-up window. I need to pass some database table identifier values as a comma separated string to the pop up to fetch some data to show in the pop up such that the comma separated values correspond to different bars in the graph. I could not find a way to bind this comma separated string value to any of the Bars (chartseriesitems). Do not know if at all this is possible.

This is my data source for the RadChart:

var listDisengTrains = Final.Select(g => new { Date
Convert.ToDateTime(g.Date).ToOADate(), Trains1 = g.Trains1, 
Trains2 = g.Trains2, Trains1RecIds "12345,23456", Trains2RecIds "34567,45678,56789"});

As of now, I have bound Date to the X-axis, Trains1 to Series 1 and Trains2 to Series 2.
I do not know to which property of the ChartSeriesItem class can I bind Trains1RecIds and Trains2RecIds. So that I can get these comma separated string values in the code behind when the user clicks on any of the Bars in the graph and pass it as a parameter to a javascript function as shown below.

protected void ChartTrains_ItemDataBound(object 
sender, ChartItemDataBoundEventArgs e)<BR>{<BR>if (e.SeriesItem != 
null)<BR>{<BR>if (e.ChartSeries.Index % 
2 == 0)<BR>{ <BR>e.SeriesItem.ActiveRegion.Url = 
string.Format("javascript:ShowTrainInfoForm({0}"
?)<BR>}<BR>else<BR>{<BR>;<BR>}<BR><BR>}<BR>}<BR>​

Please help me to solve this.

TIA
thiru
Thirunarayanan
Top achievements
Rank 1
 answered on 12 May 2014
5 answers
91 views
Hi Telerik :)
I take a copy of your example in demo "transfer Employees" and apply on it LoadOnDemand property for nodes and groups and collapse all nodes in first time loaded,
the problem is when load after expanding a node the button "remove" not be able to click ! 
Plamen
Telerik team
 answered on 12 May 2014
1 answer
121 views
Hello Dears ,

am working on creating a employees database contain photo for the employee like this :
employee name , id , photo
I need to show it grid the data and the photo also with ability to change the photo and add other one
could you help please
Princy
Top achievements
Rank 2
 answered on 12 May 2014
5 answers
786 views
Team,
 I have rad combo with three item:Rice,wheat and Sugar
I wan to get the selected item of this combo in java script.please share me the code snippet
Princy
Top achievements
Rank 2
 answered on 12 May 2014
6 answers
143 views
I want to decrease the height of the appointment in Month view. Right now I can only see 2 appointments, and then the "More..." link. Each appointment object in the day has room for 2 lines of text but we only require 1 for all appointments. Everything I've seen so far only increases the height or decreases the area where the subject line is (cutting that text off a bit) but doesn't reduce the size of the entire appointment object.

Thank you.
Brad Burnette
Top achievements
Rank 1
 answered on 10 May 2014
7 answers
144 views
Hi,
I noticed that after opening the Radspell screen if we press the tab then it is not going to the controls present in the screen instead it is going to the address bar.now my question is , Is there any way to provide the tabindex to the controls present in the Radspell screen or at least focus to the first control? I know it's bit of a silly question, but a bug has been filed about it and I have to investigate.

Thank you!!
Burepalli V S Rao.
Marin Bratanov
Telerik team
 answered on 10 May 2014
1 answer
161 views
Hello experts

I need a chart with ellipse where ellipse width (x-axis) is 10 to 15 and ellipse height (y-axis) is 20 to 30.

Can anybody help me to achieve this.



Thanks
:)
Danail Vasilev
Telerik team
 answered on 10 May 2014
6 answers
198 views
NUTSHELL
In an Export to Excel, I want a column that contains a network folder location to be a hyperlink to that location.

DETAIL
I have a grid of many columns, one of which is hidden and contains a network file location.  The field is displayed in when Export to Excel, but it is only a text field.  I would like this to be a hyperlink so the user could click it which would open the network location specified in that field.

SAMPLE FIELD DATA
\\c-fs\vol2\Proposal\2014\a9873 - NYC - GSF – Brockport, NY

EXISTING CODE
Protected Sub btnExport_Click(ByVal sender As Object, ByVal e As EventArgs)
 
    Me.RadGrid1.MasterTableView.GetColumn("Location").Display = True  'This field contains the network location
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_NotIssued").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_NotIssuedReason").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_Qualification").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_EstimatedProjectArea").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_EstimatedConstructionCost").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_WinningProbabilityPct").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_DateGranted").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_ProjectID").Display = True
    Me.RadGrid1.MasterTableView.GetColumn("Proposal_Comments").Display = True
 
    For Each item As GridDataItem In Me.RadGrid1.Items
        If item.Selected = False Then
            item.Visible = False
        End If
    Next
    Me.RadGrid1.Rebind()
    Me.RadGrid1.ExportSettings.ExportOnlyData = True
    Me.RadGrid1.ExportSettings.OpenInNewWindow = True
    Me.RadGrid1.ExportSettings.FileName = "Selected Proposals " & Format(Now, "yyyy-MM-dd-h-mm-ss")
    'Me.RadGrid1.ExportSettings.IgnorePaging = True
    Me.RadGrid1.ExportSettings.UseItemStyles = True
    Me.RadGrid1.MasterTableView.ExportToExcel()
 
 
End Sub

I am programming in MS Visual Studio 2012.
I am using Telerik UI for ASP.NET AJAX, v.2014.1.225.45
Daniel
Telerik team
 answered on 10 May 2014
1 answer
70 views
Hi,

We run a SharePoint 2010 solution in SharePoint 2013 in compability mode, and we use this installer: http://www.telerik.com/downloads/productfiles/bgcte/Telerik_ASP_NET_Web_Parts_2013_3_1324_for_SharePoint_2013_Dev.msi

The problem is that the feature doesnt show up in the site feature page. We only see the "Use RadEditor to edit List Items" feature.

The wsp I installed with Add-SPSolution and Install-SPSolution. it installed successfully. Before we installed this wsp we had the SP2010 version, but as we had problem with that we tried with the SP2013 version.


Kind Regards,
Mattias
Mattias
Top achievements
Rank 1
 answered on 09 May 2014
4 answers
635 views
What I am trying to do is pass a value from my RadGrid to my RadWindow when a button is clicked, very similar to what is demonstrated in this demo: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid 

The trouble I have is finding my RadWindow via Javascript. Every method I try results in a null object returned from the find command. The most recent method I tried was registering the javascript as a startup script. I'm not sure what exactly I'm doing wrong. See my code below:

ASPX

<telerik:RadGrid ID="durationGrid" runat="server" DataSourceID="durationDataSource"
         OnItemCommand="durationGrid_ItemCommand" AllowPaging="true" OnItemCreated="durationGrid_ItemCreated">
            <MasterTableView runat="server" CommandItemDisplay="Top" UseAllDataFields="true" AutoGenerateColumns="false" DataKeyNames="ID">
                <Columns>
                    <telerik:GridBoundColumn DataField="Stat" HeaderText="Status" SortExpression="Stat" ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="ItemName" HeaderText="Name" SortExpression="ItemName" ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="PartNumber" HeaderText="Part Number" SortExpression="PartNumber" ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="Serial" HeaderText="Serial #" SortExpression="Serial" ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="LotNumber" HeaderText="Lot #" SortExpression="LotNumber" ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="CrossRefID" HeaderText="PS #" SortExpression="CrossRefID" ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="OEM" HeaderText="OEM" SortExpression="OEM" ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="Consigned" HeaderText="Consigned" ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="location" HeaderText="Location" SortExpression="location" ReadOnly="true" />
                    <telerik:GridBoundColumn DataField="Value" HeaderText="Value" SortExpression="Value" ReadOnly="true" DataFormatString="{0:c}" />
                    <telerik:GridBoundColumn DataField="ExpirationDate" HeaderText="Expiration Date" SortExpression="ExpirationDate" ReadOnly="true" DataFormatString="{0:MM/dd/yyy}" />
                    <telerik:GridTemplateColumn HeaderText="">
                            <ItemTemplate>
                                <asp:ImageButton ID="NotesBtn" runat="server" ImageUrl="images/icons/notes.png" OnClick="NotesBtn_Click"  />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                </Columns>
                <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" />
            </MasterTableView>
            <ExportSettings FileName="Duration Report"></ExportSettings>
        </telerik:RadGrid>
 
 
        <telerik:RadWindowManager ID="winma2" runat="server">
            <Windows>
                 <telerik:RadWindow ID="NotesWindow" runat="server" Modal="true" Behaviors="Close, Move"
                    Width="540px" Height="490px" DestroyOnClose="false" VisibleStatusbar="false" ShowContentDuringLoad="false" ReloadOnShow="true"
                    Skin="Simple" OnClientShow="OnClientShow" Title="Item Notes Editor" >    
                 </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>



C#

protected void NotesBtn_Click(object sender, EventArgs e)
      {
 
          string script = "function openRadWin(value) {var win = $find('" + NotesWindow.ClientID + "');alert(win); Sys.Application.remove_load(openRadWin);}Sys.Application.add_load(openRadWin);";
          ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
      }
 
 
      protected void durationGrid_ItemCreated(object sender, GridItemEventArgs e)
      {
          if (e.Item is GridCommandItem)
          {
              Button btncmd = (e.Item as GridCommandItem).FindControl("ExportToExcelButton") as Button;
 
              if (btncmd != null)
              {
                  RadScriptManager.GetCurrent(this.Page).RegisterPostBackControl(btncmd);
              }
 
          }
          if (e.Item is GridDataItem)
          {
              ImageButton NotesBtn = (ImageButton)e.Item.FindControl("NotesBtn");
              NotesBtn.OnClientClick = "openRadWin('" + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"] + "');";
          }
      }

Zhuoyun
Top achievements
Rank 1
 answered on 09 May 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?