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

Hide all Databound columns when Form Template is in edit mode and Sort a column data from an external button outside of grid.

1 Answer 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
gc_0620
Top achievements
Rank 1
gc_0620 asked on 13 Jan 2016, 03:48 AM

Hi all,

Using VS 2013 with ASP.NET AJAX Q3 2015. Using below link as a prototype.

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultcs.aspx

I have a weird request from a user to hide all GridBoundColumn's while form is in edit mode..

Also I would like to sort the grid column (ex: LastName) from above link from an external button click event, that button should be outside RadGrid.

Below is code that put all rows in edit mode, it works. But  I need some help to hide GridBound columns.

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" CellSpacing="0" AllowMultiRowEdit="true"
 
        DataSourceID="SqlDataSource1" GridLines="None" Width="800px" AllowFilteringByColumn="True"
 
        EnableLinqExpressions="true" OnItemDataBound="RadGrid1_ItemDataBound" OnPreRender="RadGrid1_PreRender"
 
        OnItemCommand="RadGrid1_ItemCommand" Skin="Vista" AllowSorting="True">
 
   </telerik:RadGrid>
 
--------------------
    
   protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
                
        foreach (GridDataItem data in RadGrid1.MasterTableView.Items)
        {
            data.Edit = true;
        }
        RadGrid1.Rebind();
 
    }
    

Any help will be appreciated.

Thanks

gc_0620


1 Answer, 1 is accepted

Sort by
0
gc_0620
Top achievements
Rank 1
answered on 14 Jan 2016, 03:45 AM

Telerik, please close the ticket. User's Changed their mind to hide all GridBoundColumn's and Put the form in edit mode..

Unusual user request to begin with.

 

Sorry about that

gc_0620

Tags
Grid
Asked by
gc_0620
Top achievements
Rank 1
Answers by
gc_0620
Top achievements
Rank 1
Share this question
or