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

I am facing the issue with batchedit when I am trying to get the dropdown list from the grid edit row and append its list with new item. All this am trying to do in a client function "Batcheditopening". I have a rad grid with batch edit mode . In editor template I have a dropdown list  which I am binding with database at grid pretender event. I have a requirement where I have to append a new item in the dropdown based on the value of template cell. 

Please help me to solve this scenario.

 

Pavlina
Telerik team
 answered on 14 Jun 2016
1 answer
122 views

I have a chart that has an additional Y Axis which should be on the far right of the chart.

If the chart and series is set as a "Line" I can set the AxisCrossingPoint value for the second Axis and it shows it correctly but if I have the chart type set as "ScatterLine" (which I require) it does not move the Axis and just stays on the left of the chart next to the first Y Axis.

No matter what value I under it does not move at all. I've tried it in code behind and in the HTML. Very strange as it works fine for "Line" type series/chart.

Is this a limitation of ScatterLine?

Slav
Telerik team
 answered on 14 Jun 2016
1 answer
115 views

I have a situation where the data coming in because of the data coming from two separate tables can have the same ID. The ID is mapped to the NodeID (DataFieldID) of the tree view. Because of this I can have two nodes with the same id.  Instead of changing my data model converting the ID (int) to a ID (GUID) I would like to see if there is a mechanism in the TreeView where I can check to see if when adding a node check to see if the parent node is accepting a child or not. The below structure represents my tree structure.

 

When tree evaluates Node 75 with ParentID 37, I want it at the bottom node as it’s a folder vs the first 37 as it not a node that can have children.

NodeID  75

ParentID 37

 

 

 

NodeID 18

ParentID  null

 

       NodeID 69           

       ParentID  18 

 

       NodeID 56      

       ParentID 18

 

       NodeID  37 ß I don’t want it here

       Parent 18

             

 

       NodeID  1

       Parent 18

 

       NodeID  12

       Parent 18

      

       NodeID  26

       Parent 18

 

 

       NodeID 37  ß I want it here

       ParentID 18

        

 

Is there an event I can write code for to interrogate the node to see if I can add a child?

Ivan Danchev
Telerik team
 answered on 14 Jun 2016
14 answers
818 views
Hi I dynamically generate the columns in a grid and then load and bind a datasource, everything looks good until I press the column header to sort the grid, the grid does not sort and the column headers disappear.  What Am I missing:

The grid declaration:

<telerik:RadGrid 
                               ID="radGridOutput" 
                               runat="server" 
                               AllowPaging="True" 
                               Width="100%"
                               enableEmbeddedSkins="false"
                               Skin="CorpsNET"
                               AllowSorting="true"
                               pagesize="10"  
                               ClientSettings-AllowKeyboardNavigation="false"
                               ItemStyle-HorizontalAlign="Center"
                               HeaderStyle-HorizontalAlign="Center"
                               AlternatingItemStyle-HorizontalAlign="Center" 
                               onpageindexchanged="radGridOutput_PageIndexChanged" 
                               onsortcommand="radGridOutput_SortCommand" 
                               onitemdatabound="radGridOutput_ItemDataBound">
                               <PagerStyle Mode="NextPrevAndNumeric" />
                               <MasterTableView 
                                   AutoGenerateColumns="false" 
                                   Width="100%"
                                   CommandItemDisplay="None" 
                                   PageSize="10">
                                   <Columns>
                                   </Columns>
                                   <EditFormSettings>
                                       <PopUpSettings ScrollBars="None" />
                                   </EditFormSettings>
                                   <NoRecordsTemplate>
                                       <div align="center" style="color:darkorange">---------- No Records to Display -----------</div
                                   </NoRecordsTemplate>
                               </MasterTableView>
<ClientSettings>
                                </ClientSettings>
                            </telerik:RadGrid>
Clicking a button loads the grid the first time:

protected void btnCreateReport_Click(object sender, EventArgs e)
{
    LoadReport(true);
    RadTabStrip1.SelectedIndex = 1;
    RadMultiPage1.SelectedIndex = 1;
}



