Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
82 views

We are trying to integration spell check tool with MS CRM 2011 in Email activity. This is working fine with Web Client. But when we test the same in CCD, we are unable to select the suggested options from list of given options. But if suggested options framed have scroll bar, then we are able to pick a value. And this issue appears from second time when we load spell check for a control. Appreciate any suggestions.

 

Thanks,

Raghu

Raghu
Top achievements
Rank 1
 asked on 20 Apr 2016
5 answers
282 views

hi 

How do i remove those white border line in the header? Thanks a lot

Here are my code.

  <style>
div.RadPanelBar_Default div.rpHeaderTemplate,
div.RadPanelBar_Default a.rpLink,
div.RadPanelBar_Default a.rpSelected
{
    background-image: none;
    background-color: #2C3E50;
    color:#fff;
    border-color:#2C3E50;
    border: none 0px !important; 
    font-size:medium;

}

 div.RadPanelBar_Default .rpExpanded {
    background-color: #2C3E50 !important;
    color:#fff;
    border-color:#2C3E50;
    border: none 0px !important; 
}  

 .RadPanelBar .rpRootGroup, .rpItem .rpLink   
{    
     border: none 0px !important;    
     color: #FFF;  
     text-decoration: none;  
     border-bottom-width: 0px !important; 
     padding: 0px 0px 0px 0px !important; 
}  

.RadPanelBar rpRootGroup  .rpGroup .rpItem .rpLink
   {
      color: Green;
   }
.RadPanelBar .rpOut  
{  
    border-bottom-width: 0px !important;  
}  
.RadPanelBar_Default ul li a:link, 
.RadPanelBar_Default ul li a:visited, 
.RadPanelBar_Default ul li a:hover, 
.RadPanelBar_Default ul li a:active 
{
    color: #fff;
    display: block;
    /* width: auto !important;
    float: left; */
    border-top: 0px solid #2C3E50;
    border-bottom: 0px solid #2C3E50;
    border: none 0px !important; 
 

}
.rpExpanded {
    background-color:#2C3E50  !important;
    color:#fff;
    border: none 0px !important; 
}
 
.rpSelected {
    background-color:#2C3E50  !important;
    color:#fff;
    border: none 0px !important; 
}

 
</style>
    <telerik:RadPanelBar ID="RadPanelBar1"  runat="server">
          
    </telerik:RadPanelBar>

Ivan Danchev
Telerik team
 answered on 20 Apr 2016
0 answers
132 views

Hi, everyone,when am using asynchronous telerik upload,but when i clicks on remove it disappering upload control also,please help me..am working on this since last 2 days...

this is my telrik 

@(Html.Telerik().Upload()
        .Name("attachments_" + ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
        .Multiple(true)
        .Async(async => async
            .Save("Save", "GalleryUser", new { name = @Model, area = "" })
                .Remove("Remove", "GalleryUser", new { name = @Model, area = "" })
            .AutoUpload(true)
        )
        .ClientEvents(events => events.OnSuccess("OnSuccess_" + ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)).OnLoad("OnLoad_" + ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)))
        .HtmlAttributes(new { @class = "gallery-upload-box" })
)

 

this is my scripts related to events

<script type="text/javascript">

    var i11 = @(i1);

    function OnSuccess_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))(e) {
        debugger;

        if (e.operation == "upload") {
            var imgUrl = "/Image?img=/" + encodeURIComponent("Content/UserFiles/Users/@Model/" + getFileInfo(e));
            var divCont = '<div class="gallery_div '+getFileInfo(e)+' gallery_div_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)) gallery_img_'
                          +i11+'_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))"><img src="'+imgUrl+
                          '&w=120&h=120&t=0&c=0" alt="" /><input type="text" class="gallery_textbox"'+
                          ' id="desc_gallery_img_@(i1)_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))" />'+
                          '<input type="checkbox" class="gallery_img_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))" id="gallery_img_'+
                          i11+'_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))" /><span for="gallery_img_'+i11+
                          '_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))">מחק</span></div>';
            //var divCont = '<div class="'+getFileInfo(e)+' gallery_div_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)) gallery_img_'+i11+'_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))"><img src="'+imgUrl+'&w=120&h=120&t=0&c=0" alt="" /></div>';
            $(".gallery_editor_wrap_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))").append(divCont);
            i11 = i11 + 1;
        }
        else if (e.operation == "remove") {
            $('div[class*="'+getFileInfo(e)+'"]').remove();
           
        }
       
      
           
        }


    var PARAM_NAME = "attachments";
    function OnLoad_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))(e) {
        var uploadElement = $("input", this).attr("name", PARAM_NAME);
        setTimeout(function () {
            uploadElement.data("tUpload").name = PARAM_NAME;
        }, 0);
    }

    function getFileInfo(e) {
        return $.map(e.files, function (file) {
            var info = file.name;
            return info;
        }).join(", ");
    }
