Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
297 views
I am trying to increase the number of rows available in the RadGrid control.  No matter the setting I touch like pagesize or height, the grid only displays the same number of rows.  5 rows if  RenderMode="lightweight" and 7 if RenderMode="Classic". It seems like the display height is fixed to around 350px.  If I increase the height to 1000px, the display of the grid only uses the first 350px.  At one point, I turned off "something" and the full 1000px was used, but it was still the same 5/7 rows.  Just distributed over a 1000px field.
Philip
Top achievements
Rank 1
 asked on 29 Apr 2018
2 answers
155 views

Example:
I am binding a data source with below text and value field
DataTextField="FruitName"
DataValueField="FruitId"

on selection of fruits i can get selected item text as below but i am not able to get selected item id.
AutoCompleteBox.Text

This is an issue, please let me know how to get selected item id.
It should provide id's for multiple selected items also.

 

--

Jagadish

Anas
Top achievements
Rank 1
 answered on 28 Apr 2018
0 answers
309 views

In an Edit Form Template of a RadGrid, I have a LinkButton and when that control is pressed a RadWindow is shown, that RadWindow has another RadGrid with a Select column, when the user presses that column, the system must take the value of another column and return it to a RadTextbox of the parent RadGrid.

This is my current code, but it does not work, I can not find the RadTextbox of the RadGrid parent.

<telerik:RadGrid ID="RgvUsuario" runat="server" RenderMode="Lightweight" AllowSorting="true" AutoGenerateColumns="false" AllowPaging="true" PageSize="10"
                OnNeedDataSource="RgvUsuario_NeedDataSource" OnItemDataBound="RgvUsuario_ItemDataBound">
                <MasterTableView DataKeyNames="Id" CommandItemDisplay="Top" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="Center">
                    <CommandItemSettings AddNewRecordText="Nuevo" ShowRefreshButton="false" />
                    <PagerStyle AlwaysVisible="true" />
                    <Columns>
                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" EditText="Editar"></telerik:GridEditCommandColumn>
 
                        <telerik:GridBoundColumn DataField="Id" HeaderText="Id Usuario" UniqueName="Id"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="IdCliente" HeaderText="Id Cliente" UniqueName="IdCliente"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Nombre" HeaderText="Nombre" UniqueName="Nombre"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Apellido1" HeaderText="Apellido 1" UniqueName="Apellido1"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Apellido2" HeaderText="Apellido 2" UniqueName="Apellido2"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" UniqueName="UserName"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Identificacion.Numero" HeaderText="Identificación" UniqueName="Identificacion.Numero"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Telefono.NumTelefono" HeaderText="Teléfono" UniqueName="Telefono.NumTelefono"></telerik:GridBoundColumn>
                        <telerik:GridCheckBoxColumn DataField="IsActivo" HeaderText="Estado" UniqueName="IsActivo"></telerik:GridCheckBoxColumn>
 
                        <telerik:GridButtonColumn ConfirmText="¿Eliminar registro?" ConfirmDialogType="RadWindow" ButtonType="ImageButton"
                            ConfirmTitle="Mantenimiento de Usuarios" CommandName="Delete" Text="Eliminar" UniqueName="DeleteColumn">
                        </telerik:GridButtonColumn>
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <FormTemplate>
                            <table class="grid-edit-form">
                                <tr>
                                    <td colspan="6"><span class="negrita">Detalle del Usuario</span></td>
                                </tr>
 
                                <%--Fila 1--%>
                                <tr>
                                    <%--Columna 1--%>
                                    <td>Id Cliente</td>
                                    <td>
                                        <telerik:RadTextBox ID="txtIdCliente" Text='<%# Eval("IdCliente") %>' runat="server"></telerik:RadTextBox>
                                        <br />
                                        <asp:LinkButton ID="LnkBtnBuscarCliente" runat="server" ToolTip="Buscar Cliente" OnClick="LnkBtnBuscarCliente_Click">Buscar Cliente</asp:LinkButton>
                                    </td>
 
                                    <%--Columna 2--%>
                                    <td>Nombre</td>
                                    <td>
                                        <telerik:RadTextBox ID="txtNombre" Text='<%# Eval("Nombre") %>' runat="server" MaxLength="100"></telerik:RadTextBox>
                                    </td>
 
                                    <%--Columna 3--%>
                                    <td>Apellido 1</td>
                                    <td>
                                        <telerik:RadTextBox ID="Apellido1" Text='<%# Eval("Apellido1") %>' runat="server" MaxLength="100"></telerik:RadTextBox>
                                    </td>
                                </tr>
 
                                <tr>
                                    <%--Columna 1--%>
                                    <td colspan="2"> </td>
 
                                    <%--Columna 2--%>
                                    <td colspan="2"> </td>
 
                                    <%--Columna 3--%>
                                    <td colspan="2" class="derecha">
                                        <telerik:RadButton ID="btnAgregar" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Agregar" : "Modificar" %>' CommandName="Update"
                                            RenderMode="Lightweight" EnableEmbeddedSkins="false" Width="100px" Height="40px">
                                        </telerik:RadButton>
                                          
                                        <telerik:RadButton ID="RbtnCancelar" runat="server" Text="Cancelar" CausesValidation="false" CommandName="Cancel" RenderMode="Lightweight"
                                            EnableEmbeddedSkins="false" Width="100px" Height="40px">
                                        </telerik:RadButton>
                                    </td>
                                </tr>
                            </table>
                        </FormTemplate>
                    </EditFormSettings>
                </MasterTableView>
                <ClientSettings AllowKeyboardNavigation="true" EnableRowHoverStyle="true">
                    <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
                </ClientSettings>
            </telerik:RadGrid>
             
