Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
108 views
Apologies for my English

I create my treeview from a SQL database. In my database  have with all the other data  two columns
1. Active(bit) true or false
2. Status(nvchar)

when the treeview is build on the load i want the colors to look like this

  • Node titles displayed in “Green” RGB[102, 188, 41] are Active (Active Flag is true) nodes with an approval status of “Approved”
  • Node titles displayed in “Amber” RGB [255, 145, 75] are Active nodes that have an approval status of “Pending”
  • Node titles displayed in “Red” RGB [210, 90, 90] are Active nodes that have an approval status of “Rejected”
  • Node titles displayed in “Grey” RGB[128, 128, 128] are Inactive regardless of the value of the approval status.


Shinu
Top achievements
Rank 2
 answered on 06 Jul 2011
4 answers
339 views
I have the followin radcombobox, where there is a text I wish to display in the dropdown, and a value i will to save in the database:

 

<telerik:RadComboBox EnableTextSelection="false" ID="RadComboBoxForm" Skin="Office2007" CollapseAnimation-Type="InCubic" ExpandAnimation-Type="OutCubic" runat="server" SelectedValue='<%# Eval( "FormTypeId" ) %>' Text='<%# Bind( "FormTypeId" ) %>'>

 

 

<Items>

 

 

<telerik:RadComboBoxItem runat="server" Text="" Value="" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Caplet" Value="1" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Capsule" Value="2" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Controlled Release" Value="3" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Elixir" Value="4" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Ointment" Value="5" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Solution" Value="6" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Supplement" Value="7" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Suspension" Value="8" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Syrup" Value="9" />

 

 

<telerik:RadComboBoxItem runat="server" Text="Tablet" Value="10" />

 

 

</Items>

 

 

</telerik:RadComboBox>

I am databinding, and I have an integer key awaiting the value of the radcombo in the database.  I am finding that it is finding the text value and not the "Value" of the radcombobox which is an integer.  Is there any way to store the integer value in the database instead ?

 

Dimitar Terziev
Telerik team
 answered on 06 Jul 2011
1 answer
84 views
Hello everybody,

We are using several RadGrids with Column Filtering enabled. Some columns use a Template Column with a Template Filter Template while others use standard filter functionality. We use AutoPostBack for each Filter. We need to extract the filter string that is used for filtering in order to process a sophisticated search on the backend.
Is there any possibility to supress the default filter behaviour and execute custom logic?

Thanks in advance.
Marco
Princy
Top achievements
Rank 2
 answered on 06 Jul 2011
1 answer
77 views
I am getting this error (image attached) when I open the ImageManagers upload screen:

Sys.ArgumentOutOfRangeException:
Value must be an integer.
Parameter name: y Actual value was -2.383331298828125.

I'm using the latest Version (as of time of reply): 2011.1 519 (May 19, 2011).

The error happens when the uploader dialog section is open and when I mouse over the upload textbox and back into the white space underneath it.

Here is my code for the front end:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomCertificateEdit.aspx.cs"
    Inherits="Web.Admin.CustomCertificateEdit" MasterPageFile="~/Core/DefaultMasterPage.master" %>
  
<%@ MasterType VirtualPath="~/Core/DefaultMasterPage.master" %>
<%@ Import Namespace="Telerik.Web.UI" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="headPlaceHolder">
    <style type="text/css">
        .radeditorContainer
        {
            margin-left: auto;
            margin-right: auto;
            width: 610px;
        }
        .customCertContentContainer
        {
            margin-left: auto;
            margin-right: auto;
            width: 850px;
        }
        .radEditorErrorColumn
        {
            vertical-align: bottom;
        }
        .reTool .ImportField
        {
            background-image: url(<%= ResolveUrl("~/images/icon_popup_search.gif") %>);
        }
    </style>
    <script type="text/javascript" language="javascript">
  
  
        function radEditor_ClientCommand(editor, args) {
            if (args.get_commandName() == "ImageManager") {
                var callback = function (sender, args) {
                    var result = args.get_value();
                    $get("hdnImagesUploaded").value += (result.src + ",");
                    editor.pasteHtml(result, "ImageManager");
                };
                args.set_callbackFunction(callback);
            }
        }     
  
    </script>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <asp:HiddenField ID="hdnImagesUploaded" runat="server" />
    <cs:CsPanel runat="server" ID="pnlCertificates" Title="Custom Certificate Advanced Editor"
        DoLocalize="true">
        <br />
        <br />
        <div class="customCertContentContainer">
            <div class="radeditorContainer">
                <span class="FieldName">
                    <%= "Certificate Title:".Localize() %></span>
                <asp:TextBox ID="txtTitle" runat="server" MaxLength="300" CssClass="FieldValue" Style="width: 300px;" />
                <asp:RequiredFieldValidator ID="reqvTitle" ControlToValidate="txtTitle" runat="server"
                    Text="*" /><br />
                <br />
                <div style="float: left;">
                    <cs:CsodRadEditor ID="radeditorCntrl" runat="server" EditorStyle="Advanced" Width="595"
                        EnableHtmlEdit="true" EnableResize="false" AllowScripts="false" Skin="Windows7" ExternalDialogsPath="~/Core/Telerik" />
                </div>
                <div class="radEditorErrorColumn">
                    <asp:RequiredFieldValidator ID="reqvRadEditor" ControlToValidate="radeditorCntrl"
                        runat="server" Text="*" />
                </div>
                <div style="clear: both;">
                </div>
                <br />
                <br />
                <cs:CsImageButton ID="btnSave" runat="server" TemplateName="done" OnClick="btnSave_Click" />
                   
                <cs:CsImageButton ID="btnCancel" runat="server" TemplateName="cancel" OnClick="btnCancel_Click" />
            </div>
        </div>
    </cs:CsPanel>
    <script language="javascript">
  
        Telerik.Web.UI.Editor.CommandList["ImportField"] = function (commandName, editor, args) {
            //window.popupCaller = 'textbox';
              alert('import field');
        };
  
    </script>
