Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
93 views
I have some extra fields in my appointment table which are not user-edited fields, but rather need to be generated from the appointment's information when the appointment is created or updated.
 
Is there a way for me to hook onto an event of the Radscheduler so that on inserts and updates, I can generate my extra field data, without interfering with Radscheduler's binding still handling the normal fields? Perhaps a way to have Radscheduler call my recalcuation function after every time it does an insert or update? I don't want to have to rewrite the whole edit/insert event. Is there a better way?
Plamen
Telerik team
 answered on 09 Nov 2011
3 answers
122 views
Hi all,
I am using appointment template to display appointment. If at same time interval there are more than 3 appointment its going to overlapped. Is there is any way by which we fix the width of appointment template, so that they will not overlapped,
thanks
Plamen
Telerik team
 answered on 09 Nov 2011
6 answers
604 views
I need the selected value from a ComboBox control in a RadGrid in insert mode (Edit mode = popup) Immediately after selecting by the user and before an insert into the database.

I set ComboBoxControl to AutoPostBack.

With:

Sub RadGrid_ItemCreated (....)
Dim item As GridEditableItem = TryCast (e.Item, GridEditableItem)
Dim editor As GridView DropDownList column editor = DirectCast (item.EditManager.GetColumnEditor ("field"), grid column drop down editor)
editor.ComboBoxControl.AutoPostBack = True
Dim myValue As String = editor.ComboBoxControl.SelectedValue

With myValue I just get the "old" value and not the new selected value from user. The new value will appear only after another postback. Is there a solution?

Is it possible for the selected value from a ComboBox control in insert mode (not edit mode) to get outside of sub RadGrid_ItemCreated (....)?

Thanks
Rolf from Switzerland
Clive Hoggar
Top achievements
Rank 1
 answered on 09 Nov 2011
1 answer
120 views
Hi, I have a Timer and a RadScheduler that uses WebService for data. I want to refresh a Radschduler on the event of Timer_Tick. However, if the RadSchduler is in Insert Mode(Using Advance Template), I would like to cancel that. So, how do I check to know that the RadScheduler is in Insert Mode? Thanks.
Ivana
Telerik team
 answered on 09 Nov 2011
3 answers
303 views
Hi,

I'm using RadComboBox Templates with the "OnItemsRequested" event.
I have the following scenario:
The ItemTemplate width is about 2300px, and indeed the HeaderTemplate should be 2300px also. The dropdown width is set to 500px (due to the maximum container width). I can see the Horizontal Scroll when the data is bounded; however the scroll only affect the ItemTemplate and not the HeaderTemplate. I want the scrollbar to scroll also the HeaderTemplate so the Items and the Header are matching.

Please do let me know what is needed to be done.                        
Here is my code:
                     <telerik:RadComboBox ID="ddHomeLocation" runat="server"
                         DropDownWidth="500px" EmptyMessage="Choose a Location" Skin="Windows7" HighlightTemplatedItems="true"
                          EnableLoadOnDemand="true" Filter="StartsWith" Height="200px" Width="500px"
                                 OnItemsRequested="ddHomeLocation_ItemsRequested" OnLoad="ddHomeLocation_Load"
                                   >