<telerik:RadWindow RenderMode="Lightweight" ID="RwBuscarCliente" runat="server" OpenerElementID="RgvUsuario" Title="Búsqueda de Datos"
        CenterIfModal="true" Modal="true" OffsetElementID="main" Height="400px" Behaviors="Close" Width="800px" EnableShadow="true">
        <ContentTemplate>
            <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                <div class="ws-normal">
                    <telerik:RadGrid ID="gdvCliente" runat="server" RenderMode="Lightweight" AllowSorting="true" AutoGenerateColumns="false" AllowPaging="true" PageSize="10"
                        OnNeedDataSource="gdvCliente_NeedDataSource" OnItemCommand="gdvCliente_ItemCommand">
                        <MasterTableView DataKeyNames="Id" CommandItemDisplay="None" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Justify" AlternatingItemStyle-HorizontalAlign="Justify">
                            <PagerStyle AlwaysVisible="true" />
                            <Columns>
                                <telerik:GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="Id"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Nombre" HeaderText="Nombre" UniqueName="Nombre"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="NombreComercial" HeaderText="Nombre Comercial" UniqueName="NombreComercial"></telerik:GridBoundColumn>
                                 
                                <telerik:GridButtonColumn Text="Selecccionar" UniqueName="SelectColumn" CommandName="Select" ButtonType="LinkButton"></telerik:GridButtonColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings AllowKeyboardNavigation="true" EnableRowHoverStyle="true"></ClientSettings>
                    </telerik:RadGrid>
                </div>
            </telerik:RadAjaxPanel>
        </ContentTemplate>
    </telerik:RadWindow>
private string Fila
        {
            get { return (string)ViewState["Fila"]; }
            set { ViewState["Fila"] = value; }
        }
 
protected void LnkBtnBuscarCliente_Click(object sender, EventArgs e)
        {
            CargarGridCliente(); <-- Load the information in the RadGrid of the RadWindow
             
            RwBuscarCliente.VisibleOnPageLoad = true;
 
            GridEditableItem edit = (GridEditableItem)((LinkButton)sender).NamingContainer;
            this.Fila = edit.ItemIndex.ToString();
        }
         
protected void gdvCliente_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName.Equals("Select"))
            {
                GridDataItem item = (GridDataItem)e.Item;
                string idCliente = item["Id"].Text;
 
 
                int currentIndex = Convert.ToInt16(this.Fila);
                GridEditFormItem form = RgvUsuario.Items[currentIndex].EditFormItem;
                RadTextBox txtIdCliente = form.FindControl("txtIdCliente") as RadTextBox;
                 
                txtIdCliente.Text = idCliente;
 
                RwBuscarCliente.VisibleOnPageLoad = false;
            }
        }
Alonso
Top achievements
Rank 1
 asked on 27 Apr 2018
0 answers
145 views

I have a sharepoint 2010 site in which we have the NavDDL dropdwon on multiple pages. These dropdowns are tied to links list and navigate to another page when clicked on the menu item. The dropdown stops working once you navigate to other page after clicking on the dropdown item and come back to page.

 

This behavior is observed in chrom and Edge browser but not on IE. Please help. Any help appreciated.

SIDDHARTH
Top achievements
Rank 1
 asked on 27 Apr 2018
25 answers
998 views
I have a RadComboBox inside a RadPanel (ASP.NET)
I can click on the text area and the drop down appears, however if I click on the drop down button image, nothing happens.

Any ideas please ?

<telerik:RadComboBox ID="What" runat="server" Width="130px" OnClientSelectedIndexChanging="SelectedIndexChanging" TabIndex="1">

<Items>

<telerik:RadComboBoxItem runat="server" Text="Job Code" />

<telerik:RadComboBoxItem runat="server" Text="Job Title" />

<telerik:RadComboBoxItem runat="server" Text="Status" />

<telerik:RadComboBoxItem runat="server" Text="Tracking Number" />

</Items>

</telerik:RadComboBox>

SIDDHARTH
Top achievements
Rank 1
 answered on 27 Apr 2018
11 answers
431 views
In order to use the Rad toolbox I must run Visual Studio 2013 as Administrator. If I do not run as Administrator the Toolbox Rad items are all disabled. I do not normally run a Administrator for security reasons and needing the run Visual Studio as  Administrator is unacceptable.

