Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
111 views
Hi,

I am using trial version of SPRadGrid control. I am getting following js error on loading page:

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Trident/5.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; InfoPath.3; .NET4.0C; .NET4.0E; .NET CLR 3.0.30729)
Timestamp: Thu, 6 Jun 2013 11:17:37 UTC
Message: Syntax error
Line: 2
Char: 1
Code: 0
URI: https://xxx.abc.com/_vti_bin/Telerik.Ajax.SharePoint/gridbindingservice.svc/javascript/js

Please help how to correct this error. Additionally, I am trying to use with client-side binding. But when I enable WebService Binding, it does not load data and shows loading image indefinitely.

Thanks,
Garima

Tsvetoslav
Telerik team
 answered on 10 Jun 2013
1 answer
618 views
I've read this: http://www.telerik.com/help/aspnet-ajax/upload-uploading-large-files.html and have set httpRuntime as described and it works. However, this opens it up for the whole application. I would prefer to limit it to just the pages where I'm doing uploads, as in

<location path="PageWithUpload.aspx">
    <system.web>
        <httpRuntime executionTimeout="1800" maxRequestLength="2097151" />
    </system.web>
</location>
but that doesn't seem to work. Should it, or is there another way to do it?
Hristo Valyavicharski
Telerik team
 answered on 10 Jun 2013
13 answers
240 views

Requirements

RadControls  version

 2012.3.1016.40

.NET version

 4.0

Visual Studio version

 2012

programming language

 c#

browser support

all browsers supported by RadControls


PROJECT DESCRIPTION                                    

I want to dynamically load control into the appointment template at runtime. but I cannot seem to figure it out

here is my markup:
<telerik:RadScheduler runat="server" ID="RadScheduler1" Height="100%" SelectedView="TimelineView" ShowFooter="false" DayStartTime="07:00:00" DayEndTime="18:00:00" FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday" EnableDescriptionField="true" DataSubjectField="Title" DataKeyField="ItemId" DataStartField="StartDate" DataEndField="EndDate" AllowDelete="False" AllowEdit="False" AllowInsert="False" Localization-HeaderTimeline="Week TL" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated" OnNavigationCommand="RadScheduler1_NavigationCommand" OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound">
    <AdvancedForm Modal="true"></AdvancedForm>
    <TimelineView UserSelectable="true" SlotDuration="1" TimeLabelSpan="1" NumberOfSlots="7" GroupingDirection="Horizontal" ColumnHeaderDateFormat="dddd, d" EnableExactTimeRendering="false"></TimelineView>
                 <WekView ColumnHeaderDateFormat="dddd, d" HeaderDateFormat="dddd d" ShowHoursColumn="true" UserSelectable="false"   />
    <MonthView ColumnHeaderDateFormat="dddd" DayHeaderDateFormat="dd" />
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <AppointmentTemplate>
        <asp:PlaceHolder ID="phContent" runat="server" />
    </AppointmentTemplate>
</telerik:RadScheduler>

I need to get the bound dataitem, load the required control based on the dataitem and also bind that data to the control

so my plan was to get the data, load the control, and place it into the placeholder control in the the AppointmentTemplate markup.

I am able to get the data in the 'AppointmentDataBound' event but I cannot seen to get access to the placeholder control, and in the 'AppointmentCreated' event that fires after the 'AppointmentDataBound' it looks like I may have access to the control but not the dataitem.

so I am not sure how to do this.






Plamen
Telerik team
 answered on 10 Jun 2013
1 answer
135 views
Hi ,

In one of our application, which uses html editor, we have a functionality where at the particular cursor position if user enters "[[" shown Brackets, it will populate all the Business specific words which are stored in our database and upon selection of particular word from the populated words list, It wll be displayed in the cursor position of the editor.

To populate these words we are calling the web service and binding it to the Div tag and displaying a Pop up as shown in the attachment.

.Now as we have decided to go with RadEditor Control, We need to achieve same functionality as users are very much habituated to this.  Please help us to achieve this. Appreciate your speed help.

Thanks & Regards
Lakiesha
Vessy
Telerik team
 answered on 10 Jun 2013