<HeaderTemplate>
                           <div style="width:2300px;height:50px; " >
                            <div style="float:left;width:90px">
                              <%= Session["LocationTypesLocationTypeCode"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationTypesLocationTypeName"].ToString()%>
                            </div>
                            <div style="float:left;width:60px">
                                 <%= Session["LocationsLocationID"].ToString()%>
                            </div>
                            <div style="float:left;width:60px">
                                 <%= Session["LocationsLocationName"].ToString()%>
                            </div>
                            <div style="float:left;width:60px">
                                 <%= Session["LocationsLocationCodeHome"].ToString()%>
                            </div>
                            <div style="float:left;width:70px">
                                 <%# Session["LocationsLocationNameHome"].ToString()%></div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsLocationCodeCurrent"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsLocationNameCurrent"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["AddressesAddressName"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["AddressesAddress1"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["AddressesAddress2"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["AddressesCity"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["AddressesState"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["AddressesZip"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["AddressesCountry"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsBuilding"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsFloor"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsRoom"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsArea"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsAisle"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsShelf"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsBin"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsVIN"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsMake"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsModel"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsColor"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsLicensePlate"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsPalletteNumber"].ToString()%>
                            </div>
                            <div style="float:left;width:80px">
                                 <%= Session["LocationsNotes"].ToString()%>
 
                            </div>
                        </div>
 
</HeaderTemplate>                                 
 
                         <ItemTemplate>
 
                        <div style="width:2300px;" >
                            <div style="float:left;width:90px">
                               
                               <%# DataBinder.Eval(Container, "Attributes['LocationTypeCode']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['LocationTypeName']")%>
                            </div>
                            <div style="float:left;width:60px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['LocationCode']")%>
                            </div>
                            <div style="float:left;width:60px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['LocationName']")%>
                            </div>
                            <div style="float:left;width:60px">
                                 
                                  <%# DataBinder.Eval(Container, "Attributes['HomeLocationCode']")%>
                            </div>
                            <div style="float:left;width:70px">
                                 
                                  <%# DataBinder.Eval(Container, "Attributes['HomeLocationName']")%>
                                  </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['CurrentLocationCode']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['CurrentLocationNam']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['AddressName']")%>
                            </div>
                            <div style="float:left;width:80px">
                                 
                                  <%# DataBinder.Eval(Container, "Attributes['Address1']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['Address2']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['City']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['State']")%>
                            </div>
                            <div style="float:left;width:80px">
                                 
                                  <%# DataBinder.Eval(Container, "Attributes['Zip']")%>
                            </div>
                            <div style="float:left;width:80px">
                                
                                  <%# DataBinder.Eval(Container, "Attributes['Country']")%>
                            </div>
                            <div style="float:left;width:80px">
                                 
                                  <%# DataBinder.Eval(Container, "Attributes['Building']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['Floor']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['Room']")%>
                            </div>
                            <div style="float:left;width:80px">
                                 
                                  <%# DataBinder.Eval(Container, "Attributes['Area']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['Aisle']")%>
                            </div>
                            <div style="float:left;width:80px">
                                
                                  <%# DataBinder.Eval(Container, "Attributes['Shelf']")%>
                            </div>
                            <div style="float:left;width:80px">
                                 
                                  <%# DataBinder.Eval(Container, "Attributes['Bin']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['VIN']")%>
                            </div>
                            <div style="float:left;width:80px">
                                 
                                  <%# DataBinder.Eval(Container, "Attributes['Make']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['Model']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['Color']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['LicensePlate']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['PlateNumber']")%>
                            </div>
                            <div style="float:left;width:80px">
                                  
                                  <%# DataBinder.Eval(Container, "Attributes['Notes']")%>
                            </div>
                        </div>
                         </ItemTemplate>
                     </telerik:RadComboBox>


Ivana
Telerik team
 answered on 09 Nov 2011
1 answer
116 views
Hi all,

We are testing the scheduler control to incorporate it in one of our projects but we are having a problem similar to the one posted in the thread below. 

http://www.telerik.com/community/forums/wpf/scheduler/how-to-set-resource-as-selected-in-combobox.aspx

When we load the appointment information, the drop-down of the resource is not set to the correct value. For example, we have an operatory resource that the user assigns in the appointment. We are able to set that and save in the database but when we open the appointment detail the resource is not set. 

We tried the solution presented by peter in the thread above but it does not apply to our case because we use the Telerik Appointment class. I am putting the code we are using below. Any ideas?

Thanks



public override System.Collections.Generic.IEnumerable<Appointment>
              GetAppointments(RadScheduler owner)
        {
            var events = _messageService.GetEvents();
            IEnumerable<Appointment> appts = events != null ? Mapper.Map<IList<EventDTO>, IEnumerable<Appointment>>(events) : new List<Appointment>();
            int index = 0;
            appts.ToList().ForEach(delegate(Appointment appt) {
                appt.Owner = owner;
                appt.RecurrenceState =
                    appt.RecurrenceParentID != null ?
                        RecurrenceState.Exception :
                        !string.IsNullOrEmpty(appt.RecurrenceRule) ?
                            RecurrenceState.Master : 
                            RecurrenceState.NotRecurring;
                LoadResources(owner, appt, events[index]);
                index++;
            });
            return appts;
        }
 
private void LoadResources(RadScheduler owner, Appointment appt, EventDTO eventDTO)
        {
            if (eventDTO.Professional.HasValue)
            {
                Resource professional = GetResourcesByType(owner, "Professional").FirstOrDefault(r => Convert.ToInt64(r.Key) == eventDTO.Professional);
                if (professional != null)
                    appt.Resources.Add(professional);
            }
            if (eventDTO.Operatory.HasValue)
            {
                Resource operatory = GetResourcesByType(owner, "Operatory").FirstOrDefault(r => Convert.ToInt64(r.Key) == eventDTO.Operatory);
                if (operatory != null)
                    appt.Resources.Add(operatory);
            }
        }
Ivana
Telerik team
 answered on 09 Nov 2011
1 answer
157 views

Using document manager, we select a file for upload, works fine, but it does not show the file path or name that we just selected, as I know it should.  Instead there is just a blank white space to the left of the select buttons, no fields visible at all just white space. If we mouse over the space, the tool tip will appear and give us the right file names we selected... but it's just not visible.
Any ideas?
Rumen
Telerik team
 answered on 09 Nov 2011
1 answer
67 views
Hi Guys,