</asp:Content>

Here is the pertinent (only part I reference the radeditor) code in my code behind:

protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                this.Title = "Advanced Certificate Page Editor".Localize();
                this.breadCrumbs.Reload("");
                if (!isNew)
                {
                    CertificateEntityModel model = this.PullCertificateFromId(certificateId.Value); 
                    if (model != null)
                    {
                        txtTitle.Text = model.Title;
                        radeditorCntrl.Content = model.Html;
                    }
                }
  
                //add the custom import field button
                EditorTool importFieldTool = new EditorTool("Import Field", string.Empty);
                importFieldTool.Name = "ImportField";
                importFieldTool.Text = "Import Field".Localize();
                radeditorCntrl.Tools[1].Tools.Add(importFieldTool);
  
                //setup the image manager's filepaths and maxfile size
                string[] webPath = new string[] { Functions.GetPublicClientCustomCertificatesUploadPath(CorpName) };
                radeditorCntrl.ImageManager.ViewPaths = webPath;
                radeditorCntrl.ImageManager.UploadPaths = webPath;
                radeditorCntrl.ImageManager.DeletePaths = webPath;
                radeditorCntrl.ImageManager.MaxUploadFileSize = ONE_MEG;
                radeditorCntrl.OnClientCommandExecuted = "radEditor_ClientCommand";
            }
        }

One more thing to note; I had an issue with the image uploader throwing a server error of "expression expected". That was fixed when I added "EnableLinqExpressions = false" in a custom dialog control. In fact, it is the same code/methodology as the link http://www.telerik.com/support/kb/aspnet-ajax/editor/displaying-single-upload-control-in-the-filebrowser-upload-manager.aspx with only that one property changed.

I see people are having the same problem in this thread http://www.telerik.com/community/forums/reply-thread.aspx?messageId=0&threadId=263910 however it is a somewhat old thread in which case the version of Telerik being used is older than mine and I was therefore prompted to start a new thread about the issue.

Any idea on how we can solve this?
Dobromir
Telerik team
 answered on 06 Jul 2011
1 answer
51 views
Hi Friends,
   I want to display radtreeview selected node text as group heading in radgrid.
   Please help me to resolve this issue.



Thanks,
Srinivas.
Princy
Top achievements
Rank 2
 answered on 06 Jul 2011
9 answers
122 views

Is there a simple workaround for asp:ValidationSummary not working in medium trust when inside a RadAjaxPanel?

When in full trust, no issues, when in medium no validationsummary.

Thanks in advance

 

Sebastian
Telerik team
 answered on 06 Jul 2011
2 answers
328 views
Hi,

I am using AJAX "Grid / Update/Insert/Delete in Hierarchy", in which i am displaying two grid in hierarchy. In the two level of grid i don't want to add/edit/delete the row on first level(MasterTableView). But i need to apply Add/Edit/Delete operation for second level of table view. How can i disable the "Add new record" option in master grid view.

Thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Jul 2011
1 answer
85 views
Hello,

I am using a RadGrid with a Checkbox as the last column. Can you please provide me the code  to detect the checkbox event. My purpose is to collect the id of the record for which the check box is enabled.

Please help

Thanks in Advance
Shinu
Top achievements
Rank 2
 answered on 06 Jul 2011
6 answers
142 views
Hi,

I'm using the example from http://demos.telerik.com/aspnet-ajax/dock/examples/dynamicdocks/defaultcs.aspx to dynamically add Docks to a DockZone. In this example every new Dock is added to the top position of all Docks within the Zone.

Is it possible to add the new Docks to the bottom position of all Docks within the Zone?

Thanks,
Danny
Pete
Top achievements
Rank 1
 answered on 06 Jul 2011
1 answer
46 views
My application has a radgrid having three child GridTableView in hierarchical structure, i have added a custom pager to the grid with linkbuttons "show more per page" and "show all results" link button, when i click on "show more per page" link button of one of the grandchild grid and come at the end item of grandchild grid the pager disappears from grandchildgrid, this also happens when i click on "show all result" link button, the pager of grandchild grid disappears. It would be great if you people can help me out with this issue, Thanks in advance.




Princy
Top achievements
Rank 2
 answered on 06 Jul 2011
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?