Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6336969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:09:43+00:00 2026-05-24T19:09:43+00:00

At this page, they’re showing this datagrid: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx I’d like add registries something like

  • 0

At this page, they’re showing this datagrid:

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx

I’d like add registries something like that:

enter image description here

Is it much difficult to show this UserControl when someone wants to add a new registry? How can I start?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:09:43+00:00Added an answer on May 24, 2026 at 7:09 pm

    You’re going to need to style the DataGrid control as a quick Google doesn’t reveal a method to just style the “New Item Placeholder”

    For help on this, you should check out this tutorial (there are four articles in total, and are all very informative)

    In the little demo app I wrote as a test-bed for this question, I created a new UserControl which inherited from the DataGrid class so that I could extend some of the functionality.

    On this class I added two new properties NewItemTemplate and IsAddingNewItem – IsAddingNewItem is true when you have selected that you want to add a new item, and the NewItemTemplate is visible only when that property is true.

    A very simple Style outline for this is below: (note: To save space, this is only an outline; This code will not actually compile)

            <Style TargetType="{x:Type controls:DataGrid}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type controls:DataGrid}">
                            <Border>
                                <ScrollViewer Name="DG_ScrollViewer">
                                    <ScrollViewer.Template>
                                        <ControlTemplate TargetType="{x:Type ScrollViewer}">
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto"/>
                                                    <RowDefinition Height="Auto"/>
                                                    <RowDefinition Height="*"/>
                                                    <RowDefinition Height="Auto"/>
                                                    <RowDefinition Height="Auto"/>
                                                </Grid.RowDefinitions>
    
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto"/>
                                                    <ColumnDefinition Width="*"/>
                                                    <ColumnDefinition Width="Auto"/>
                                                </Grid.ColumnDefinitions>
    
                                                <!--Left Column Header Corner -->
                                                <Button Command="{x:Static controls:DataGrid.SelectAllCommand}" />
    
                                                <!--Column Headers-->
                                                <Primitives:DataGridColumnHeadersPresenter Grid.Column="1" Name="PART_ColumnHeadersPresenter" />
    
                                                <!--New Item Placeholder-->
                                                <ContentPresenter Grid.Column="1" Grid.Row="1" Content="{Binding Path=NewItemInstance, RelativeSource={RelativeSource AncestorType={x:Type controls:DataGrid}}}" ContentTemplate="{Binding Path=NewItemTemplate, RelativeSource={RelativeSource AncestorType={x:Type controls:DataGrid}}}" Visibility="{Binding Path=IsAddingItem, Converter={StaticResource booleanToVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type controls:DataGrid}}}" />
    
                                                <!--DataGrid content-->
                                                <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="2" Grid.ColumnSpan="2" CanContentScroll="{TemplateBinding CanContentScroll}" />
    
                                                <ScrollBar Grid.Row="0" Grid.RowSpan="4" Grid.Column="2" Name="PART_VerticalScrollBar" Orientation="Vertical" />
    
                                                <ToggleButton IsChecked="{Binding Path=IsAddingItem, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type controls:DataGrid}}}" Content="Add Item" Grid.Row="3" />
    
                                                <Grid Grid.Row="4" Grid.Column="1">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type controls:DataGrid}}, Path=NonFrozenColumnsViewportHorizontalOffset}"/>
                                                        <ColumnDefinition Width="*"/>
                                                    </Grid.ColumnDefinitions>
    
                                                    <ScrollBar Grid.Column="1" Name="PART_HorizontalScrollBar" />
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                    </ScrollViewer.Template>
    
                                    <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                </ScrollViewer>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
    

    The two parts on this example you should focus on are the ContentPresenter under “<!--New Item Placeholder-->” comment and the Toggle button a few lines below it.

    This styles the DataGrid so that it is displayed in 4 rows, “Column Headers”, “New Item Placeholder”, “DataGrid Rows”, and the “Add new item button” – All surrounded by scroll bars.

    Then, in using this control (you will need to use the custom control like <controls:DataGrid ... /> and set the NewItemTemplate property like that in your example (you should also be able to reuse that template in the RowDetails template for the editing of the individual items to ensure the same look and feel throughout).

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm watching at this page: http://leeontech.wordpress.com/2010/02/01/summary-row-in-datagrid/ But they're using silverlight. I'm trying to create
So anytime someone visits this page: http://www.site.com/page/image_(.*).png They get redirected to the cdn url,
On this page there are many abbreviation / acronym entries: http://abbreviations.wordcrow.com/acronyms/D/ They are generated
How did they made this page? http://www.youtube.com/wariolandshakeit2008 If anyone has a tutorial on how
This page http://winteradagency.com/Arvin/incentives/lenders.htm looks good in all browsers except IE6. The thing that is
If you visit this page: http://basecamphq.com/tour/ and click on the tour left hand side
Have a look at the menus on this page: http://www.pieterdedecker.be/labs/vspwpg/?page_id=96 They look okay in
I have a page that has 3 variables. They look like this: String[] Headers
I just read the Wikipedia page about Bucket sort . In this article they
This page uses Drupals contact form to send emails: http://www.westlake.school.nz/contact Problem is, the school

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.