I have a RadEditor that is doing a very good job, however, I have a glitch that I hope someone can help me with. I have been uploading some flash files and this has been working quite well also. These files are .htm and .swf, and I want to link to the .htm file. When I click on the HyperLink Manager, I can not see the .htm file. How do I have to configure this HyperLink Manager to create a link to these .htm files?

Thanks for your time,

William
Rumen
Telerik team
 answered on 09 Nov 2011
11 answers
441 views

Hi,

i am getting the below error in my application randomly and i dont know the reason ....

could you please help...

Error Caught in Application_Error event
Error in: http://aassdotnet/WebResource.axd?d=5YkmbJ6uEizMAdUejomAO0-QZB3R3KnB1B0M1kT1XqT30uD_24tkGqrLnvDxC1-PiOYKhJvv1FR8_DBSuRpDrQ2&t=634036585340000000
Error Message:This is an invalid webresource request.
Stack Trace:   at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

waiting for your reply...
Phil H.
Top achievements
Rank 2
 answered on 09 Nov 2011
18 answers
294 views
Hello,
I'd like to add google-like filtering to my grid just like it is in the example.
Here are my current radgrid columns:
<MasterTableView TableLayout="Fixed" CommandItemDisplay="Top" DataKeyNames="indeks">
                <CommandItemTemplate>
                    <asp:Button ID="DownloadPDF" runat="server" Width="64px" CommandName="ExportToPdf" CssClass="pdfButton" />
                    <asp:Image ID="Image1" runat="server" ImageUrl="/Images/banner.png" AlternateText="York" Width="100%" />
                </CommandItemTemplate>
                    <Columns>
                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="indeks" Display="false"
                            DataType="System.String" FilterListOptions="VaryByDataType" ForceExtractValue="None"
                            HeaderText="Indeks" ReadOnly="True" SortExpression="ProductID" UniqueName="ProductID">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn Aggregate="Count"
                            HeaderText="Indeks" HeaderStyle-HorizontalAlign="Center"
                            DataField="indeks" UniqueName="indeks"
                            SortExpression="indeks"
                            FilterControlWidth="100%" HeaderStyle-Width="50px" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                            AutoPostBackOnFilter="true"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:HyperLink ID="targetControl" runat="server" Enabled="false" Text='<%# Eval("indeks") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="EAN" DataField="EAN" HeaderStyle-HorizontalAlign="Center" UniqueName="EAN"
                            SortExpression="EAN" HeaderStyle-Width="60px" FilterControlWidth="100%"
                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" ItemStyle-HorizontalAlign="Center" />
                        <telerik:GridNumericColumn HeaderText="Sztuk w kartonie" DataField="sztwkart" HeaderStyle-HorizontalAlign="Center" UniqueName="sztwkart" SortExpression="sztwkart"
                            FilterControlWidth="100%" HeaderStyle-Width="30px" ShowFilterIcon="false" ItemStyle-HorizontalAlign="Center" AutoPostBackOnFilter="true" />
                        <telerik:GridBoundColumn HeaderText="Rozmiar kartonu" DataField="rozmiarkart" HeaderStyle-HorizontalAlign="Center"
                            UniqueName="rozmiarkart" SortExpression="rozmiarkart" HeaderStyle-Width="70px"
                            FilterControlWidth="100%" ShowFilterIcon="false" ItemStyle-HorizontalAlign="Center" AutoPostBackOnFilter="true" />
                        <telerik:GridTemplateColumn HeaderText="ZdjÄ™cia" HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="Center"
                         ItemStyle-HorizontalAlign="Center" AllowFiltering="false">
                            <ItemTemplate>
                                <telerik:RadRotator runat="server" ID="itemsRotator" OnDataBinding="RadRotator_OnDataBinding" Width="168px" Height="128px"
                                 ItemWidth="128px" ItemHeight="128px">
                                    <ItemTemplate>
                                        <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("zdjecie") %>'
                                           AutoAdjustImageControlSize="false" Width="128px" Height="128px" ResizeMode="Fit" ImageAlign="Middle"/>
                                    </ItemTemplate>
                                </telerik:RadRotator>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn AllowFiltering="false" AllowSorting="false" DataField="Fiszka" HeaderStyle-HorizontalAlign="Center" UniqueName="fiszka" HeaderText="Fiszka"
                            HeaderStyle-Width="60px" ItemStyle-HorizontalAlign="Center" ShowFilterIcon="false" />
                    </Columns>
                </MasterTableView>

I can't do google-like filtering like in the example because it would clean my current columns (non-standard ones as you can see).
Also using FilterTemplate somehow didn't work for me. Maybe I did something wrong, but currently I don't have any idea what should my approach be. 

Also please note that all my data for the grid is from asp:SqlDataSource .
I saw many threads about it but I couldn't use any of the solutions.

Any ideas how should I start without losing my current columns if I want to achieve same effect as in the example?

Regards
Darek
Iana Tsolova
Telerik team
 answered on 09 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?