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

the radrotator control has the funcionality of responsive ,the properties set height &width  equal percentage

greats
Slav
Telerik team
 answered on 30 Jan 2015
4 answers
245 views
I will add code samples if necessary, but I'm hoping someone else recognizes this problem and found a solution.

I am updating the filtering of an Asp.net DataView and then binding the chart to it, but it never refreshes with the new data.

I did get a client side script to do a repaint, and I can see it repaint after the DataBind, but still no new data results showing up.

Thanks in advance for any insight or help.

-Rick
Danail Vasilev
Telerik team
 answered on 30 Jan 2015
1 answer
160 views
Hi, 

we are pro grammatically creating Radgrid and we also have multi headers in some columns.
When filter is applied then all other single header columns shows filter menu but multi header columns does not show filter menu when click on filter button

please let me know what i my doing any wrong or whether we can not applied filter to multi header column


Column definition code is below

RadGrid1.ID = "gvTransaction";
        //RadGrid1.EnableViewState = false;
        RadGrid1.AutoGenerateColumns = false;
        RadGrid1.MasterTableView.DataKeyNames = Datakeys;
        RadGrid1.MasterTableView.HeaderStyle.Wrap = false;
        RadGrid1.MasterTableView.ItemStyle.Wrap = false;
        RadGrid1.MasterTableView.BorderWidth = 0;
        RadGrid1.CssClass = "RadGridCustomClass";
        RadGrid1.ShowFooter = true;
        RadGrid1.AlternatingItemStyle.BackColor = Color.White;
        RadGrid1.MasterTableView.EnableHierarchyExpandAll = false;
        RadGrid1.ClientSettings.Resizing.AllowRowResize = false;
        RadGrid1.EnableHeaderContextMenu = false;
        RadGrid1.EnableHeaderContextFilterMenu = false;
        RadGrid1.MasterTableView.AllowFilteringByColumn = true;

        RadGrid1.MasterTableView.Columns.Clear();
        RadGrid1.MasterTableView.ColumnGroups.Clear();
        RadGrid1.GroupingSettings.CaseSensitive = false;
        RadGrid1.AllowSorting = false;

        //RadGrid1.ClientSettings.Scrolling.EnableVirtualScrollPaging = true;
        RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;
        RadGrid1.ClientSettings.Scrolling.ScrollHeight = 230;
        RadGrid1.ClientSettings.Scrolling.ScrollBarWidth = 100;
        //RadGrid1.ClientSettings.Scrolling.FrozenColumnsCount = 7;
        RadGrid1.Width = 1300;
        RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
        RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(gvTransaction_NeedDataSource);
        RadGrid1.FilterCheckListItemsRequested += new GridFilterCheckListItemsRequestedEventHandler(gvTransaction_FilterCheckListItemsRequested);
        RadGrid1.PreRender += new EventHandler(gvTransaction_PreRender);
        RadGrid1.ItemCommand += new GridCommandEventHandler(gvTransaction_ItemCommand);

        //RadGrid1.EnableHeaderContextMenu = true;
        //RadGrid1.EnableHeaderContextFilterMenu = true;
        // RadGrid1.MasterTableView.ExportToExcel();
        RadGrid1.FilterType = GridFilterType.Combined;
        DataTable dtActivityOptionCodes = new DataTable();
        DataTable dtMVData = new DataTable();
        DataTable dtReadOnlyFields = new DataTable();
        try
        {
            for (int j = 0, indexNo = 0; j < tlmSettings.Count(); j++)
            //  for (int j = 0; j < tlmSettings.Count(); j++)
            {
                SeasonalTNAService.TLMSettings tlmSettingsgroup = new TLMSettings();
                tlmSettingsgroup.SeasonalTLMId = tlmSettings[j].SeasonalTLMId;
                var cboGroupedValues = objSeasonalTNAServiceClient.FetchSeasonalTLMGroupedValues(tlmSettingsgroup);

                if (cboGroupedValues.Count() > 0)
                {
                    MVTlmSettings[j].IsGrouped = 1;
                }
                if (tlmSettings[j].FieldTypeID == 352)
                {
                    TableItemStyle style = new TableItemStyle();


                    SeasonalTNAService.TLMSettings tlmSettingsObjs = new SeasonalTNAService.TLMSettings();
                    tlmSettingsObjs.FieldID = tlmSettings[j].CategoryId;
                    tlmSettingsObjs.CategoryId = 404;
                    tlmSettingsObjs.FieldTypeID = 352;
                    var cboMValues = objSeasonalTNAServiceClient.FetchMasterValues(tlmSettingsObjs);

                    SeasonalTNAService.TLMSettings tlmSettingsObjs1 = new TLMSettings();
                    tlmSettingsObjs1.CategoryValueId = 404;
                    tlmSettingsObjs1.SeasonalTLMId = tlmSettings[j].SeasonalTLMId;
                    tlmSettingsObjs1.MasterId = tlmSettingsObjs1.SeasonalTLMId;
                    var cboSavedMValues = objSeasonalTNAServiceClient.FetchSeasonalTLMMasterCboValues(tlmSettingsObjs1);


                    var result = cboMValues.Where(p => cboSavedMValues.Any(p2 => p.FieldValueID == p2.FieldValueID));

                    if (result.Count() > 0)
                    {
                        int executeOnce = 0;
                        GridColumnGroup columnGroup = new GridColumnGroup();
                        columnGroup.HeaderText = tlmSettings[j].Name;
                        columnGroup.Name = tlmSettings[j].Name;
                        columnGroup.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                        RadGrid1.MasterTableView.ColumnGroups.Add(columnGroup);
                        RadGrid1.MasterTableView.ExpandCollapseColumn.Visible = true;
                        int k = 0;
                        foreach (var item in result)
                        {
                            var column = new GridBoundColumn
                            {
                                HeaderText = item.FieldValue,
                                DataField = tlmSettings[j].Name + "$_" + item.FieldValue,
                                ColumnGroupName = tlmSettings[j].Name,
                                //DataMemberBinding = new Binding("Columns[" + _dynamicColumns + "]"),
                            };
                            //gvTransaction.Columns.Add(column);
                            column.FilterCheckListEnableLoadOnDemand = true;
                            RadGrid1.MasterTableView.Columns.Add(column);

                            TLMSettings tlm = new TLMSettings();
                            tlm.SeasonalTLMId = tlmSettings[j].SeasonalTLMId;
                            tlm.SeasonalTemplateId = tlmSettings[j].SeasonalTemplateId;
                            tlm.SeasonalActivityId = tlmSettings[j].SeasonalActivityId;
                            tlm.TLMValueId = tlmSettings[j].TLMValueId;
                            tlm.TLMId = tlmSettings[j].TLMId;
                            tlm.SubModuleId = tlmSettings[j].SubModuleId;
                            tlm.CategoryId = tlmSettings[j].CategoryId;
                            tlm.HierarchyHeaderId = tlmSettings[j].SubModuleId;
                            tlm.HierarchyId = tlmSettings[j].HierarchyId;
                            tlm.FieldCode = tlmSettings[j].FieldCode;
                            tlm.FieldType = "DEC";//tlmSettings[j].FieldType;               -
                            tlm.Calculation = tlmSettings[j].Calculation;
                            tlm.Name = item.FieldValue;
                            tlm.Formula = tlmSettings[j].Formula;
                            tlm.PreviousActivityID = tlmSettings[j].PreviousActivityID;
                            tlm.PreviousActivityFieldId = tlmSettings[j].PreviousActivityFieldId;
                            tlm.MasterFieldId = tlmSettings[j].CategoryId;
                            tlm.OrderNo = tlmSettings[j].OrderNo;
                            // tlm.TLMValSubId = Convert.ToString(dr["tlm_value_id_sub_module_id"]);
                            tlm.FieldTypeID = tlmSettings[j].FieldTypeID;

                            tlm.TLMValueCode = tlmSettings[j].TLMValueCode;
                            tlm.TotalCalculation = tlmSettings[j].TotalCalculation;
                            tlm.RowCalculation = tlmSettings[j].RowCalculation;
                            tlm.ColumnCalculation = tlmSettings[j].ColumnCalculation;
                            tlm.PlanCompletion = tlmSettings[j].PlanCompletion;
                            tlm.ActualCompletion = tlmSettings[j].ActualCompletion;
                            tlm.IsSubHeader = 1;
                            tlm.MasterFieldName = tlmSettings[j].Name;
                            var items = from elem in MVTlmSettings
                                        where elem.Name == tlmSettings[j].Name
                                        select elem;


                            if (executeOnce == 0)
                            {
                                foreach (var x in items)
                                {

                                    indexNo = MVTlmSettings.IndexOf(x);
                                }

                                if (indexNo + k != 0)
                                {
                                    MVTlmSettings.RemoveAt(indexNo + k);
                                }

                                executeOnce++;
                            }
                            if (MVTlmSettings.Count() < (indexNo + k))
                            {
                                MVTlmSettings.Add(tlm);
                            }
                            else
                            {
                                MVTlmSettings.Insert(indexNo + k, tlm);
                            }


                            dtActivityOptionCodes.Columns.Add(tlmSettings[j].Name + "$_" + item.FieldValue);
                            dtMVData.Columns.Add(tlmSettings[j].Name + k);

                            if (dtMVData.Rows.Count > 0)
                            {
                                dtMVData.Rows[0][tlmSettings[j].Name + k] = item.FieldValue;
                            }
                            else
                            {
                                DataRow dr = dtMVData.NewRow();
                                dr[tlmSettings[j].Name + k] = item.FieldValue;
                                dtMVData.Rows.Add(dr);
                            }
                            k++;
                        }
                    }
                    else
                    {
                        var column = new GridBoundColumn
                        {
                            HeaderText = tlmSettings[j].Name,
                            DataField = tlmSettings[j].Name

                        };
                        //column.FilterTemplate = n
                        column.AutoPostBackOnFilter = true;
                        column.CurrentFilterFunction = GridKnownFunction.Contains;
                        column.FilterCheckListEnableLoadOnDemand = true;
                        RadGrid1.MasterTableView.Columns.Add(column);
                        dtActivityOptionCodes.Columns.Add(tlmSettings[j].Name);
                        dtMVData.Columns.Add(tlmSettings[j].Name);
                    }
                }
                else
                {
                    var column = new GridBoundColumn
                    {
                        HeaderText = tlmSettings[j].Name,
                        DataField = tlmSettings[j].Name

                    };
                    column.AutoPostBackOnFilter = true;
                    column.CurrentFilterFunction = GridKnownFunction.Contains;
                    column.FilterCheckListEnableLoadOnDemand = true;
                    RadGrid1.MasterTableView.Columns.Add(column);
                    dtActivityOptionCodes.Columns.Add(tlmSettings[j].Name);
                    dtMVData.Columns.Add(tlmSettings[j].Name);
                }
                if (MVTlmSettings[j].IsSubHeader == 1)
                {
                    if (MVTlmSettings[j].FieldType == "INT")
                    {
                        dtActivityOptionCodes.Columns[MVTlmSettings[j].MasterFieldName + "$_" + MVTlmSettings[j].Name].DataType = typeof(System.Int32);
                    }
                    else if (MVTlmSettings[j].FieldType == "DEC")
                    {

                        dtActivityOptionCodes.Columns[MVTlmSettings[j].MasterFieldName + "$_" + MVTlmSettings[j].Name].DataType = typeof(System.Double);
                    }
                    else if (MVTlmSettings[j].FieldCode == "G004")
                    {

                        dtActivityOptionCodes.Columns[MVTlmSettings[j].MasterFieldName + "$_" + MVTlmSettings[j].Name].DataType = typeof(System.String);
                    }
                    //else if (MVTlmSettings[j].FieldType == "DATE")
                    //{

                    //    dtActivityOptionCodes.Columns[MVTlmSettings[j].Name].DataType = typeof(System.DateTime);
                    //}
                    else
                    {
                        dtActivityOptionCodes.Columns[MVTlmSettings[j].MasterFieldName + "$_" + MVTlmSettings[j].Name].DataType = typeof(System.String);
                    }
                }
                else
                {
                    if (MVTlmSettings[j].FieldType == "INT")
                    {
                        dtActivityOptionCodes.Columns[MVTlmSettings[j].Name].DataType = typeof(System.Int64);
                    }
                    else if (MVTlmSettings[j].FieldType == "DEC")
                    {

                        dtActivityOptionCodes.Columns[MVTlmSettings[j].Name].DataType = typeof(System.Double);
                    }
                    else if (MVTlmSettings[j].FieldCode == "G004")
                    {

                        dtActivityOptionCodes.Columns[MVTlmSettings[j].Name].DataType = typeof(System.String);
                    }
                    //else if (MVTlmSettings[j].FieldType == "DATE")
                    //{

                    //    dtActivityOptionCodes.Columns[MVTlmSettings[j].Name].DataType = typeof(System.DateTime);
                    //}
                    else
                    {
                        dtActivityOptionCodes.Columns[MVTlmSettings[j].Name].DataType = typeof(System.String);
                    }
                }
                if (!tlmSettings[j].FieldCode.StartsWith("T"))
                {
                    dtReadOnlyFields.Columns.Add(tlmSettings[j].Name);
                }
                if (tlmSettings[j].FieldCode.Equals("G004") && ddlActivityCompletion.SelectedValue == "224")
                {
                    dtReadOnlyFields.Columns.Remove(tlmSettings[j].Name);
                }
                if (tlmSettings[j].FieldCode.Equals("G006"))
                {
                    dtReadOnlyFields.Columns.Remove(tlmSettings[j].Name);
                }
                if (!tlmSettings[j].PreviousActivityID.Equals(-1))
                {
                    if (!dtReadOnlyFields.Columns.Contains(tlmSettings[j].Name))
                    {
                        dtReadOnlyFields.Columns.Add(tlmSettings[j].Name);
                    }
                }
                //if (tlmSettings[j].ActualCompletion.Equals(1))
                //{
                //    if (!dtReadOnlyFields.Columns.Contains(tlmSettings[j].Name))
                //    {
                //        dtReadOnlyFields.Columns.Add(tlmSettings[j].Name);
                //    }
                //}
                if (tlmSettings[j].FieldTypeID == 353 || tlmSettings[j].FieldTypeID == 354)
                {
                    if (!dtReadOnlyFields.Columns.Contains(tlmSettings[j].Name))
                    {
                        dtReadOnlyFields.Columns.Add(tlmSettings[j].Name);
                    }
                }
                if (tlmSettings[j].PlanCompletion.Equals(1))
                {
                    if (!dtReadOnlyFields.Columns.Contains(tlmSettings[j].Name))
                    {
                        dtReadOnlyFields.Columns.Add(tlmSettings[j].Name);
                    }
                }
            }



            //if (status == 1)
            //{
            var column1 = new GridBoundColumn
            {
                HeaderText = "STATUS",
                DataField = "STATUS"
            };
            RadGrid1.MasterTableView.Columns.Add(column1);
            dtActivityOptionCodes.Columns.Add("STATUS");
            dtMVData.Columns.Add("STATUS");

            logger.Error("Grid Structure Created");


            dtActivityOptionCodes.Columns.Add("HierarchyId");
            dtActivityOptionCodes.Columns.Add("TransactionStatusId");
            dtActivityOptionCodes.Columns.Add("Access");
            dtActivityOptionCodes.Columns.Add("TransStatusCategoryValueId");
            dtActivityOptionCodes.Columns.Add("TransStatusCategoryValueCode");

            dtMVData.Columns.Add("HierarchyId");
            dtMVData.Columns.Add("TransactionStatusId");
            dtMVData.Columns.Add("Access");
            dtMVData.Columns.Add("TransStatusCategoryValueId");
            dtMVData.Columns.Add("TransStatusCategoryValueCode");

            //ViewState["Vists"] = (int)ViewState["Vists"] + 1;
            ViewState["MVTlmSettings"] = MVTlmSettings;
            ViewState["tlmSettings"] = tlmSettings;
            ViewState["HierarchyOrder"] = HOrder;

            ViewState["dtColumns"] = dtActivityOptionCodes;
            ViewState["dtMVColumns"] = dtMVData;
            ViewState["ReadOnlyField"] = dtReadOnlyFields;
            this.PlaceHolder1.Controls.Add(RadGrid1);

        }
        catch (Exception ex)
        {
            logger.Error("Error while creating structure" + ex.Message.ToString());
            ShowError("MS00");
            logger.Error(ex.StackTrace.ToString());
        }

