Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
137 views
Can we implement the user defined point shape in point chart? If possible, please provide me solution and code.
Ves
Telerik team
 answered on 14 Apr 2010
4 answers
165 views
Hello I am a college student trying out the Telerik controls for the first time for a school project

I am currently trying to add a custom advancededit template to my scheduler and im having a hard time figuring out exactly which way would be best to handle my implementation

Here is a description of how I am trying to use the scheduler

I am building a web app for a dog grooming business
Appointments contain all the standard attributes of the regular scheduler including recurrence of appointments.  I also need to add custom attributes for a client, dog, service, and groomer to the appointment.

I have columns in my appointments table for clientID, dogId, serviceId, and a guid for the groomer.

I have looked through the various examples that come packaged with the suite and I find they are either outdated or wont function exactly how I need them in my scenario

As a starting point I want to just add a drop down list in my form that contains my clients.  I have added the AdvancedForm.ascx user control and put in a radcombobox which uses an objectdatasource to get the list of all my clients and so far that works.

My appointments table allows my clients to be NULL or an int which is a foreign key to my clients table

What I cant figure out is how to add logic to select the client that is assigned to a specific appointment when I open the form in edit mode for a currently existing appointment

EX: appointment is linked with client ID 15.  when opening the appointment I want the drop down list to have the client selected that corresponds with value 15

here is a copy of my advanededit template tag.  I'm not sure exactly what "ClientID" should refer to is it a database column ?
SelectedClient is the property I have exposed in AdvancedForm.ascx.cs I believe. What exactly does '<%# Bind("ClientID") %>' mean ?

<AdvancedEditTemplate>
    <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit"
        Subject='<%# Bind("Subject") %>'
        Description='<%# Bind("Description") %>'
        Start='<%# Bind("Start") %>'
        End='<%# Bind("End") %>'
        RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
        SelectedClient='<%# Bind("ClientID") %>' />
</AdvancedEditTemplate>



My exposed property in AdvancedForm.ascx.cs looks like this:

