Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
323 views
Hi !

I have to set a javascript function on a radcombobox server-side. I tried that (on the load of the page) :

cmb_Pager.Attributes.Add("onchange""Pager_ChangePageSize('" + cmb_Pager.ClientID + "', '" + Grid.ClientID + "')"); 

but it does'nt work in IE because the input of the combobox does'nt get the "onchange" attribute (it works perfectly in FireFox ...).

After a little search, I also tried that (on the load of the combobox) :

this.Page.ClientScript.RegisterStartupScript(cmb_Pager.GetType(), 
                                    "blabla"
                                    ";$get('" + cmb_Pager.ClientID + "_Input').onchange=function CallMethod(){Pager_ChangePageSize('" + cmb_Pager.ClientID + "', '" + Grid.ClientID + "');};",  
                                    true); 

this time, it works on FF3 and IE7, but the "onchange" event is only fired one time for both browser.

Is there a way to set correctly in FF3 and IE7 the "onchange" of the input of the combobox ??

Thanks a lot !


Doncho
Telerik team
 answered on 18 Jan 2021
1 answer
84 views

HI,

 

I am having Telerik Radgrid which load 250 people monthly roster data i.e 31 columns.

After loading the 250 records on Radgrid it slowdown in Internet Explorer Version 11.

its slow down the complete page and page become unresponsive and due to which other

functionality of the page get block. 

any suggestions to overcome this issue.

Vessy
Telerik team
 answered on 18 Jan 2021
1 answer
157 views

Hi, I hope you can help me solve this question. How can I filter in RadSearchBox to find the data in the grid and later the data that is relevant in the search will be displayed? I have looked for examples but I do not understand well how they work, I hope you can explain me.

This is my code

<telerik:RadToolBar ID="rtlbMenuPrincipal" runat="server" Height="32" Width="100%" OnClientButtonClicking="validarrtlbMenuPrincipal" AutoPostBack="true">
            <Items>
                <telerik:RadToolBarButton Enabled="true" Value="1" ImageUrl="Imagenes/Botoneras/New.png" ToolTip="Nuevo" />
                <telerik:RadToolBarButton Enabled="true" Value="2" ImageUrl="Imagenes/Botoneras/Edit.png" ToolTip="Editar" />
                <telerik:RadToolBarButton Enabled="true" Value="3" ImageUrl="Imagenes/Desarrollador/Print - 01.png" ToolTip="Imprimir" />
                <telerik:RadToolBarButton Enabled="true" Value="4" ImageUrl="Imagenes/Desarrollador/Mail.png" ToolTip="Enviar a Prueba" />
                <telerik:RadToolBarButton Enabled="true" Value="5" ImageUrl="Imagenes/Desarrollador/Lock.png" ToolTip="Cerrar prueba" />
                 
                <telerik:RadToolBarButton runat="server" Enabled="true">
                    <ItemTemplate>                   
                        <telerik:RadSearchBox runat="server" ID="RadSearch" Filter="Contains" Width="20%" EmptyMessage="Search" CssClass="Caja"
                            DataValueField="IdPrueba"
                            DataTextField="PruebaTitulo"
                            DataSourceID="SqlDataSource1"   >                                               
                            <DropDownSettings Height="400" Width="300" />
                        </telerik:RadSearchBox>
                    </ItemTemplate>
                </telerik:RadToolBarButton>
            </Items>
        </telerik:RadToolBar>
 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="<%$ ConnectionStrings:dbProcesoDesarrolloConnectionString %>"
    SelectCommand="SELECT * FROM [P_Pruebas]">