Thanks,
Madhavi   
Eyup
Telerik team
 answered on 30 Jan 2015
1 answer
137 views
Hi Team,

I am using Telerik Ajax q1 2013 version.(2013.1.403.40)
For Column Reorder according to this link http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-row-resize-reorder/defaultcs.aspx
In Grid I have given code like this
<telerik:RadGrid ID="rdgd1" runat="server">
         <MasterTableView TableLayout="Fixed" >
            ........
         </MasterTableView>
           <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true">
                   <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="True" ScrollHeight="240px"/>
                  <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True"/>
             </ClientSettings>
</telerik:RadGrid>
Columns Reorder is working fine but Column headers are not Moving/Reordering. Am i missing any thing here, Can you please resolve my issue asap.
Thanks in advance.




Konstantin Dikov
Telerik team
 answered on 30 Jan 2015
2 answers
315 views
Hi,

I am trying to set specific series to certain colours and they are not being set and just revert to the default colours chosen by Telerik.

I am trying to set the specific colours with the following code:

            TimelineChart.PlotArea.Series[0].ColorField = "#8C1717";
            TimelineChart.PlotArea.Series[0].Name = "Very High Risks";
            TimelineChart.PlotArea.Series[1].ColorField = "red";
            TimelineChart.PlotArea.Series[1].Name = "High Risks";... and so forth