The Code:
   protected void LoadReport(bool firstLoad)
    {
        //if we are paging or sorting don't erase the columns
        if (firstLoad == true)
        {
            radGridOutput.DataSource = null;
            radGridOutput.MasterTableView.DataKeyNames = null;
            radGridOutput.MasterTableView.Columns.Clear();
            radGridOutput.Columns.Clear();
        }
  
                if (firstLoad == true)
                {
                    radGridOutput.MasterTableView.AutoGenerateColumns = false;
                    radGridOutput.AutoGenerateColumns = false;
  
                    //string[] _keys3 = { "ID" };
  
                    //radGridOutput.MasterTableView.DataKeyNames = _keys3;
                    radGridOutput.Columns.Add(new GridBoundColumn() { UniqueName = "RosterDate", DataField = "RosterDateString", HeaderText = "Date", SortExpression = "RosterDate" });
                    radGridOutput.Columns.Add(new GridBoundColumn() { UniqueName = "RosterDay", DataField = "RosterDay", HeaderText = "Day" });
                    radGridOutput.Columns.Add(new GridBoundColumn() { UniqueName = "SponsorNumberAndName", DataField = "SponsorNumberAndName", HeaderText = "Sponsor", SortExpression = "SponsorNumberAndName" });
                    radGridOutput.Columns.Add(new GridBoundColumn() { UniqueName = "LocationNumberAndName", DataField = "LocationNumberAndName", HeaderText = "Location", SortExpression = "LocationNumberAndName" });
                    radGridOutput.Columns.Add(new GridBoundColumn() { UniqueName = "CrewName", DataField = "CrewName", HeaderText = "Crew", SortExpression = "CrewName" });
                    radGridOutput.Columns.Add(new GridBoundColumn() { UniqueName = "SupervisorName", DataField = "SupervisorName", HeaderText = "Supervisor", SortExpression = "SupervisorName" });
                    radGridOutput.Columns.Add(new GridBoundColumn() { UniqueName = "NumberOfCrewmembers", DataField = "NumberOfCrewmembers", HeaderText = "# Crew Members", SortExpression = "NumberOfCrewmembers" });
                    radGridOutput.Columns.Add(new GridBoundColumn() { UniqueName = "TotalHours", DataField = "totalhours", HeaderText = "Total Hours", SortExpression = "totalHours" });
  
                }
  
                if (rdoPayPeriod.Checked == true)
                {
                    PayPeriod _payPeriod = PayPeriodService.GetByID(Int32.Parse(ddlPayPeriod.SelectedValue.ToString()));
                    radGridOutput.DataSource = RptProjectHoursDetailService.GetReport(_payPeriod.StartDate, _payPeriod.EndDate, ddlSponsor.SelectedIndex>0?Int32.Parse(ddlSponsor.SelectedValue.ToString()):0);
                }
                else if (rdoSchoolMonth.Checked == true)
                {
                    SchoolMonth _schoolMonth = SchoolMonthService.GetByID(Int32.Parse(ddlSchoolMonth.SelectedValue.ToString()));
                    radGridOutput.DataSource = RptProjectHoursDetailService.GetReport(_schoolMonth.StartDate, _schoolMonth.EndDate, ddlSponsor.SelectedIndex > 0 ? Int32.Parse(ddlSponsor.SelectedValue.ToString()) : 0);
                }
                else if (rdoSpecifiedTimePeriod.Checked == true)
                {
                    radGridOutput.DataSource = RptProjectHoursDetailService.GetReport(DateTime.Parse(rdpStartDate.DbSelectedDate.ToString()), DateTime.Parse(rdpEndDate.DbSelectedDate.ToString()), ddlSponsor.SelectedIndex > 0 ? Int32.Parse(ddlSponsor.SelectedValue.ToString()) : 0);
                }
                radGridOutput.DataBind();
      }

The ourput of the GetReport Call is a business object with properties that match the column names and here is the sort command procedure:

protected void radGridOutput_SortCommand(object source, GridSortCommandEventArgs e)
  {
      LoadReport(false);
  }

I can't see anything amiss that would cause this issue.  I'm currently not using any type of AJAX management on the page.

Thanks in Advance

Jonathan

Sagar
Top achievements
Rank 1
 answered on 14 Jun 2016
3 answers
536 views
How can I scroll to bottom RadGrid from Client side.
Please help
Akshit
Top achievements
Rank 1
 answered on 13 Jun 2016
2 answers
377 views

Hi,

I have a radgrid with the following settings

  <ExportSettings IgnorePaging="true" OpenInNewWindow="true" HideStructureColumns="true">
                                                                    <Excel Format="Xlsx" DefaultCellAlignment="Left" />                                                                    
  </ExportSettings>    

<CommandItemTemplate>
                                                                        <asp:Button ID="btnShowAll" runat="server" Text="Clear Filter" CssClass="fa fa-refresh"
                                                                            AlternateText="Show All" ToolTip="Clear filters" CommandName="InitShowAll" />
                                                                        <asp:Button ID="btnExport" runat="server" Text="Export" CssClass="fa fa-refresh"
                                                                            AlternateText="Export" ToolTip="Export" CommandName="InitExport" />
  </CommandItemTemplate>

The issue is, I couldn't remove the filter row from the exported xlsx file. Even with ExportOnlyData = true the filter row data is visible. 

I also tried filterItem.Visible = false. Sill no luck.

Subhashini
Top achievements
Rank 1
 answered on 13 Jun 2016
6 answers
512 views
Hi,
 I have downloaded latest trial version of RadControls for ASP.NET.

I am just trying to use the RadEditor in my asp.net mvc view.
I tried http://www.telerik.com/help/aspnet-ajax/editor-getting-started.html
and
http://www.telerik.com/help/aspnet-ajax/mvc-using-editor.html

