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

[Solved] How to take invisible columns from RadGridview and RadCombo in latest version of Telerik controls

1 Answer 133 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
lakshmi jeeva
Top achievements
Rank 1
lakshmi jeeva asked on 12 Jan 2010, 05:15 AM
Hi ,

    We have upgraded latest version. We are having some invisible columns in radgridview.We want to hide some of columns in GridView.When we click a cell we have to take those invisible columns.In previous version we have taken in CellEdit_Ended event.But in latest version we cant able to take those invisible columns. We have tried in Selectionchnaged,RowEdit_Ended event of grid too. But we cant get the invisible columns. How to take invisible column values of row when we click a cell in that row?

     We are facing same problem in RadCOmbo.Below is the definition of Gridview.I want to take the supplyno when i click a particular cell.How can i accomplish this?

    

  <telerikNavigation:RadTabItem x:Name="tabitmSupplies" Header="Supplies" Tag="10" Height="25" FontSize="12" >
            <telerikGrid:RadGridView x:Name="grdSupplies" AutoGenerateColumns="False" Grid.Row="2" Margin="7,10,7,7" ShowColumnFooters="False"
               RowIndicatorVisibility="Collapsed" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible"
               ScrollMode="RealTime" ShowGroupPanel="False" >

               <telerikGrid:RadGridView.Columns>
                  <telerikGrid:GridViewDataColumn Header="Supplies Need" DataMemberBinding="{Binding ProductNo}"  Width="140" TextWrapping="Wrap" />
                  <telerikGrid:GridViewDataColumn Header="Quantity Per Store" DataMemberBinding="{Binding Qty}" Width="150" TextWrapping="Wrap" />                  
                  <telerikGrid:GridViewDataColumn Header="JobSupplyNo"  DataMemberBinding="{Binding JobSupplyNo}" IsVisible="False"   Width="0" TextWrapping="Wrap" />
               </telerikGrid:RadGridView.Columns>     
            </telerikGrid:RadGridView>
         </telerikNavigation:RadTabItem>

Regards
Lakshmi

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 14 Jan 2010, 12:48 PM
Hello lakshmi jeeva,

You cannot get cells from invisible columns, since these cells are not created at all (due to horizontal UI virtualization). You have two options either to use business object in order to get the appropriate value or disable horizontal virtualization. You can get business object from GridViewCell instance with a code like this:

MyBusinessObject instance = GridViewCell.DataContext as MyBusinessObject;

Setting RadGridView.EnableColumnVirtualization to false will stop horizontal virtualization.

Kind regards,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
lakshmi jeeva
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or