</script>
@{ Html.Telerik().ScriptRegistrar().OnDocumentReady(@<text>
        $(".gallery_img_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))").live("click", function(){
        var itemid = $(this).attr("id");
        var imgPaht = $("." + itemid + " img").attr("src");
        $.post("/GalleryUser/RemoveFile", { name: "@Model", fullName: imgPaht } )
        .success(function() {
        $("." + itemid).remove();
        });
        return false;
        });
</text>); }

<script type="text/javascript">

    var i11 = @(i1);

    function OnSuccess_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))(e) {
        debugger;

        if (e.operation == "upload") {
            var imgUrl = "/Image?img=/" + encodeURIComponent("Content/UserFiles/Users/@Model/" + getFileInfo(e));
            var divCont = '<div class="gallery_div '+getFileInfo(e)+' gallery_div_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)) gallery_img_'
                          +i11+'_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))"><img src="'+imgUrl+
                          '&w=120&h=120&t=0&c=0" alt="" /><input type="text" class="gallery_textbox"'+
                          ' id="desc_gallery_img_@(i1)_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))" />'+
                          '<input type="checkbox" class="gallery_img_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))" id="gallery_img_'+
                          i11+'_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))" /><span for="gallery_img_'+i11+
                          '_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))">מחק</span></div>';
            //var divCont = '<div class="'+getFileInfo(e)+' gallery_div_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)) gallery_img_'+i11+'_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))"><img src="'+imgUrl+'&w=120&h=120&t=0&c=0" alt="" /></div>';
            $(".gallery_editor_wrap_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))").append(divCont);
            i11 = i11 + 1;
        }
        else if (e.operation == "remove") {
            $('div[class*="'+getFileInfo(e)+'"]').remove();
           
        }
       
      
           
        }


    var PARAM_NAME = "attachments";
    function OnLoad_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))(e) {
        var uploadElement = $("input", this).attr("name", PARAM_NAME);
        setTimeout(function () {
            uploadElement.data("tUpload").name = PARAM_NAME;
        }, 0);
    }

    function getFileInfo(e) {
        return $.map(e.files, function (file) {
            var info = file.name;
            return info;
        }).join(", ");
    }
</script>
@{ Html.Telerik().ScriptRegistrar().OnDocumentReady(@<text>
        $(".gallery_img_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))").live("click", function(){
        var itemid = $(this).attr("id");
        var imgPaht = $("." + itemid + " img").attr("src");
        $.post("/GalleryUser/RemoveFile", { name: "@Model", fullName: imgPaht } )
        .success(function() {
        $("." + itemid).remove();
        });
        return false;
        });
</text>); }
<script type="text/javascript">

    var i11 = @(i1);

    function OnSuccess_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))(e) {
        debugger;

        if (e.operation == "upload") {
            var imgUrl = "/Image?img=/" + encodeURIComponent("Content/UserFiles/Users/@Model/" + getFileInfo(e));
            var divCont = '<div class="gallery_div '+getFileInfo(e)+' gallery_div_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)) gallery_img_'
                          +i11+'_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))"><img src="'+imgUrl+
                          '&w=120&h=120&t=0&c=0" alt="" /><input type="text" class="gallery_textbox"'+
                          ' id="desc_gallery_img_@(i1)_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))" />'+
                          '<input type="checkbox" class="gallery_img_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))" id="gallery_img_'+
                          i11+'_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))" /><span for="gallery_img_'+i11+
                          '_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))">מחק</span></div>';
            //var divCont = '<div class="'+getFileInfo(e)+' gallery_div_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)) gallery_img_'+i11+'_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))"><img src="'+imgUrl+'&w=120&h=120&t=0&c=0" alt="" /></div>';
            $(".gallery_editor_wrap_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))").append(divCont);
            i11 = i11 + 1;
        }
        else if (e.operation == "remove") {
            $('div[class*="'+getFileInfo(e)+'"]').remove();
           
        }
       
      
           
        }


    var PARAM_NAME = "attachments";
    function OnLoad_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))(e) {
        var uploadElement = $("input", this).attr("name", PARAM_NAME);
        setTimeout(function () {
            uploadElement.data("tUpload").name = PARAM_NAME;
        }, 0);
    }

    function getFileInfo(e) {
        return $.map(e.files, function (file) {
            var info = file.name;
            return info;
        }).join(", ");
    }
