Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
292 views
I have a grid bound to a sql data source. there are gridbound columns and gridtemplatecolumns. an example of each column is shown below. in this example, the drag and drop grouping will work for the AddressLine2 gridboundcolumn but not for the City gridtemplatecolumn.  As you can see, Groupable is set true and the template column has a GroupByExpression of City but when I drop it, no grouping occurs. what else do I need to do to make this work?

                        <telerik:GridBoundColumn DataField="AddressLine2" HeaderText="AddressLine2" SortExpression="AddressLine2" 
                            UniqueName="AddressLine2" AutoPostBackOnFilter="True"
                        </telerik:GridBoundColumn> 
                        <telerik:GridTemplateColumn HeaderText="City" DataField="City" SortExpression="City" 
                            Groupable="true" GroupByExpression="City" UniqueName="CityColumn" AutoPostBackOnFilter="True"
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="CityEditControl" runat="server" Skin="Web20" DataSourceID="lkpCities" 
                                    DataTextField="City" DataValueField="UID" SelectedValue='<%# Bind("lkpCitiesID")%>' 
                                    MarkFirstMatch="true" AppendDataBoundItems="true"
                                    <Items> 
                                        <telerik:RadComboBoxItem Text="Select" Value="0" /> 
                                    </Items> 
                                </telerik:RadComboBox> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <%#Eval("City")%> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 

Shantanu
Top achievements
Rank 2
 answered on 04 Jun 2013
3 answers
211 views
Similar to what is offered with the RadGrid, I want to be able to visualy group columns headers with the TreeList.
Unfortunately, it seems that this feature is not proposed out-of-box and I don't manage to find a way to enligh my quest.

I tried to customize the treelist. I inherit from it. I override the method RenderBeginTag of the class TreeListHeaderItem to add my own html table row above the generated header row.
But after this, RadTreeList.get_columns() doesn't work anymore, indeed it bases its logic on this newly added row.

Is there another way to customize the Treelist headers and allow column spanning?

Rgds,
Robert
Marin
Telerik team
 answered on 04 Jun 2013
3 answers
114 views
My VS2012 Install is completely hosed and everything points back to Telerik. Here is one of the event log entries for this error:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception
Stack:
   at System.Windows.Application.LoadComponent(System.Object, System.Uri)
   at Telerik.VSX.Shell.Xaml.CommonXaml.InitializeComponent()
   at Telerik.VSX.Shell.VSWindow..ctor()
   at Telerik.VSX.Forms.BaseNotificationForm..ctor(System.IServiceProvider)
   at Telerik.VSX.Helpers.NotificationManager..ctor(System.IServiceProvider)
   at Telerik.KendoUI.Mvc.VSPackage.VsPackage.GetUpgradeAvailabilityMonitor()
   at Telerik.VSX.VSPackage.PackageBase+<>c__DisplayClass5.<OnSolutionOpened>b__2()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)


What could be causing this and how do I fix it?
Chavdar Dimitrov
Telerik team
 answered on 04 Jun 2013
1 answer
76 views
HI,

i am pasting bellow content in RadEditor's  through OnClientPasteHtml function,
hello<br><br><a href="http://www.gmail.com">gmail</a><br><br><a href="http://www.facebook.com">facebook</a><br><br><br>If you no longer wish to receive these emails, simply click on the following link:<a href="[!RPLINK:GLOBALUNSUBSCRIBE!]">Unsubscribe</a>

after pasting the data displaying as
hello&lt;br&gt;&lt;br&gt;&lt;a href="<a href='http://www.gmail.com">gmail</a><br><br><a'>http://www.gmail.com"&gt;gmail&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a</a> href="<a href='http://www.facebook.com">facebook</a><br><br><br>If'>http://www.facebook.com"&gt;facebook&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;If</a> you no longer wish to receive these emails, simply click on the following link:&lt;a href="[!RPLINK:GLOBALUNSUBSCRIBE!]"&gt;Unsubscribe&lt;/a&gt;

checkout anchor tag structure is not in proper in content after pasting.

