Asp Dot Net Notes for Web Masters RSS 2.0

# Sunday, May 31, 2009

Radgrid;  Add New Record Button not visible

The first time you use RadGrid you may spend a lot of time trying to work out how to display the Add New Record Button. I had to search for ages to find out what to do to display the Add New Record Button.

The property you need to set is the CommandItemDisplay of the MasterTableView property.

In Visual Studio you can edit the properties of the RadGrid in the property editor window. Select the RadGrid on your page, and then find the property called MasterTableView and its child property CommandItemDisplay.  Now select one of the drop down options: None, Top, Bottom , TopAndBottom.  Like magic the Add new button appears.

Remember to set AllowAutomaticInserts to true if you are not writing your own insert code.

 The MasterTableView code that may look something like this, notice the property CommantItemDisplay="Top":

<MasterTableView DataKeyNames="PriceTypeID" 
        DataSourceID="PriceType_LinqDataSource" CommandItemDisplay="Top">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="PriceType" HeaderText="PriceType" 
            SortExpression="PriceType" UniqueName="PriceType">
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>

Sunday, May 31, 2009 2:04:38 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] - Trackback
Controls
Tracked by:
"http://www.google.com/search?q=vrylpyhx" (http://www.google.com/search?q=vrylpy... [Pingback]
All comments require the approval of the site owner before being displayed.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
Archive
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
I do I.T. Ltd.
Sign In
Statistics
Total Posts: 27
This Year: 0
This Month: 0
This Week: 0
Comments: 22
All Content © 2012, I do I.T. Ltd.