Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
320 views
There are only two settings I can set from the aspx file for the AddNewRecord Button of a radgrid (when it's visible).

CommandItemSettings-AddNewRecordText
CommandItemSettings-AddNewRecordImageUrl

...but this is not enough.


Is there a way to control the appearance of the add button with css?



I can do this for the edit button (for example) of each row by:

      Dim ImgBtn As ImageButton = DirectCast(e.Item.FindControl("EditCommandColumn"), ImageButton)
      ImgBtn.CssClass = "editbutton"

...in the itemCreated event.

Thanks
Marin Bratanov
Telerik team
 answered on 04 Mar 2019
12 answers
476 views
Hi,

I can successfully delete rows from my TreeList but I need to show the user a popup confirmation box first. I have searched extensively for a solution and cannot find anything.

My code for removing a row is listed below:

protected void OnSettingsTreeListDeleteCommand(object sender, TreeListCommandEventArgs e)
{
    TreeListDataItem treeListDataItem = e.Item as TreeListDataItem;
    TableRow tableRow = e.Item as TableRow;
    if (treeListDataItem != null && tableRow != null)
    {
        string name = tableRow.Cells[3].Text;
        string id = treeListDataItem.GetDataKeyValue("Id").ToString();
        SettingsTreeListDataTable.Rows.RemoveAt(Convert.ToInt32(id));
        PropertyType.GetPropertyType(typeof(Brand)).RemoveSetting(name);
    }
}

I guess I need some kind of java script popup.

Thanks

SurfRat.

Marin Bratanov
Telerik team
 answered on 04 Mar 2019
2 answers
232 views

Hello ,

 

Can you please advise how the Tree view should be setup to give this type of functionality with database table attached ?

 

thanks


KinG
Top achievements
Rank 1
 answered on 04 Mar 2019
11 answers
132 views
I upgraded from 2013.3.1324.40 to 2014.1.403.40 and when I perform DataBind() on my RadTreeList it fails with:

An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll

I switch back to the old version and it works fine.

Was there a breaking change for 2014.1.403.40?  

Thanks,

Dave


Maxime
Top achievements
Rank 1
 answered on 02 Mar 2019
1 answer
216 views

Hello..........

I want to create a check box to show by group. Where it will show only 1 checkbox per 1 group

 

- I Can  pic1.png
 - I want pic2.png

Rumen
Telerik team
 answered on 01 Mar 2019
1 answer
232 views

Hi,

I have managed to successfully create Pivot Grids from code behind, the definition of the pivot grid, rows, columns and aggregates and filters are stored in SQL Server, I am able to easily create the grid at run time and display it. The sorting, column filters, row filters all work well. However the PivotGridReportFilterField defined when clicked fail with 

 

[NullReferenceException: Object reference not set to an instance of an object.] Telerik.Web.UI.PivotGridFilterWindow.InitializeControls() +904 Telerik.Web.UI.PivotGridFilteringManager.CreateFilterWindow() +90 Telerik.Web.UI.PivotGridFilteringManager.SetUpFilterWindowControls() +14 Telerik.Web.UI.RadPivotGrid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +723

 

In the code behind, I construct the grid as follows:

foreach (var def in defList)
                {
                    if (def.ReportFieldType == (int) ReportFieldType.RowFieldForTable)
                    {
                        // Define Rows                         var rowField = new PivotGridRowField();
                        PivotGrid.Fields.Add(rowField);
                        rowField.DataField = def.Fieldname;
                        rowField.UniqueName = def.Fieldname.Replace(" "string.Empty);
                    }
                    else if (def.ReportFieldType == (int) ReportFieldType.ColumnFieldForTable)
                    {
                        // Define Columns                         var colField = new PivotGridColumnField();
                        PivotGrid.Fields.Add(colField);
                        colField.DataField = def.Fieldname;
                        colField.UniqueName = def.Fieldname.Replace(" "string.Empty);
                    }
                    else if ((def.ReportFieldType == (int) ReportFieldType.CountFieldForTable) ||                             (def.ReportFieldType == (int) ReportFieldType.AverageFieldForTable) ||                             (def.ReportFieldType == (int) ReportFieldType.SumFieldForTable))
                    {
                        //Define Aggregrates                         var aggregateField = new PivotGridAggregateField();
                        PivotGrid.Fields.Add(aggregateField);
                        aggregateField.DataField = def.Fieldname;
                        aggregateField.UniqueName = def.Fieldname.Replace(" "string.Empty);
  
                        if (def.ReportFieldType == (int) ReportFieldType.CountFieldForTable) aggregateField.Aggregate = PivotGridAggregate.Count;
                        if (def.ReportFieldType == (int) ReportFieldType.AverageFieldForTable) aggregateField.Aggregate = PivotGridAggregate.Average;
                        if (def.ReportFieldType == (int) ReportFieldType.SumFieldForTable) aggregateField.Aggregate = PivotGridAggregate.Sum;
                    }
                    else if (def.ReportFieldType == (int) ReportFieldType.FilterFields)
                    {
                        var filterField = new PivotGridReportFilterField();
                        PivotGrid.Fields.Add(filterField);
                        filterField.DataField = def.Fieldname;
                        filterField.UniqueName = def.Fieldname.Replace(" "string.Empty);
                        //filterField.FilterType = PivotGridReportFilterActionType.Includes;                     }
                }

 

Any help in resolving this issue would be much appreciated.

Thanks

 

Krish Venugopal
Top achievements
Rank 1
 answered on 01 Mar 2019
1 answer
502 views

Hi,

I'm using the following method to export a radgrid report to Excel:

ExportSettings-Excel-Format="Xlsx"

and in the codebehind:

protected void btnExport_Click(object sender, EventArgs e)
{
    rgLTDAccount.ExportSettings.OpenInNewWindow = true;
    rgLTDAccount.ExportSettings.IgnorePaging = true;
    rgLTDAccount.ExportSettings.UseItemStyles = true;
    rgLTDAccount.ExportSettings.FileName = lblFileName.Text;
    rgLTDAccount.ExportSettings.ExportOnlyData = false;
    rgLTDAccount.MasterTableView.ExportToExcel();
}

 

I'm trying to insert a custom header at the top of the report with a few rows of contextual data from codebehind.  I've seen some samples for html and biff, but not xlsx format.  I can adjust a few things like row height in the InfrastructureExporting method, but I can't figure out if it's possible to insert rows and add text to them.  Any help greatly appreciated.

Thanks.

-Dan


Attila Antal
Telerik team
 answered on 28 Feb 2019
19 answers
637 views
Hi there,

I have a scenario I'm trying to make more efficient, and although it is all working correctly, I am noticing something I just wanted to check.

On a page I have a large area which is a dynamically loaded user control which acts as a form. dvPageDetail. It adds itself as an ajaxified area programmatically like such:

manager.AjaxSettings.AddAjaxSetting(

this.dvPageDetail, this.dvPageDetail, LoadingPanel);

 


Within this area, there is a RadEditor, a bunch of other controls, and a heirarchical dropdown RadComboBox control (1st dropdown updates the list available in the second). The heirarchical dropdown also uses AddAjaxSettings to get the 1st to ComboBox to update the items in the 2nd.

oAjax.AjaxSettings.AddAjaxSetting(cmbContent, cmbSubContent, LdingPnl1);


When you select an item in the 1st combobox, a loading panel appears just over the 2nd dropdown box and its items are updated correctly. However I also notice that the Editor itself (outside of the heirarchical dropdown, but in dvPageDetail) also re-renders itself after the Ajax postback completes.

So the question is, is this happening unnecessarily and is there a way to contain what occurs in terms of re-rendering when the heirarchical dropdown control fires an Ajax postback. Or is the event bubbling up through and all of dvPageDetail is being re-rendered as well and there is no way to avoid this?

Thanks
Gavin

Within FormControl
Vessy
Telerik team
 answered on 28 Feb 2019
2 answers
121 views

Greetings,

I have two user controls A and B. B is a standalone grid that is displayed in some areas, while A is a grid that expands the rows and the NestViewTemplate is the user control B. 

Now A and B both have an RadAjaxLoadingPanel and RadAjaxManagerProxy  and B shows the loading indicator just fine when used by itself. And user control A shows the loading indicator for its primary RadGrid just fine as you navigate paging or expand, and sort etc. However once you expand a row the nest RadGrid inside user control B no longer shows a loading indicator like it does when it is not nested.

So I have the RadAjaxLoadingPanel and RadAjaxManagerProxy setup correctly for RadGrid in a non-nested situation. This is an example of what the NestedViewTemplate looks like.

1.<NestedViewTemplate>
2.    <div class="childGrid" runat="server">
3.        <uc:MyChildGrid ID="childGrid" runat="server" ShowTitle="False" ShowSummery="False" OnQueryStateChange="ChildGridOnQueryStateChange"/>
4.    </div>
5.</NestedViewTemplate>

Is there anything special that has to be taken into account to have the loading indicators both work on both controls? It doesn't make sense why they work in isolation but not when nested as user controls.  I have unique ID's on the proxies and the Loading Panels in case there could be a collision.  Seems like they should be independent RadAjaxManagerProxy and RadAjaxLoadingPanel  and should just work they way they do in isolation when nested.

I looked at the Demo's and there are none using User Controls for nesting. They are all nested Rad controls and only a single RadAjaxLoadingPanel and RadAjaxManager they don't use the Proxy version. 

Not sure if there is some secret sauce that needs to be added or exposed on the nested custom user control that will allow for it to be hooked and managed. 

Any help that can solve this will be appreciated!

Thanks!

Vessy
Telerik team
 answered on 28 Feb 2019
14 answers
2.0K+ views
Hi,

I am using the latest version of RadGrid for ASP.NET with Ajax with its grouping functionallity.

Everything is working as expected except that I want some of the groups to be collapsed when the page loads.. this might be based on state the user last left the list or maybe some other logic, i cant take care of that bit but i need a way of telling the list that a group that it should start collapsed, i'd rather do this on the server side but can do it on the client side if needed.

Thanks in advance.

Mike
wallafe
Top achievements
Rank 1
 answered on 28 Feb 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?