Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
118 views
Hello,

I am completely new to Telerik RadControls and was struggling with how to dynamically load a user control into the RadAjaxPanel. I want a sample runnable application to understand the above. Any help appreciated.

Thanks and Regards,
Needha.
Princy
Top achievements
Rank 2
 answered on 26 Mar 2013
3 answers
321 views
Hello,

I am using a RadGrid and I want to insert a new item into the grid using the built-in RadGrid functionality.  The new item has been defined as follows:

<EditFormSettings EditFormType="Template">

<FormTemplate>

<div>

<h3>

New Team Culture Assessment

</h3>

<table>

<tr>

<td>

<asp:Label ID="EntitiesLabel" runat="server" Text="Entities"></asp:Label>

</td>

<td>

<asp:DropDownList ID="EntityList" runat="server" AutoPostBack="True"

OnSelectedIndexChanged = "Entity_selected">

</asp:DropDownList>

 

</td>

</tr>

<tr>

<td>

<asp:Label ID="TeamsLabel" runat="server" Text="Teams"></asp:Label>

</td>

<td>

<asp:DropDownList ID="TeamList" runat="server">

</asp:DropDownList>

</td>

</tr>

</table>

</div>

</FormTemplate>

</EditFormSettings

 

 

>

My questions:

1.  I want to populate the EntityList and TeamList drop-downs in the page-load using "object data source", but when I access them directly, I am getting an error saying that the name EntityList is not found in current context...here is what I am doing in !postback in page_load:

var bd = new BfEntityDAO();

List<BfEntity> ents = bd.GetEntities();

EntityList.DataSource = ents;

EntityList.DataTextField = "BfEntityName";

EntityList.DataBind();

How can I populate these drop-downs so that the user can see the values when he inserts a new item?

2.  When the user opens the insert form and selects an entity from the entitylist drop-down, I want to populate the teamlist drop-down based on the value selected in the entitylist drop-down.  How can I accomplish this?

This is the code snippet I am using currently in the codebehind, but the method is not being called:

 Method called when item in entity drop own list selected

===========================================

try
{

var cd = new TeamDAO();

List<Team> teams = cd.GetTeamsForEntity(entityDropDown.SelectedValue);

teamDropDown.DataSource = teams;
teamDropDown.DataTextField = "TeamName";
teamDropDown.DataValueField = "Id";
teamDropDown.DataBind();

}
catch (Exception ex)
{
Common.Utils.HandleException(ex);
}



3.  Finally, when the user clicks OK on the form, I want a insert the data into the database from the code-behind file. How can I get a callback to method in the code-behind and how can I access the data entered by the user?

Thank you

 

 

 

Shinu
Top achievements
Rank 2
 answered on 26 Mar 2013
1 answer
220 views
Where is the CSS file(s) for the Silk Skin located?

I Find it much easier to be able to view the full CSS of the skins to make my changes (may want to change one color to another, can do a simple search and replace instead of waiting to see a wrong color and then overiding the css)

Thanks
Bill
Top achievements
Rank 2
 answered on 26 Mar 2013
1 answer
277 views
Browser: IE 9 [9.0.8112.16421]
Controls: 2013.1.220.45

I'm using http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx as a reference to adjust the width of a GridDateTimeColumn, however the actual DateInput box does not appear to be shrinking.  The Filter icon does display over top of the input box - see the attached image.

ASPX File:
<telerik:GridDateTimeColumn DataField="PostedDate" HeaderText="Posted Date" UniqueName="PostedDate" DataFormatString="{0:MMM dd, yyyy}" AllowFiltering="true" AllowSorting="true"
CurrentFilterFunction="GreaterThanOrEqualTo" HeaderStyle-Font-Bold="true" PickerType="DatePicker" FilterControlWidth="40px" EnableRangeFiltering="False" EnableTimeIndependentFiltering="False">
                            <ItemStyle Width="50px"></ItemStyle>
                            <HeaderStyle Width="50px"></HeaderStyle>
                        </telerik:GridDateTimeColumn>

 [I used extremely small values to test]. Any idea why this isn't working and/or how to fix it?

Edit: this works correctly in FF 19.0.1 and Chrome 25.0.1364.152
Mike
Top achievements
Rank 1
 answered on 25 Mar 2013
0 answers
95 views
Let's just cancel this one for now.  The situation has changed.  Thanks.

What's wrong with this scenario?

I have a RadButton within a popup formtemplate within a RadGrid.

In order to prevent multiple inserts the RadButton does a onClientClicked call to this JavaScript function:

function disableSave(button, args) {                
     if (Page_IsValid) {
          button.set_enabled(false);
     }
}


This has been working fine so far.  

However now I need to do some server side validating as well (This is a work-around since I can't get the validators in an ascx on that same FormTemplate to fire.  I've addressed that matter in a separate post.)  In the InsertCommand I do some checks and if they fail, I get a handle to the button and set Enabled=True.

Unfortunately this does not work.  The button remains disabled.  

Suggestions?