I just placed the editor on my view, no coding, nothing, but still i am getting the following error message in execution -
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

I have looked various forums on telerik but doesn't found appropriate one to get the answer.
So finally requesting the support.

I have also created support ticket (523566) for this issue.

Please find the attached code i have tried.
Please help me resolve this issue.

Thanks and regards
Irfan Sheikh
Suresh
Top achievements
Rank 1
 answered on 13 Jun 2016
12 answers
336 views

Is it possible to toggle Full Screen mode on the sever-side for the RadImageGallery control?

I have a RadImageGallery (inside a RadAjaxPanel), based on a users permissions and other variables (defined on the server-side), I want to be able to toggle whether or not the Gallery is displayed in Full Screen initially or not.

 

Thanks in advance!

Jon
Top achievements
Rank 1
 answered on 13 Jun 2016
23 answers
337 views
Hi --
I'm trying to find out if Telerik or anyone else has created a plugin/extension for Microsoft Visual Studio 2010 that will allow Microsoft's Coded UI Test builder/runner to access all properties of Telerik's ASP.NET AJAX RadControls such as RadComboBox.

For background on my question, please see this article http://blogs.msdn.com/b/mathew_aniyan/archive/2011/03/28/visual-studio-ui-test-extensibility-scenarios-amp-guiding-principles.aspx which says 
"Microsoft encourages third party custom UI framework vendors, such as, ComponentOne, DevExpress, Infragistics and Telerik to build and support UI Testing for their custom UI frameworks."

I know that Telerik sells a Test Studio application that has translators for the RadControls, and Telerik offers a free test framework with wrappers for RadControls.  But my company is already using Microsoft Visual Studio 2010 and Microsoft Test Manager for test automation, and the Microsoft test tools currently have limited awareness of RadControl properties on web pages.  I don't want to replace the Microsoft test tools and start using Telerik's Test Studio at this point; I want to extend the Microsoft tools with help from Telerik or the developer community.

PS: Maybe another alternative is for Telerik ASP.NET AJAX RadControls to be compliant with Microsoft Active Accessibility (MSAA)?  Apparently that has been done for Telerik WinForms controls http://www.telerik.com/products/winforms/whats-new-full-story.aspx, but I don't know if that has been (or can be) done for Telerik ASP.NET AJAX RadControls.

Thanks,
Kevin

Misho
Telerik team
 answered on 13 Jun 2016
1 answer
207 views

I am plotting WeekNumber of the year on X-axis, and Number of Requests of a particular school on to Y-axis of a Line Series.

Results of a Stored Procedure are assigned to a List of section-requests, by passing School ID, and a date range.

The output of Stored procedure gives: Number of Requests per week, Created Date, Week Number (of the Year), School Name.

Code calls stored procedure 5 times, and stores the results in 5 individual Lists. Code loops through an array of 5 Lists (section-requests) .

By using the LineSeries, AxisItem, and CategorySeriesItem , I have created a Multi-Line chart. 

My issues are:
(1) Once the first List plots on the first LineChart, because of the looping as individual Lists, the Week Number of the second List is starting from where the Week Number of the first List ended.  Is there a way that I can group all the Lists with the LineSeries, and plot only one set of Week Numbers (X axis) and related LineSeries (Y axis) for each individual school?  Please take a look at the Line chart in the attached file

(2) If there is no section-request in a particular week, I need logic to treat “Number of Requests per week” as zero.

For Loop Code:

for (int i = 0; i < arrMasterList.Length; i++)
{
    int intCount = arrMasterList[i].Count;

    foreach (var sectionRequest in arrMasterList[i])
    {
        intSecReqs = sectionRequest.NumberOfRequestsPerWeek;

        if (intSecReqs >= 0)
        {
            AxisItem item = new AxisItem();
            item.LabelText = "Wk: " + sectionRequest.WeekNumber;
            LineChart.PlotArea.XAxis.Items.Add(item);

            CategorySeriesItem categorySeriesItem = new CategorySeriesItem();
            categorySeriesItem.Y = intSecReqs;
            arrLineSeries[i].SeriesItems.Add(categorySeriesItem);
            lstSecReqs.Add(intSecReqs);
        }

        LineChart.PlotArea.Series.Add(arrLineSeries[i]);
      }
   }

   intMaxValueReqs = lstSecReqs.Max();

   LineChart.PlotArea.YAxis.MinValue = 0;
   LineChart.PlotArea.YAxis.MaxValue = intMaxValueReqs + 10;
   LineChart.PlotArea.YAxis.MinorGridLines.Color = Color.White;
   LineChart.PlotArea.XAxis.MajorGridLines.Color = Color.White; 
   LineChart.PlotArea.XAxis.TitleAppearance.Text = "Week number";


Danail Vasilev
Telerik team
 answered on 13 Jun 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?