7 answers
166 views
Hi, there is a way to set the dimension of the grabber for resize appointments?
I want the line button a little bit larger, it's possible?
Boyan Dimitrov
Telerik team
 answered on 10 Jun 2013
2 answers
168 views
Hello everyone.
I am writing about a problem item "expanded and collapsed". I created a button that will "expand" or "collapsed" my items according to their status by calling a simple javascript function .
(If the item is expanded ==> item equal collapse and if the item is collapsed ==> item equal expanded).

Almost everything works perfectly. but I do not know why there is always an item at the top of my grid is always "extended". But when I debug my javascript function, I can see that my loop, foreach well on all items.

Here is my javascript code that allows me to expand or hide items based on their condition.
                function expandCollpaseAllIncident() {
                var Grid = $find("<%= RadGridToolIncident.ClientID %>");
                var MasterTable = Grid.get_masterTableView();
                for (var i = 0; i < MasterTable.get_dataItems().length; i++) {
                    var row = MasterTable.get_dataItems()[i];
                    if (row.get_expanded() == false) {
                        row.set_expanded(true);
                    }
                    else {
                        row.set_expanded(false);
                    }
                }
 
            }

And my RadGrid code Asp:
<telerik:RadGrid ShowHeader="false" ID="RadGridToolIncident" runat="server" DataSourceID="SqlDataSourceAllIncidents"
                                OnItemDataBound="RadGridToolIncident_ItemDataBound" AutoGenerateColumns="false" EnableEmbeddedSkins="false" CssClass="gridIncident_pilotageGeneral">
                                    <MasterTableView runat="server" DataSourceID="SqlDataSourceAllIncidents" DataKeyNames="toolsID"
                                    CssClass="tableBlockPilotageIncident" Width="196px" >
                                    <NoRecordsTemplate>
                                        <asp:Label runat="server" ID="lbNoRecorsTool" Text='<%$ Resources:IRM, tool_action_label_no_current %>'></asp:Label>
                                    </NoRecordsTemplate>
 
                                    <Columns>
                                        <telerik:GridTemplateColumn UniqueName="toolsID" Visible="false">
                                            <ItemTemplate>
                                                <asp:HiddenField runat="server" ID="lbIDTool" Value='<%# Bind("toolsID") %>'  ClientIDMode="Static"/>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn  Visible="false">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="lbIDRisk" Text='<%# Bind("riskID") %>' ForeColor="#92c4f7"
                                                    Font-Bold="false" Font-Size="9px" Visible="false"></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="num" ItemStyle-CssClass="cellNumTool">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="lbIDnum" Text='<%# Bind("num") %>' CssClass="numGridAction"
                                                    Font-Bold="false" Font-Size="13px" Visible="true"></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn UniqueName="NameIncident" ItemStyle-CssClass="cellNameTool">
                                            <ItemTemplate>
                                                <asp:LinkButton runat="server" ID="linkIncidentDetail" Text='<%# Bind("name") %>' Font-Overline="false"
                                                    CssClass="linkIncident" OnCommand="showToolDetail" Font-Size="14px" CommandName="NameClickIncident"
                                                    CommandArgument='<%# Bind("toolsID") %>' ></asp:LinkButton>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
Mehdi
Top achievements
Rank 1
 answered on 10 Jun 2013
1 answer
76 views
Hello,

If I choose the following for RadfileExplorer:

 EnableFilterTextBox="true" EnableFilteringOnEnterPressed="true"

When I go straight to the text box and enter a term, the "Back" button gets focus and nothing else seems to happen, but only in Firefox. IE10 works as you would expect.

If it helps here is some background. The company I work for is using the Fileexplorer as part of an editting tool. The Fileexplorer allows our users access to files that they have uploaded to the companies CMS system.

I have created a Filesystemprovider that gives access to files depending on the user and where they are accessing the editting tool.

I have extended this provider to have information about the default "alternative text" for images and store this in the FileItem.Path variable as a csv variable. The path looks like this:

Uploads/2350|0|0|ALTDESC|1|15&#46;01&#46;2013 16:49:47|0