Is there some setting to correct this problem or should I log a Ticket?
Vesko
Telerik team
 answered on 27 Apr 2018
1 answer
140 views

Each column has a set width by setting HeaderStyle-Width. for the Resizing i also have <Resizing AllowRowResize="False" AllowColumnResize="True" EnableRealTimeResize="True"
ResizeGridOnColumnResize="False" AllowResizeToFit="true"   ></Resizing>.

 

There is a certian column i have that is just a button and i would really like it be a certian width all the time whille all the other column adjust to the screen size (if screen is larger than the grid)

 

Is there a way to do this in telerik or is this a feature i would have to request?

Marin Bratanov
Telerik team
 answered on 27 Apr 2018
3 answers
892 views
var $ = $telerik.$;
 var spreadsheet = $find("<%= RadSpreadSheet1.ClientID %>");
spreadsheet.save();

 

 

This code is not working.  No error generated and the spreadsheet is never saved, tough saveAsExcel is working as advertised.

 

Any hint someone?

Marin Bratanov
Telerik team
 answered on 27 Apr 2018
0 answers
208 views

     Is it possible to set maximum upload file size for different file types?
For example - images (jpg, png etc) have max size for 1mb

and pdf files have max of 4mb?

 

Currently my setup is 

 

    <telerik:RadFileExplorer  ID="RadFileExplorer1" runat="server" DisplayUpFolderItem="True"  
                             Width="100%" AvailableFileListControls="All" VisibleControls="TreeView, Grid, Toolbar, ContextMenus">
        <Configuration SearchPatterns="*.jpg,*.png,*.bmp,*.jpeg,*.gif,*.tif,*.doc,*.docx,*.zip,*.pdf" MaxUploadFileSize="1024" ></Configuration>
    </telerik:RadFileExplorer>

Kevin Cabritit
Top achievements
Rank 1
 asked on 26 Apr 2018
2 answers
648 views

I am not sure what's wrong with save event in editmode=batch

  • when I click save, it doesn't fire RadGrid1_BatchEditCommand

    MasterTableView-CommandItemSettings-ShowSaveChangesButton="true" 

 

  • even if I change the button to commandtemplate

<telerik:RadPushButton runat="server" ID="SaveChangesButton" Text="儲存" OnClientClicked="saveChangesToGrid" AutoPostBack="false" CommandName="UpdateAll">
<Icon CssClass="rgSaveIcon" />
</telerik:RadPushButton>

 

I click save and then browser doesn't response error and C# event doesn't fired event handler method. I am sure it has executed 

 

following is my setting of grid:

<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" GridLines="Both" runat="server"
    OnItemCommand="RadGrid1_ItemCommand"
    OnItemDataBound="RadGrid1_ItemDataBound"
    OnNeedDataSource="RadGrid1_NeedDataSource"
    OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
    OnBatchEditCommand="RadGrid1_BatchEditCommand"
    OnPreRender="RadGrid1_PreRender"
    AutoGenerateColumns="False"
    AllowPaging="false"
    MasterTableView-HierarchyLoadMode="ServerBind"
    ClientSettings-AllowExpandCollapse="false"
    ClientSettings-EnablePostBackOnRowClick="false"
    MasterTableView-CommandItemSettings-ShowSaveChangesButton="true"
    MasterTableView-CommandItemSettings-ShowAddNewRecordButton="false"
    MasterTableView-CommandItemSettings-ShowCancelChangesButton="false"
    MasterTableView-CommandItemSettings-ShowRefreshButton="false"
    MasterTableView-CommandItemSettings-SaveChangesText="儲存"
    MasterTableView-HierarchyDefaultExpanded="false">
    <MasterTableView Name="Master"
        CommandItemDisplay="TopAndBottom"
        DataKeyNames="itemno"
        ClientDataKeyNames="itemno"
        EditMode="Batch"
        HorizontalAlign="NotSet"
        AutoGenerateColumns="False">
        <BatchEditingSettings EditType="Cell" SaveAllHierarchyLevels="true" />
         
        <DetailTables>
            <telerik:GridTableView DataKeyNames="itemno,seqno"
                AllowPaging="false"
                AllowAutomaticInserts="true"
                CommandItemDisplay="Top"
                 CommandItemSettings-AddNewRecordText="新增"
                CommandItemSettings-ShowAddNewRecordButton="true"
                CommandItemSettings-ShowCancelChangesButton="false"
                CommandItemSettings-ShowRefreshButton="false"
                CommandItemSettings-ShowSaveChangesButton="false" 
                EditMode="InPlace"
                Name="Details"
                Width="100%" runat="server" >
                <Columns>
                ......
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
 
        <Columns>
        ......
        </Columns>
        </MasterTableView>
    <ClientSettings AllowKeyboardNavigation="true"></ClientSettings>
</telerik:RadGrid>

 

Attila Antal
Telerik team
 answered on 26 Apr 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?