This is a migrated thread and some comments may be shown as answers.

[Solved] Popup and textbox in a grid

0 Answers 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nicolas
Top achievements
Rank 1
Nicolas asked on 24 Mar 2011, 02:58 PM
I am using a textbox next to an image. When i click on the image a popup opens in which there is a grid. I need to select an element of this grid and display its name in the main grid textbox. How Can I do this please?

    <%= Html.Telerik().Grid<CustomEntity>()
            .Name("Grid_Customentity")
            .DataKeys(keys =>
            {
                keys.Add(p => p.IdEntity).RouteKey("idEntity");
            })
            .ToolBar(commands =>
            {
                commands.Insert().ButtonType(GridButtonType.Text);
            })
            .DataBinding(dataBinding =>
            {
                dataBinding.Ajax()
                    .Insert("_InsertContentAjax", "Gridl", new { IdEntity = Model.IdEntity })
                    .Update("_UpdateContentAjax", "Grid")
                    .Delete("_InsertAjaxEditing", "Grid");
            })
            .Columns(columns =>
            {
                columns.Bound(item => item.IdEntity).Width(20);
                columns.Bound(item => item.Description).ClientTemplate(
                    "<input id'InputText_Description' type='text' disabled='true' readonly='true' value='<#= Description #>' />"
                    + "<a href=\"#\" onclick=\"javascript:OpenModalPopUp()\" ><img src=\"/Content/Images/IcoEditer.jpg\" alt=\"\" title=\"\" /></a>"
                    ).ReadOnly(true).Title("Description").Width(200);
                columns.Command(commands =>
                {
                    commands.Edit().ButtonType(GridButtonType.Image);
                    commands.Delete().ButtonType(GridButtonType.Image);
                }).Width(180).Title("Commands");
 
            })
        .Pageable()
        .Scrollable()
        .Sortable()
.ClientEvents(events => events
                .OnEdit("OnEdit")
                .OnError("OnError")
    )           
    %>


Thanks.
Tags
Grid
Asked by
Nicolas
Top achievements
Rank 1
Share this question
or