Editor properties, 
<telerik:RadEditor ID="textRadEditor" EditModes="Design" runat="server" Width="100%"
    EnableResize="false" OnClientLoad="GetContentLength" OnClientPasteHtml="OnClientPasteHtmlToText" 
    Height="550px">
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="convertToTEXT" Text="Convert HTML to TEXT" ShowText="true"
                ShowIcon="false" />
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="InsertEditorLinks" ShowIcon="false" ShowText="true" Text="Insert Link" />
        </telerik:EditorToolGroup>
    </Tools>
    <CssFiles>
        <telerik:EditorCssFile Value="~/Editor/RadEditorTools/EditorContentArea.css" />
    </CssFiles>
</telerik:RadEditor>

Script,
function OnClientPasteHtmlToText(sender, args) {
            //debugger;           
            var val = args.get_value();
            var name = args.get_name();
            if (name == "Paste") {
                //debugger;
                var editor = $find("<%=textRadEditor.ClientID%>")
                if (document.getElementById("hdTextPaste").value != "true") {
                    var oSelElem1 =val ;
                    var pattern = /<a[^>]*>(.*?)<\/a>/gi
                    var code = oSelElem1.match(pattern);
                    if (code != null) {
                        for (i = 0; i < code.length; i++) {
                            var url = code[i].match(/href=\"(.*?)\"/)[1];
                            var text = code[i].match(/<a[^>]*>(.*?)<\/a>/)[1];
                            if (text.toLowerCase().search("<img") >= 0)
                                oSelElem1 = oSelElem1.replace(code[i], url);
                            else
                                oSelElem1 = oSelElem1.replace(code[i], text + ':' + url);
                        }
                        editor.pasteHtml(oSelElem1);
                        var plainText = editor.get_text();
                        editor.set_html("");
                        plainText = plainText.replace(/((\r\n|\r|\n)\s*)\2/g, "$2");
                        plainText = plainText.replace(/\t/g, '    ').replace(/  /g, '&nbsp; ').replace(/\r\n|\n|\r/g, '<br />');
                        editor.set_html(plainText);
                        document.getElementById('<%= hdCampEditorTab2.ClientID %>').value = "1";                        
                    }


                }

            }
        }

any idea?

Regards,
Anwar
Danail Vasilev
Telerik team
 answered on 04 Jun 2013
1 answer
69 views
Hi,

I have a client requirement that a radio button called "Minutes"(similar to Hourly) needs to be added in the Recurrence control of the Rad scheduler.

I tried searching, but couldn't find anything on the Recurrence rule for minutes.

Could somebody help me??  
Plamen
Telerik team
 answered on 04 Jun 2013
3 answers
96 views
Hello,

Is there a way to know for which column a data cell is related to. Because I have to save a row, then put the next row in edit mode and give the focus to the cell which is in the same column than it was in the last selection. From now I almost made it but I can't find anyway to find the column index of the current selected cell.

Thanks 
Pierre
 
Princy
Top achievements
Rank 2
 answered on 04 Jun 2013
1 answer
107 views
Hi guys,

I have 5 Comboboxes, 1 main comboBox (Account) 3 additional ComboBoxes and 1 comboBox with a treeview that gets populated depending on the selected Value from the Main ComboBox. .

What is supposed to be happening is when i change select a new value from the Main comboBox all the other ones should be re populated with new data or cleared.

here is an example of how i am clearing the comboBoxes that depend on the Main one.

protected void cboAccount_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            RadComboBox cboSite = (RadComboBox)fvIncidentEdit.FindControl("cboSite");
            RadTreeView trvSite = ((RadTreeView)cboSite.Controls[2].FindControl("trvSite"));
            trvSite.DataSource = Models.Site.LoadActiveSites(Convert.ToInt32(e.Value));
            trvSite.DataBind();
            trvSite.UnselectAllNodes();
 
            cboSite.Text = string.Empty;
            cboSite.SelectedIndex = -1;
 
            PopulateSiteDependants();
        }
 