[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
public int SelectedClient
{
    get
    {
        if (rcbClients.SelectedIndex == 0)
            return 0;
        return Convert.ToInt32(rcbClients.SelectedValue);
    }

    set
    {
        if (value.ToString().Length == 0)
            rcbClients.SelectedIndex = 0;
        else
            rcbClients.SelectedValue = "15";
    }
}

If I make my property return an int I get a server error "Specified cast is not valid."

I assumed how this would work is my combobox would return the selected clients value as an int which would be passed to my insertAppointment method in my AppointmentList.cs class and store it in the DB.

Is using the advancededit template form the best way to do this customization ?
I tried using the resourcesTypes collection feature on the smart tag of the scheduler but i found I couldn't find a way to add logic to select the client that applies to an appointment when loading the advanced form in edit mode for an existing appointment.

I also had issues when i would choose a client but no dog or a dog and no client for example it would give me a server error about my insertAppointment method not matching.  if i selected nothing from the dropdown that property wouldn't be included in the attributes passed to my insert method

In other words i would have to write ovelroaded copies of insertAppointment for 2^n combination's of choices to handle nulls

If anyone can point me in a direction of a up to date example for Q1 2010 release i would be grateful.

The documented examples with roomid userid and colorpicker aren't detailed enough and the examples they are based off are very hard to integrate into my existing project



T. Tsonev
Telerik team
 answered on 14 Apr 2010
3 answers
176 views
hi,

How to reorder the item in axis-X? I would like the show the sequence in "New, First Call, Follow up, Keep In View, Sold, Close, Failed".
(Please refer to attached file.)

Is it possible to set the datacolumn for axis-Y ?

Ves
Telerik team
 answered on 14 Apr 2010
1 answer
132 views

Hi, i'm using radcomboboxes to get a particular item in te 3rd radcombobox, when i click in my search button, i load a radgrid, when i click insert or edit, the edge of all my radcomboboxes dissapears, but the values and text still fine, when i finish editing or inserting, all back to the normaly. how can i solve this?

I'm using UserWebControl with my radgrid to insert and edit, and i'm using a UpdatePanel, i'm not using a NeedDatasource, i'm using 

ItemCommand to reload my grid



<

 

asp:UpdatePanel ID="UpdatePanel1" runat="server">

 

 

<ContentTemplate>

 

 

<br />

 

 

<table align="center" class="style31">

 

 

<tr>

 

 

<td class="style32">

 

Area

</td>

 

 

<td class="style33">

 

 

<telerik:RadComboBox ID="cbxArea" Runat="server" AutoPostBack="True"

 

 

DataTextField="NombreArea" DataValueField="CodigoArea" Skin="Vista">

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="style32">

 

Responsable

</td>

 

 

<td class="style33">

 

 

<telerik:RadComboBox ID="cbxResponsables" Runat="server" AutoPostBack="True"

 

 

DataTextField="NombrePersona" DataValueField="CodigoEnte" Skin="Vista"

 

 

Width="230px">

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="style32">

 

Tipo de equipo

</td>

 

 

<td class="style33">

 

 

<telerik:RadComboBox ID="cbxTipoEquipo" Runat="server" AutoPostBack="True"

 

 

DataTextField="NombreTipo" DataValueField="CodigoTipoEquipo" Skin="Vista">

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="style32">

 

 

&nbsp;</td>

 

 

<td class="style33">

 

 

&nbsp;</td>

 

 

<td>

 

 

<asp:Button ID="btnBuscar" runat="server" style="height: 26px" Text="Buscar" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<br />

 

 

<br />

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="True"

 

 

AutoGenerateColumns="False" AutoGenerateEditColumn="True" GridLines="None"

 

 

Skin="Office2007" Visible="False" width="735px">

 

 

<mastertableview DataKeyNames="CodigoEquipo" editmode="EditForms"

 

 

enableheadercontextmenu="True" InsertItemDisplay="Bottom"

 

 

insertitempageindexaction="ShowItemOnFirstPage" ShowGroupFooter="True">

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="CodigoEquipo" DataType="System.String"

 

 

HeaderText="CODIGO DE EQUIPO" UniqueName="CodigoEquipo">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="CodigoTipoEquipo" DataType="System.String"

 

 

HeaderText="CODIGO TIPO EQUIPO" UniqueName="CodigoTipoEquipo">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="CodigoPais" DataType="System.String"

 

 

HeaderText="PAIS" UniqueName="CodigoPais" Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="DescripcionEquipo" DataType="System.String"

 

 

HeaderText="DESCRIPCION" UniqueName="DescripcionEquipo">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="NumeroTelefono" DataType="System.String"

 

 

HeaderText="NUMERO DE TELEFONO" UniqueName="NumeroTelefono">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="MontoLimite" DataType="System.String"

 

 

HeaderText="MONTO LIMITE" UniqueName="MontoLimite">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="FechaRegistro" DataType="System.String"

 

 

HeaderText="FECHA REGISTRO" UniqueName="FechaRegistro" Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="UsuarioRegistro" DataType="System.String"

 

 

HeaderText="USUARIO REGISTRO" UniqueName="UsuarioRegistro" Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="EstadoRegistro" DataType="System.String"

 

 

HeaderText="ESTADO REGISTRO" UniqueName="EstadoRegistro" Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Origen" DataType="System.String"

 

 

HeaderText="ORIGEN" UniqueName="Origen" Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="EstadoActivoFijo" DataType="System.String"

 

 

HeaderText="ESTADO ACTIVO FIJO" UniqueName="EstadoActivoFijo">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

<EditFormSettings EditFormType="WebUserControl"

 

 

UserControlName="CtrlMantenimientoEquiposAsignados.ascx">

 

 

<EditColumn UniqueName="EditCommandColumn1">

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

<ExpandCollapseColumn ButtonType="ImageButton" UniqueName="ExpandColumn"

 

 

Visible="False">

 

 

<HeaderStyle Width="19px" />

 

 

</ExpandCollapseColumn>

 

 

</mastertableview>

 

 

<ClientSettings ActiveRowIndex="true" EnablePostBackOnRowClick="false">

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 

 

<br />

 

 

<br />

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

T. Tsonev
Telerik team
 answered on 14 Apr 2010
1 answer
103 views
We have an application with a main menu that uses the "Telerik" skin, and this is working OK.  Our grids use the "WebBlue" skin, and this also is working OK.  The filter menu in the grids defaults to using the "WebBlue" skin set for the grid, and I would like to have it use the "Telerik" skin.

I have placed the following in the grid markup:

<FilterMenu Skin="Telerik" EnableEmbeddedBaseStylesheet="true" EnableEmbeddedSkins="true">   
</FilterMenu>   
 
 

and have also tried applying the same settings in the code-behind, but the grid continues to emit the "RadMenu_WebBlue" class for the filter menu, causing it to appear with the "WebBlue" skin.

I have checked the value of the grid.FilterMenu.Skin property in the the grid PreRender event, and at that point it still has the value "Telerik".  By the time it reaches the grid Unload event, the value has changed to "WebBlue".  Apparently during the Render process it gets changed to "WebBlue".

I am using the RadControls for ASP.NET AJAX Q1 2010 DLL's.

Is there something I'm missing?  Do I need to change another setting somewhere?

Regards,
Bob Reader

Rosen
Telerik team
 answered on 14 Apr 2010
1 answer
190 views
Dear support,

EmptyMessage only displays when AllowCustomText is set to true. Why? If we set AllowCustomText to true, then user can enter any text to the combobox which will bypass my requiredfieldvalidator.

How shall I work around with this?
Shinu
Top achievements
Rank 2
 answered on 14 Apr 2010
3 answers
154 views
Hi,

I'm using the following code behing at the send form button click event in order to check if my RadUpload has at last 1 file to be uploaded, this works fine in IE but not in Firefox that display the error message each times.

Dim CheckNbrPics As Integer = 0

 

For Each file As UploadedFile In RuPhotos.UploadedFiles

 

CheckNbrPics = CheckNbrPics + 1

 

Next file

 

 

If CheckNbrPics = 0 Then

 

MyFormValid =

False

 

sbError.Append(

"<li class=""Error"">Error text</li>")

 

 

End If

The files are saved in a second time.

I would like to keep this validation in the logik of my code behing, is it possible ?

It seems that FF download 1st the files and play the code after this, IE not.

Any idea to fix it ?

Thanks,


Herve

 

 

 

 

Veselin Vasilev
Telerik team
 answered on 14 Apr 2010
3 answers
113 views
I have been using a custom dll for the skin registration and all has been working well until I tried to add teh RadEditor to my page.

The skin doesn't seem to get added to the WebResourceFile when I look at it in fiddler.  All the other controls work just fine.

Any suggestions.

Attached is my skin project layout.
T. Tsonev
Telerik team
 answered on 14 Apr 2010
1 answer
106 views
Hello,
We are using the code below to Hide / Show MenuItems when a grid item is selected. We noticed the RadMenu.TrackChanges / RadMenu.CommitChanges is a huge hit on performance and seems to get worse the more times it is called untill the page just eventually freezes. Any clues as to whether this is a memory leak or what?

function FilterGridMenu(commands, primaryKeyID, claimID, claimantID, claimNumber, jurisdiction, attachmentModuleName)  
{  
    var gridMenu = $find("<%= rmGridActions.ClientID %>");  
    if(gridMenu.get_enabled())  
     {  
        //gridMenu.trackChanges();  //COMMENTED OUT BECAUSE ITS A HUGE MEMORY HOG  
              
        //Reset GridMenu Items and Values  
        var menuItems = gridMenu.get_allItems();  
        for (var i=0; i < menuItems.length; i++)  
        {  
            if(menuItems[i].get_text() != 'Grid Actions')  
            {  
                 menuItems[i].hide();  
                 menuItems[i].set_value(primaryKeyID);  
             }  
                          
            var menuItemText = menuItems[i].get_text();  
            if(menuItemText == 'Object Payment')  
            {  
                var paramValue = primaryKeyID + '|' + claimID + '|' + claimantID + '|' + claimNumber + '|' + jurisdiction;  
                menuItems[i].set_value(paramValue);  
            }  
            else if(menuItemText.indexOf('Add') > -1 && menuItemText.indexOf('Attachment'))  
            {  
                var paramValue = attachmentModuleName + '|' + primaryKeyID + '|' + claimantID + '|' + claimNumber;  
                menuItems[i].set_value(paramValue);  
            }  
        }  
                      
        //Apply Commands list to hide or disable Context Menu Items  
        var arrayCommands = commands.split('|');  
        for (x in arrayCommands)  
        {  
           var menuText = arrayCommands[x];  
           if(menuText.length > 0)  
           {  
               var menuItem = gridMenu.findItemByText(menuText);  
               if(menuItem != null)  
               {  
                  menuItem.show();  
               }  
           }  
        }  
        //gridMenu.commitChanges(); //COMMENTED OUT BECAUSE ITS A HUGE MEMORY HOG  
    }  
}            
T. Tsonev
Telerik team
 answered on 14 Apr 2010
1 answer
156 views
Hello,

We have a custom skin that we use for our app.  Right now, all of the styles are in the app_themes folder, but I'd like to manually manage the files.  I was wondering if the stylesheet manager can point to a directory I specify and manage the registering of links for me, as the folder has the standard setup for the skin...

I saw an example of using attributes for a class and registering this, but I don't want to have to do that for all the styles because I do follow the standard layout and do not embed them in the assembly.

Thanks.
T. Tsonev
Telerik team
 answered on 14 Apr 2010
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?