</asp:SqlDataSource>
 
        <telerik:RadGrid ID="rgrdPruebaDesarrolladores" runat="server" AutoGenerateColumns="false" AllowPaging="true" PageSize="10" data-grupovalidar="gPruebaDesarrollador" data-tipovalidador="rgrdselmult" datgridDataSourcea-msgvalidar="Seleccione un Sistema" data-nombrecampo="Seleccione un Sistema" data-placement="left">
            <MasterTableView DataKeyNames="IdPrueba">
                <Columns>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="True"  DataField="Nombre_Sistema" HeaderStyle-HorizontalAlign="Center" HeaderText="Sistema"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="True" DataField="PruebaTitulo" HeaderStyle-HorizontalAlign="Center" HeaderText="Titulo"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="True"  DataField="Nombre" HeaderStyle-HorizontalAlign="Center" HeaderText="Responsable"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="True" DataField="FechaPrueba" HeaderStyle-HorizontalAlign="Center" HeaderText="Fecha"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="True"  DataField="PruebaModalidad" HeaderStyle-HorizontalAlign="Center" HeaderText="Tipo Modalidad"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="True" DataField="PruebaStatus" HeaderStyle-HorizontalAlign="Center" HeaderText="Status"></telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="True"></Selecting>
                <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="345px" />
            </ClientSettings>
            <PagerStyle AlwaysVisible="true" Mode="Slider" />
        </telerik:RadGrid>
 
        <asp:SqlDataSource ID="gridDataSource" runat="server" connectionString="Data Source=JJVICTORIO;Initial Catalog=dbProcesoDesarrollo;Integrated Security=True"
           SelectCommand="SELECT TOP 10 [IdPrueba], [PruebaTitulo] FROM [P_Pruebas]"></asp:SqlDataSource>

 

Protected Sub RadSearch_Search(sender As Object, e As SearchBoxEventArgs)
        Dim searchBox As RadSearchBox = DirectCast(sender, RadSearchBox)
        Dim IdPrueba As String = String.Empty
 
        If e.DataItem IsNot Nothing Then
            IdPrueba = DirectCast(e.DataItem, Dictionary(Of String, Object))("IdPrueba").ToString()
 
            If Not String.IsNullOrEmpty(IdPrueba) Then
                'rgrdPruebaDesarrolladores.MasterTableView.Rebind()
                Dim likeCondition As String = If(searchBox.Filter = SearchBoxFilter.Contains, "'%'", "")
                gridDataSource.SelectParameters.Clear()
                gridDataSource.SelectParameters.Add("IdPrueba", (CType(e.DataItem, Dictionary(Of String, Object)))("IdPrueba").ToString())
                gridDataSource.SelectCommand = "SELECT TOP 1 [Nombre_Sistema], [PruebaTitulo], [Nombre], [FechaPrueba], [PruebaModalidad], [PruebaStatus]  FROM [P_Pruebas] WHERE [IdPrueba] LIKE " & likeCondition & " + @IdPrueba"
            End If
        End If
    End Sub
 

I wanted to do something similar to this example but I don't know if it can be done with Telerik

https://datatables.net/

Attila Antal
Telerik team
 answered on 15 Jan 2021
27 answers
973 views

Hi..

I used the ThemeBuilder, but when I apply the new Theme the Calendar icon is missing from the input text.

The same happens with other controls when a custom theme is applied.

Where is the Calendar Icon ?  How do I apply it?

thx

M Kumar
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 15 Jan 2021
4 answers
3.3K+ views

This is my data on datasource-

COMPANYID CATEGORYID COMPANYNAME CATEGORYNAME
687d6bf7 103b9297 a123 abc
687d6bf7 6903d527 a123 xyz

This is my code-

<

 

telerik:RadTreeView ID="RadTreeView1" runat="server" DataSourceID="ObjectDataSourceCompany"

 

 

DataTextField="COMPANYNAME" DataFieldID="CATEGORYID" DataFieldParentID="COMPANYID"

 

 

DataValueField="CATEGORYID">

 

 

</telerik:RadTreeView>

This is the Error-

 

This constraint cannot be enabled as not all values have corresponding parent values.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: This constraint cannot be enabled as not all values have corresponding parent values.

Did I miss anything...How do i fix this??

Peter Milchev
Telerik team
 answered on 14 Jan 2021
1 answer
223 views

I am relatively new to RadGrid and have run into a situation when editing a record in the grid. I am able to get text values in with no issue but when trying to create a dropdown list and set it's selected value to the value from the row selected I get the following error:

 

" 'ddlEmpType' has a SelectedValue which is invalid because it does not exist in the list of items. "