</script>
@{ Html.Telerik().ScriptRegistrar().OnDocumentReady(@<text>
        $(".gallery_img_@(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))").live("click", function(){
        var itemid = $(this).attr("id");
        var imgPaht = $("." + itemid + " img").attr("src");
        $.post("/GalleryUser/RemoveFile", { name: "@Model", fullName: imgPaht } )
        .success(function() {
        $("." + itemid).remove();
        });
        return false;
        });
</text>); }

 

these are my action methods..

 

 public ActionResult Save(IEnumerable<HttpPostedFileBase> attachments, string name)
        {
            List<int> GalleryIds = new List<int>();
            SURoleProvider pro = new SURoleProvider();
            string roles= pro.GetRolesForUser(User.Identity.Name).FirstOrDefault();
            if (!SecurityCheck(name) && roles!="Provider") throw new HttpException(401, "error");
            string UserFolder = "~/Content/UserFiles/Users/" + name + "/";
            string UserFolderPath = Server.MapPath(UserFolder);
            CreateUserFolder(UserFolderPath);
            foreach (var file in attachments)
            {
                Random n = new Random();
                var fileName = n.Next(500,10000) + Path.GetFileName(file.FileName);
                GalleryIds.Add(SaveGalleryImageTrack(UserFolder + fileName, name));
                var physicalPath = Path.Combine(UserFolderPath, fileName);
                string[] lastPart = name.Split('/');
                if (lastPart[1].ToString().Contains("CsvFile_"))
                {
                    string[] words = fileName.Split('.');
                    string ext = words[1].ToString();
                    if(ext == "csv" || ext == "vcf")
                    {
                        file.SaveAs(physicalPath);
                    }
                }
                else
                {
                    file.SaveAs(physicalPath);
                }
               
            }
            return Content("");
        }

        public ActionResult Remove(string[] fileNames, string name)
        {
           // if (!SecurityCheck(name)) throw new HttpException(401, "error");
            string UserFolder = "~/Content/UserFiles/Users/" + name + "/"; 
            string UserFolderPath = Server.MapPath(UserFolder);
            CreateUserFolder(UserFolderPath);
            foreach (var fullName in fileNames)
            {
                var fileName = Path.GetFileName(fullName);
                var physicalPath = Path.Combine(UserFolderPath, fileName);
                if (System.IO.File.Exists(physicalPath))
                {
                    System.IO.File.Delete(physicalPath);
                    RemoveFileRecordFromDB(UserFolder + fileName);
                    
                }
            }
            return Content("");
        }

anitha
Top achievements
Rank 1
 asked on 20 Apr 2016
3 answers
305 views
Some of our projects are very long, and our users would like to export just what is viewable on page web page to PDF. So, it would essentially be a narrow sliver of the entire Gantt chart, but every task (row) would be show. For example, show only a Gantt chart for the next 2 months of tasks, instead of the entire project. We thought about just pulling in a subset of tasks, but then we need to handle things like tasks that included in the next 2 months, then changing their start and end dates accordingly. However, we were hoping there was an easier way to set the start and end date of the entire Gantt chart so we can export just the time frame we are focusing on.
Ivan Danchev
Telerik team
 answered on 20 Apr 2016
2 answers
137 views

Hi

In a std combo box with check boxes as you select a few items the text value appears in the combobox text area, until its full then is says n selected.

I have a treeview in a combo box, with check boxes, how would I replicated this behaviour?

Andy

Andy Green
Top achievements
Rank 2
 answered on 20 Apr 2016
1 answer
181 views

Hey,