I've bolded the information I want to using in the filter.

The whole thing breaks down like this: virtual path / fileid | height | width | alt description | boolval| upload date | boolval

So, in order to filter with this extra field I have to catch the filter command and then do a postback of my own, because the FilterText value is inaccessable in the code behind I have to put this in a hidden field, this I do like so:

function explorerFilterHandler(explorer, args)
{
        args.set_cancel(true);
	hField = $get("<%= explorersFilterValue.ClientID%>");
	hField.value = args.get_text();
	__doPostBack(hField.name, "");
}

As per another forum post.

Because the filter text is deleted on postback I have to refill the text box and then set the cursor to the end of the text once the OnClientLoad of the FileExplorer is fired (Onclientload = "setFilter"):


         function setFilter(){   
            var hField  = $get("<%= explorersFilterValue.ClientID%>");
            if(hField.value != ''){
                var filter = $('input[id$="FilterTextBox"]');
                filter.val(hField.value);
                filter.focus()
                setSelectionRange(filter[0], hField.value.length, hField.value.length);
            }
        }
 
        function setSelectionRange(input, selectionStart, selectionEnd) {
            if (input.setSelectionRange) {
                input.focus();
                input.setSelectionRange(selectionStart, selectionEnd);
            }
            else if (input.createTextRange) {
                var range = input.createTextRange();
                range.collapse(true);
                range.moveEnd('character', selectionEnd);
                range.moveStart('character', selectionStart);
                range.select();
            }
        }

Because this postback can be slower than a typist can put in the letters this can mean text disappears if the user is not careful, so it was decided the use the EnableFilteringOnEnterPressed setting.

I thought that, perhaps, the error could have been caused by all this extra work, but it seems when I add a simple FileExplorer to a different page, the same thing happens.

It may simply be that I have missed something.

Thank you for your help in this matter.

Vessy
Telerik team
 answered on 10 Jun 2013
5 answers
202 views
I have been using the AutoComplete box in a project for a few weeks and it is great.

It seems to have stopped working however. The results still appear below the box but the list does not show text.

You can see in my screenshot that a thin line appears below the box that is tall enough to be showing all of the results. I'm not sure what is going wrong. I think it might have happened when we upgraded from 4.0 to 4.5.

I am using ASP.NET 4.5 with the latest Telerik release on Windows 7. I have tried this in the latest Chrome and IE10.

Thanks for any suggestions!

I should add code:

<telerik:RadAutoCompleteBox ID="natCompleteBox" runat="server" AllowCustomEntry="true" InputType="Text" TextSettings-SelectionMode="Single"></telerik:RadAutoCompleteBox>
 
           List<Org> orgs = service.GetOrgsByType("National");
            natCompleteBox.DataSource = (from s in orgs orderby s.OrgDesc select s.OrgDesc).ToList();
            natCompleteBox.DataBind();
Bozhidar
Telerik team
 answered on 10 Jun 2013
1 answer
203 views
Hi, is it possible to config RadDatePicker to accept dates without dots:
User would like to enter "31012013" in textbox (of RadDatePicker), that would be converted to datetime. (re-format to "31.01.2013" on blur is acceptable, but how to do it?) 

re, Žiga
Princy
Top achievements
Rank 2
 answered on 10 Jun 2013
7 answers
225 views
I am modifying this example to use in my project:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/templateformupdate/defaultcs.aspx

how can I preload  "Title Of Courtesy" combobox from code behind at all and also
considering the fact that in my case it is  a web user control ?  Actually in my case user control  is a grid wrapped in user control
but I did  DataSource and DataBind  interface for it, so it works like a regular bindable control in that respect ).

The values in my user control are different depending on EmployeeId and that is why I need to bind it based on row.

What I am looking to do is something like:
 UserControl.DataSource=Business.Employees.GetContactInfoAsList(EpmployeeId)

but having trouble figuring out which event to use to get a hold of usercontrol on add new row click, also for existing records
I am trying to use RadGrid1_DataBound but item.FindControl (UserControlId) returns NULL when
I do foreach on grid items.

Thank you.










Viktor Tachev
Telerik team
 answered on 10 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?