I'm not sure where my code is wrong. Here is a snippet:

 

<EditFormSettings EditFormType="Template">
                                    <FormTemplate>
                                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                                            style="border-collapse: collapse;">
                                            <tr class="EditFormHeader">
                                                <td colspan="2">
                                                    <b>Employee Details</b>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <table id="Table3" width="450px" border="0" class="module">
                                                        <tr>
                                                            <td>Employee ID:</td>
                                                            <td>
                                                                <asp:TextBox ID="tbEmployeeID" runat="server" Text='<%# Bind("IDNUM") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>Last Name:</td>
                                                            <td>
                                                                <asp:TextBox ID="tbLastName" runat="server" Text='<%# Bind("LASTNAME") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>First Name:</td>
                                                            <td>
                                                                <asp:TextBox ID="tbFirstName" runat="server" Text='<%# Bind("FIRSTNAME") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>Employee Type:</td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlEmpType" runat="server" SelectedValue='<%# Bind("EMP_TYPE") %>'
                                                                    DataSourceID="SQL_EmpType" AppendDataBoundItems="True">
                                                                    <asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>                                                        
                                                    </table>
                                                </td>                                
                                            </tr>
                                            <tr>
                                                <td colspan="2"></td>
                                            </tr>
                                            <tr>
                                                <td></td>
                                                <td></td>
                                            </tr>
                                            <tr>
                                                <td align="right" colspan="2">
                                                    <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update"></asp:Button>&nbsp;
                                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
                                                </td>
                                            </tr>
                                        </table>
                                    </FormTemplate>
                                </EditFormSettings>

 

The datasource is set up as follows:

<asp:SqlDataSource ID="SQL_EmpType" runat="server" ConnectionString="<%$ ConnectionStrings:TECU_WS %>" 
     SelectCommand="SELECT DISTINCT EMP_TYPE FROM vwGetEmployees v WHERE ACTIVESTATUS is not NULL">  
</asp:SqlDataSource>

Hopefully this is enough information to go on.

Doncho
Telerik team
 answered on 13 Jan 2021
1 answer
177 views

I am fairly new to telerik and web forms but I have a page with a RadGrid and separate button for the export. When I click on the export button I get an ArgumentOutOfRangeException. I set export settings on the RadGrid as follows 

<ExportSettings
      IgnorePaging="true"
      ExportOnlyData="true"
      Excel-Format="Xlsx"
      OpenInNewWindow="true">
ExportSettings>

For the export button:

protected void rbtnExport_Click(object sender, EventArgs e)

{
            rgBidActivity.ExportSettings.FileName = "BidActivity";
            rgBidActivity.MasterTableView.ExportToExcel();
}

 

So I am not sure what exactly is causing the error in the attached image. Any suggetions?

 

Attila Antal
Telerik team
 answered on 13 Jan 2021
7 answers
234 views
I have a dropdownlist and when the user selects a certain item i would like to open up the radwindow.
I have the following

protected

 

 

void ddlSentencing_SelectedIndexChanged(object sender, EventArgs e)

 

{

 

 

 

    if (selectedVal == 2 || selectedVal == 3)

 

    {

        ddlSentencing.Attributes.Add(

 

"onclick", "openRadWinNew(); return false;");

 

    }

}

 

 

function openRadWinNew() {

 

 

 

var url = "Dialog.aspx";

 

 

 

var oWnd = radopen(url, "ResponsePopup").setSize(500, 300)

 

}

it works but always only on second click, one step behind. Can ypu please help me fix this?

Thanks

Attila Antal
Telerik team
 answered on 13 Jan 2021
1 answer
118 views

I have a radgrid that has X number of rows. On grid export item command, would it be possible to use a different datasource with Y number of rows(which is > x rows in the grid) that can be saved when exporting?

 

Thanks

Anitha

Attila Antal
Telerik team
 answered on 13 Jan 2021
3 answers
1.4K+ views

Hello,

I wonder if you have bootstrap themes to use in my projects?

 

 

Vessy
Telerik team
 answered on 13 Jan 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?