protected void PopulateSiteDependants()
        {
            RadTreeView trvSite = new RadTreeView();
            RadComboBox cboSite = (RadComboBox)fvIncidentEdit.FindControl("cboSite");
            if (cboSite.Controls[2].FindControl("trvSite") != null)
            {
                trvSite = ((RadTreeView)cboSite.Controls[2].FindControl("trvSite"));
             
                RadTreeView trvLocation = new RadTreeView();
                RadComboBox cboLocation = (RadComboBox)fvIncidentEdit.FindControl("cboLocation");
                if (cboLocation.Controls[2].FindControl("trvLocation") != null)
                {
                    if (trvSite.SelectedNode != null)
                    {
                        trvLocation = ((RadTreeView)cboLocation.Controls[2].FindControl("trvLocation"));
                        trvLocation.DataSource = Models.Location.LoadActiveLocations(Convert.ToInt32(trvSite.SelectedNode.Value));
                        trvLocation.DataBind();
                        trvLocation.UnselectAllNodes();
                    }
                    else
                    {
                        trvLocation.DataSource = null;
                    }
 
                    cboLocation.Text = string.Empty;
                    cboLocation.SelectedIndex = -1;
                }
 
                RadTreeView trvDepartment = new RadTreeView();
                RadComboBox cboDepartment = (RadComboBox)fvIncidentEdit.FindControl("cboDepartment");
                if (cboDepartment.Controls[2].FindControl("trvDepartment") != null)
                {
                    if (trvSite.SelectedNode != null)
                    {
                        trvDepartment = ((RadTreeView)cboDepartment.Controls[2].FindControl("trvDepartment"));
                        trvDepartment.DataSource = Models.Department.LoadActiveDepartments(Convert.ToInt32(trvSite.SelectedNode.Value));
                        trvDepartment.DataBind();
                        trvDepartment.UnselectAllNodes();
                    }
                    else
                    {
                        trvDepartment.DataSource = null;
                    }
 
                    cboDepartment.Text = string.Empty;
                    cboDepartment.SelectedIndex = -1;
                }
            }
            LoadCategories();
            
        }
 
        protected void LoadCategories()
        {
            RadTreeView trvDepartment = new RadTreeView();
            RadComboBox cboDepartment = (RadComboBox)fvIncidentEdit.FindControl("cboDepartment");
            if (cboDepartment.Controls[2].FindControl("trvDepartment") != null)
            {
                trvDepartment = ((RadTreeView)cboDepartment.Controls[2].FindControl("trvDepartment"));
 
                RadComboBox cboCategory = (RadComboBox)fvIncidentEdit.FindControl("cboCategory");
                RadTreeView trvCategory = (RadTreeView)cboCategory.Controls[2].FindControl("trvCategory");
                if (trvDepartment.SelectedNode != null)
                {
                    trvCategory.DataSource = Models.QuestionCategoryNode.LoadActiveQuestionCategoryNodes(Convert.ToInt32(trvDepartment.SelectedNode.Value));
                }
                else
                {
                    trvCategory.DataSource =Models.QuestionCategoryNode.LoadActiveQuestionCategoryNodes();
                }
                trvCategory.DataBind();
                trvCategory.UnselectAllNodes();
 
                cboCategory.Text = string.Empty;
                cboCategory.SelectedIndex = -1;
            }
        }


The only ComboBox that is giving me issues is the Category ComboBox, Please could someone explain the best way to clear / re populate a comboBox if the Main ComboBoxes value is changed.

Let me explain this properly.

The selection From ComboBox 1 Will populate comboBox 2.
When a selection from comboBox 2 is made, that will clear ComboBox 3 and 4 and will then populate ComboBox 3 and 4 with new data.
When a selection from comboBox 3 is made, that will clear ComboBox 5 and will then populate ComboBox 5 with new data.

The Above works but changing the Selected Value in the first comboBox  (account) will only Reset the 2nd ComboBox and not the rest.

So By selecting a new value From the 1st ComboBox that should reset comboBoxes 2-5 to an empty value.
Nencho
Telerik team
 answered on 04 Jun 2013
3 answers
125 views
Hello,
I am new to RadGrid, i want to achive bellow mentioned functinality in RAD grid.
1. Bind a datatable to RadGrid and populate it on button click,
2.  Afer grid is get populated if user dubble click on specific row then that row should be editable and as soon as user clicks on any other row or any other control on the screen then the data modified in current selected row should get updated (it should update the dattable which is assosiated to Rad Grid).

this functinality is currently done using some different third party Grid i want to replace that grid with Rad Grid, please let me know whether is it possible in Rad Grid and how to do it.

Princy
Top achievements
Rank 2
 answered on 04 Jun 2013
3 answers
82 views
I was enabling a drag and drop in treeview but I want restrict nodes from having more than 2 children.
Rakesh
Top achievements
Rank 1
 answered on 04 Jun 2013
1 answer
141 views
Is there a way that I can change the message 'No child records to display" application wide, perhaps in the web.config?
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Jun 2013
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?