Boris
Top achievements
Rank 1
 asked on 25 Mar 2013
10 answers
421 views
Hello, I have some problems with the RadGrid, I hope I can help.

In Internet Explorer 9. The control does not display the columns as it should inMasterTable both headers and data in rows, and I also piled Detail information as shown in the image RadGridImgIE9.jpg.

In Google Chrome stacked all the information from the MasterTable to detail, as shownin the image RadGridImgChrome.jpg.

I'm using version Q1 2009.

thanks 

My code is as follows: 


<telerik:RadGrid ID="RadGrid1"
    ShowStatusBar="True"
    DataSourceID="SqlDataSource1"
    runat="server" 
    AutoGenerateColumns="False"
    GridLines="None" 
    Skin="WebBlue" 
    Height="555px" 
    Width="1022px" 
    AllowFilteringByColumn="True"
    AllowPaging="True" >
    <GroupingSettings CaseSensitive="false" />
    <PagerStyle Mode="NextPrevAndNumeric" />
    <MasterTableView
        CommandItemDisplay="Top"
        DataSourceID="SqlDataSource1"
        DataKeyNames="id_empresa"
        AllowMultiColumnSorting="True" 
        nodetailrecordstext="No hay Pólizas que mostrar." 
        nomasterrecordstext="No hay Empresas que mostrar.">
        <CommandItemTemplate>
            <asp:Label ID="LabelTituloGrid" runat="server" Text="Listado de Empresas" Font-Bold="True"></asp:Label>
        </CommandItemTemplate>
        <DetailTables>
            <telerik:GridTableView DataSourceID="SqlDataSource2" Width="10%" AllowFilteringByColumn="False" runat="server">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="id_empresa" MasterKeyField="id_empresa" />
                </ParentTableRelation>
                <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn   SortExpression="no_poliza"  HeaderText="No Póliza"  HeaderButtonType="TextButton" DataField="no_poliza"  UniqueName="no_poliza"                                                           >  </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn   SortExpression="vigencia"   HeaderText="Vigencia"   HeaderButtonType="TextButton" DataField="vigencia"   UniqueName="vigencia"                                                            >  </telerik:GridBoundColumn>
                    <telerik:GridNumericColumn SortExpression="total"      HeaderText="Total"      HeaderButtonType="TextButton" DataField="total"      UniqueName="total"      DataType="System.Decimal" DataFormatString="{0:#,##0.00}" > </telerik:GridNumericColumn>
                    <telerik:GridNumericColumn SortExpression="pagado"     HeaderText="Pagado"     HeaderButtonType="TextButton" DataField="pagado"     UniqueName="pagado"     DataType="System.Decimal" DataFormatString="{0:#,##0.00}" > </telerik:GridNumericColumn>
                    <telerik:GridNumericColumn SortExpression="pendiente"  HeaderText="Pendiente"  HeaderButtonType="TextButton" DataField="pendiente"  UniqueName="pendiente"  DataType="System.Decimal" DataFormatString="{0:#,##0.00}" > </telerik:GridNumericColumn>
                    <telerik:GridBoundColumn   SortExpression="id_empresa" HeaderText="ID Empresa" HeaderButtonType="TextButton" DataField="id_empresa" UniqueName="id_empresa" DataType="System.Int32"   Visible="False">                  </telerik:GridBoundColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
        <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
        <Columns>
            <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" AllowFiltering ="False">
                <HeaderTemplate>
                    <asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True" Checked="False" oncheckedchanged="CheckBox2_CheckedChanged" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Checked="False" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn UniqueName="ss"                     DataField="ss"                  HeaderText="Status">                                                </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="nombre_tipo_empresa"    DataField="nombre_tipo_empresa" HeaderText="Tipo de Empresa">                                       </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="id_empresa"             DataField="id_empresa"          HeaderText="ID Empresa"          DataType="System.Int32">           </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="nombre_empresa"         DataField="nombre_empresa"      HeaderText="Nombre">                                                </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Vendedor"               DataField="Vendedor"            HeaderText="Vendedor">                                              </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="fecha_alta"             DataField="fecha_alta"          HeaderText="Fecha Alta"          DataFormatString="{0:dd/MM/yyyy}"> </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="fecha_baja"             DataField="fecha_baja"          HeaderText="Fecha Baja"          DataFormatString="{0:dd/MM/yyyy}"> </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="vigencia"               DataField="vigencia"            HeaderText="Vigencia"            DataFormatString="{0:dd/MM/yyyy}"> </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="RFC"                    DataField="RFC"                 HeaderText="RFC">                                                   </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Calle_numero"           DataField="Calle_numero"        HeaderText="Dirección">                                             </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Colonia"                DataField="Colonia"             HeaderText="Colonia">                                               </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="CP"                     DataField="CP"                  HeaderText="CP">                                                    </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Ciudad"                 DataField="Ciudad"              HeaderText="Ciudad">                                                </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Estado"                 DataField="Estado"              HeaderText="Estado">                                                </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Telefono"               DataField="Telefono"            HeaderText="Telefono">                                              </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_nombre_1"      DataField="contacto_nombre_1"   HeaderText="Nombre Contacto 1">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_puesto_1"      DataField="contacto_puesto_1"   HeaderText="Puesto Contacto 1">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_correo_1"      DataField="contacto_correo_1"   HeaderText="Correo Contacto 1">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_telefono_1"    DataField="contacto_telefono_1" HeaderText="Telefono Contacto 1">                                   </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_nombre_2"      DataField="contacto_nombre_2"   HeaderText="Nombre Contacto 2">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_puesto_2"      DataField="contacto_puesto_2"   HeaderText="Puesto Contacto 2">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_correo_2"      DataField="contacto_correo_2"   HeaderText="Correo Contacto 2">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_telefono_2"    DataField="contacto_telefono_2" HeaderText="Telefono Contacto 2">                                   </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_nombre_3"      DataField="contacto_nombre_3"   HeaderText="Nombre Contacto 3">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_puesto_3"      DataField="contacto_puesto_3"   HeaderText="Puesto Contacto 3">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_correo_3"      DataField="contacto_correo_3"   HeaderText="Correo Contacto 3">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_telefono_3"    DataField="contacto_telefono_3" HeaderText="Telefono Contacto 3">                                   </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_nombre_4"      DataField="contacto_nombre_4"   HeaderText="Nombre Contacto 4">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_puesto_4"      DataField="contacto_puesto_4"   HeaderText="Puesto Contacto 4">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_correo_4"      DataField="contacto_correo_4"   HeaderText="Correo Contacto 4">                                     </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="contacto_telefono_4"    DataField="contacto_telefono_4" HeaderText="Telefono Contacto 4">                                   </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <exportsettings>
        <excel format="ExcelML" />
    </exportsettings>
    <ItemStyle Wrap="False" />
    <HeaderStyle Wrap="False" />
    <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
        <selecting allowrowselect="True" />
        <Scrolling ScrollHeight="100%" AllowScroll="True" UseStaticHeaders="true" />
        <Resizing AllowColumnResize="true" AllowRowResize="true" EnableRealTimeResize="true"/> 
    </ClientSettings>