is it possible to get the selected keyvalue of a DataForm control as a <asp:ControlParameter...> of a SqlDataSource?

I know there a various other ways to accomplish this task, I was just wondering where i could find a property-overview or something like that :-)

 

Best regards,

Chris

Eyup
Telerik team
 answered on 20 Apr 2016
4 answers
296 views

Hi,

I have a RadTreelist with treelist select column.I have 6 rows in a RadTreelist.My requirement is to hide checkboxes in 2 rows based on a condition.How can hide checkbox in a row? and in which event is used for this purpose?I have given My code below.

 

<telerik:RadTreeList ID="RadTreeList1" runat="server" OnNeedDataSource="RadTreeList1_NeedDataSource"

 

AutoGenerateColumns="false" AllowMultiItemSelection="true"

 

AllowPaging="false" AllowSorting="true" DataKeyNames="ID"

 

ParentDataKeyNames="PID" AlternatingItemStyle-BackColor ="#EFF5FB" ItemStyle-BackColor="#E0ECF8" ShowTreeLines="true" OnItemDataBound="RadTreeList1_ItemDataBound" Width="100%">

 

<SelectedItemStyle CssClass="SelectedRow" />

 

<Columns>

 

 

<telerik:TreeListBoundColumn DataField="ID" UniqueName="ID" HeaderText="Bound Column" />

 

<telerik:TreeListSelectColumn HeaderStyle-Width="40px" >

 

</telerik:TreeListSelectColumn>
</telerik:RadTreeList >

Thanks,
Sindu.

S
Top achievements
Rank 1
 answered on 19 Apr 2016
1 answer
145 views

 

I can not get this simple required field validator column to trigger. I've followed the examples and tried various different syntax options. Can anyone shed lany light on why this isn't firing?

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="true" AllowPaging="true"
                        ItemType="MYCOMPANY.BusinessData.BusinessObjects.Participant"  
                        AutoGenerateColumns="False" AutoGenerateDeleteColumn="true"
                        AutoGenerateEditColumn="True" 
                        GroupPanelPosition="Top" Skin="Metro">
                        <%--<ValidationSettings EnableValidation="true" CommandsToValidate="PerformInsert" />--%>
                        <MasterTableView CommandItemDisplay="Top" AllowAutomaticInserts="true" InsertItemDisplay="Top" DataKeyNames="ParticipantID" 
                            InsertMethod="insertParticipant" DeleteMethod="deleteParticipant" UpdateMethod="updateParticipant" SelectMethod="getParticipants" 
                            PageSize="12">
                                <Columns>
                                <telerik:GridBoundColumn DataField="Username" HeaderText="Username" UniqueName="Username" ColumnEditorID="Username">
                                    <ColumnValidationSettings EnableRequiredFieldValidation="true" EnableModelErrorMessageValidation="true">
                                        <RequiredFieldValidator SetFocusOnError="true" ErrorMessage="* - Required Field" ForeColor="Red" Font-Bold="true" />
                                        <ModelErrorMessage ModelStateKey="Username" AssociatedControlID="Username" SetFocusOnError="true" ForeColor="Red"                                                   Font-Bold="true" />

                                    </ColumnValidationSettings>
                                </telerik:GridBoundColumn>

 

 

Thanks in advance!

Michael

Michael
Top achievements
Rank 1
 answered on 19 Apr 2016
4 answers
325 views

Hi,

I need to modify the filter for radgrid.

As per the requirement i have to use different filter option for different column and reduce the filter option(only contain filter) for default radgrid headercontect type of filter.

Please find the requirement and current implement of rad grid filter.

Any sample code with be greatly helpful.

Thanks.

Maria Ilieva
Telerik team
 answered on 19 Apr 2016
3 answers
289 views

Hi,

I am using the RadAutoCompleteBox in a sharepoint visual webpart.  I have all the values when I load the webpart.

I am setting the DataSource for the RadAutoCompletebox in page load, but everytime I enter text in the AutoCompleteBox is does a post back.  If I disable postpack, I don't see any type ahead data. 

How do I configure the RadAutoCompleteBox so that I provide it the data it needs at pageload and then it should not do any postbacks?

A related question:

How do I configure RadAutoCompleteBox to function on the client side where it calls a asmx webservice to get the data?

Ivan Danchev
Telerik team
 answered on 19 Apr 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?