This is not working although I believe it should.  If I change the names of the series, I get the desired changes, it is just the colours that are not the desired ones.  

Any thoughts?


Danail Vasilev
Telerik team
 answered on 30 Jan 2015
1 answer
220 views
We have a problem in converting non English characters to pdf using RadEditor. Only English characters are getting converted while "#" is displaying in place of characters  like chinese, japanese etc when converted to pdf.

Tested characters:
Polish - ąćęłńóśźż
Japanese - あ い う え お か き く け こ さ し す せ そ が ぎ ぐ げ ご ぱ ぴ ぷ ぺ ぽ
Chinese - 二: 第二 二十 十二 老二

I also tested this in your latest Editor semo service. (http://demos.telerik.com/aspnet-ajax/editor/examples/import-export/pdf-export/defaultcs.aspx). Still same result is found.

Could you please suggest some workaround possible to resolve this issue.
Ianko
Telerik team
 answered on 30 Jan 2015
1 answer
151 views
hi,
     Can you please tell me that how we can use the RadGrid to create an interface like a spreadsheet?
or any other telerik control for doing the same.
and one more, want to use  tab index in grid by default vertically not a horizantally in spreadsheet grid.

thank you.
Pavlina
Telerik team
 answered on 30 Jan 2015
2 answers
52 views
Hi,

I have been struggling with some of the grouping mechanisms.  The documentation really isn't that great on this and could do with some more examples.

Take the example of multiple levels of grouping on this page: http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/grouping/grouping/defaultvb.aspx?show-source=true

How do you add a custom GroupHeaderTemplate to this page.  If you do it the way that is described in the documentation it crashes.  Why?  Because in the example there are two levels of grouping.  The GroupHeaderTemplate docs only cater for one template while there can be multiple groups.  

Pulling my hair out on this one!

Any pointers

Regards

Jon
Jon
Top achievements
Rank 1
 answered on 30 Jan 2015
1 answer
147 views
I need to have a client side template on my application without using webservice binding.

When I try to use client side template with other types of databing like datatable or arraylist the client side template does not
maintain its layout.

The reason I need this is because I need client side template with load on demand.

For example: 
* The bellow code adds an item but doens't preseve the client template
Dim itemData As New RadListBoxItem()
itemData.Text ="Text"
itemData.Attributes.Add("Attr1", "Attr1")
itemData.Attributes.Add("Attr2", "Attr2")
itemData.Attributes.Add("Attr3", "Attr3")
radListBox.Items.Add(itemData)

* The code below works when its set as webservice biding
Dim result As New List(Of RadListBoxItemData)()
Dim itemData As New RadListBoxItemData()
itemData.Text = "Text"
itemData.Attributes.Add("Attr1", "Attr1")
itemData.Attributes.Add("Attr2", "Attr2")
itemData.Attributes.Add("Attr3", "Attr3")
result.Add(itemData)

Return result.ToArray()
Nencho
Telerik team
 answered on 30 Jan 2015
2 answers
89 views
Apologies if this has been answered before but all I could find was guides on displaying multiple columns from the datasource..

In this instance I have a single column from the datasource that gives a very long list. What I would like is spread this single data column over 2 or 3 columns in the RadcomboBox to try and avoid need for user scrolling.. I figured this would be pretty straight forward but I can't find any info on what I'm trying to achieve..

ie..  rather than                   I need something like            in the drop down..

1                                          1             2            3
2                                          4             5            6
3                                          7             8            9
4
5
6
7​​
Nencho
Telerik team
 answered on 30 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?