</telerik:RadGrid>

Pavlina
Telerik team
 answered on 25 Mar 2013
4 answers
146 views
Here is the behavior I am seeing with RadMonthYearPicker.

In my ASPX I have:

<telerik:RadMonthYearPicker ID="RadMonthYearPicker1" runat="server" Skin="WebBlue"  OnSelectedDateChanged="RadMonthYearPicker1_SelectedDateChanged" AutoPostBack="true" >
            </telerik:RadMonthYearPicker>

In my code behind I have:

        protected void RadMonthYearPicker1_SelectedDateChanged(object sender, SelectedDateChangedEventArgs e)
        {
}

I old date is in the same year as new date, e.OldDate and e.NewDate are correct. If old date is in a different year as new date, new date is incorrect and is == to old date.



Ivan
Top achievements
Rank 1
 answered on 25 Mar 2013
3 answers
98 views
Does anyone know if the GridSettingsPersister will work with RadPivotGrid? 
Daniel
Telerik team
 answered on 25 Mar 2013
3 answers
109 views
I must be dense, because I can't seem to find a way to retrieve a setting from a persisted grid. I just want to know if there are any groupby expressions saved (a count or the like). I've tried many different combos - an example would be great.
Thanks,
--J
Angel Petrov
Telerik team
 answered on 25 Mar 2013
24 answers
1.8K+ views
Since the Q3 2012 release we have identified a common scenario when Telerik Visual Studio extensions crash which leads to various problems when using any Telerik project template or wizard. The crash happens when you have multiple Telerik Visual Studio extensions with different versions (e.g. Q2 2012 SP2 and Q3 2012).

To resolve the issue you need to ensure that all Telerik Visual Studio extensions installed have the same version. If you are using Visual Studio 2010/2012 the easiest way is to upgrade all Telerik Visual Studio extensions to the latest version (which is the same) through the Visual Studio Extension Manager.



For Visual Studio 2008 you need to upgrade all Telerik products with Visual Studio extensions to the same version using the Telerik Trial Web Installer or the Telerik Control Panel.

We are currently resolving the issue on our side so that no crashes happen in future releases. Please excuse the inconvenience caused.

Kind regards,
Petar Raykov
The Telerik team

Update:
As some customers reported issues resulting in being unable to perform the above procedure or it not helping in all cases we created a very simple tool for cleaning all Telerik VS Extensions older than our latest version.

You can find the patch attached to this post. Make sure you do not have any running Visual Studio instances when you run the tool.

Note: Running the patch will resolve all version-conflict-related issues (including Visual Studio crashes outlined in this post), but will leave you without VSExtensions in case you have not installed our latest version. The easiest way to get those back is just getting the extensions once more through the Visual Studio Online Gallery.
Chavdar Dimitrov
Telerik team
 answered on 25 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?