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

Empty RadGrid Shows No Columns

2 Answers 206 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeremy Yoder
Top achievements
Rank 1
Jeremy Yoder asked on 30 Mar 2010, 07:07 PM

I want to create a RadGrid to use like a spreadsheet, where users can fill in the cells, add rows, and delete rows. We're doing that now with an Infragistics grid, which I want to replace. I've attached a pic of what it looks like, which I now want to do with a RadGrid (but with a comboxbox in the "Cost Center" field now).

After I created the columns, I ran the webpage, but the grid is blank -- it doesn't even show the column headers. All I want is an empty row for the user to enter values into (like my attached pic shows) after which they can add or delete rows. (I'll save/load the data into the grid later.)

My RadGrid is defined below, with various ColumnType and DataTypes. But when I run it, there's no grid on the page. What am I missing? Or is RadGrid meant only for display purposes? I found none of your demos allow the spreadsheet-like editing of cells, so am I using the wrong control?

 

 

        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None">  
            <HeaderContextMenu EnableAutoScroll="True">  
            </HeaderContextMenu> 
            <MasterTableView> 
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridCheckBoxColumn DataType="System.Boolean" HeaderText="Print" UniqueName="Print">  
                    </telerik:GridCheckBoxColumn> 
                    <telerik:GridCheckBoxColumn DataType="System.Boolean" HeaderText="Post" UniqueName="Post">  
                    </telerik:GridCheckBoxColumn> 
                    <telerik:GridBoundColumn HeaderText="Account Number" UniqueName="Account Number">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn HeaderText="Detail Description" UniqueName="Detail Description">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridDropDownColumn HeaderText="Cost Center" UniqueName="Cost Center">  
                    </telerik:GridDropDownColumn> 
                    <telerik:GridNumericColumn DataType="System.Decimal" HeaderText="Quantity" UniqueName="Quantity">  
                    </telerik:GridNumericColumn> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Foenix
Top achievements
Rank 1
answered on 30 Mar 2010, 08:15 PM
No, you can't use RadGrid like a spreadsheet, but you still can add, edit and delete records. It's not easy to explain all existing possibilities, so I'd suggest you to check RadGrid demo at http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx (Insert/Update/Delete section). The fastest and easiest way is to use Automatic Operations
0
Jeremy Yoder
Top achievements
Rank 1
answered on 30 Mar 2010, 10:51 PM

Interesting. Well, I guess that answers that. Maybe we'll have to stick with Infragistics for our edit grids... that'd be unfortunate.

Thanks for directing me to those demos -- I had not seen those. I'm surprised Telerik has no spreadsheet, but good to know. Thanks.
Tags
Grid
Asked by
Jeremy Yoder
Top achievements
Rank 1
Answers by
Foenix
Top achievements
Rank 1
Jeremy Yoder
Top achievements
Rank 1
Share this question
or