Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
520 views
Is there a way to get the headertext to be visible in the header of a GridClientSelectColumn?
I have a customer who insists that "nobody is going to know what it does" if there isn't any text in the header...
Eyup
Telerik team
 answered on 14 Jun 2016
1 answer
188 views
I had setup a way to restore the filtering/sorting of the grid through session on page load when it went to "NeedDataSource" function. However, the data I am currently populating has a lot of data, and had to optimize the performance of the grid by starting to use the entitydatasource that you specified in the documentation. The grid is faster, but I am unsure how to restore the filter/sort settings the user made now. Is there another way I can restore?
Viktor Tachev
Telerik team
 answered on 14 Jun 2016
1 answer
251 views

Dear Friends,

I am preparing dynamic grid using VB.net and RAD grid where columns are getting generated in Run Time. I am trying to apply filter (inbuilt filter) on multiple column at time but application is throwing exception (is neither a DataColumn nor a DataRelation for table Table). This error occurs when I try to apply filter. I am unable to identify root cause. Any input would be appreciated. I am using NeedDataSource() event of Radgrid and this event is throwing above mentioned exception on applying filter.

Thanks in advance.
Lokesh

Viktor Tachev
Telerik team
 answered on 14 Jun 2016
1 answer
193 views

I know I have done this before, but I can't remember how....don't you hate being in that situation?!?

I want a simple nested table, of say customers and their orders, displayed in a fashion where customers are the master table, and orders are the detail table.  In other words, the grid shows a list of customers and you can expand a customer to see their orders.  I can easily get the data in a datatable where the customer data is duplicated on each row which represents a unique order.  I want to setup the grid so that I can do one bind and have it all populated.  All of the examples now show a separate databind for each of the child(nested) tables.  For efficiency and simplicity, I'd like to avoid all of the extra databinds.  I know I've done this in the past...

Any help or examples would be greatly appreciated.

Thanks in advance,

Pavlina
Telerik team
 answered on 14 Jun 2016
1 answer
136 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
138 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
133 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
879 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
571 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
408 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?