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

Removing "Click here to add new row"

11 Answers 580 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 11 Sep 2008, 01:56 PM
I've looked around, but I can't seem to find either a text property to change the text, or a property to just hide the auto-created "Click here to add new row" Row in an empty GridView.

I'm using a RadGridView control to display data that comes from a hand held scanner and is created on the fly.  Because of this, I have no data source for the grid, I just define the columns and use AddRow() to display my data. The grid also allows editing of the data in the gird before saving.

Is there a way to turn this off?


11 Answers, 1 is accepted

Sort by
0
Accepted
Nick
Telerik team
answered on 12 Sep 2008, 04:20 PM
Hi Christopher,

Thank you for the questions.

In order to turn off the new row visual element, you should set AllowAddNewRow property of MasterGridViewTemplate to false from either the property grid in Visual Studio or programmatically as shown below:
 
this.radGridView1.MasterGridViewTemplate.AllowAddNewRow = false

If you want to change add new row default text, please refer to the following knowledge base article - RadGridView Localization.

Feel free to contact me, if you have any further questions.

Best wishes,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Christopher
Top achievements
Rank 1
answered on 12 Sep 2008, 04:52 PM
Thanks for the response.  I actually fiured this out earlier today.  I was under the impression that you had to have that property turned on in order to add rows properly.

I'm still very new to the Telerik Controls as I'm sure you can guess.
0
Santiago
Top achievements
Rank 1
answered on 12 Jan 2009, 11:34 AM
Sorry, but I don't understand the code sample.
I mean, which property of radgrid has localization values?? which is the necessary namespace to implement RedGridLocalizationSettings??

Thanks.
0
Ramius
Top achievements
Rank 1
answered on 12 Jan 2009, 02:11 PM
Hello Santiago,

the necessary namespace to implement RadGridLocalizationSettings is:

 Telerik.WinControls.UI.Localization

Greetings,

Ramius
0
Nick
Telerik team
answered on 12 Jan 2009, 03:44 PM
Hi Santiago,

Thank you for sharing your knowledge with the community, Ramius.

I would like to give a link to a documentation topic about localization which may be useful too.

Sincerely yours,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Santiago
Top achievements
Rank 1
answered on 12 Jan 2009, 03:57 PM
Yes but, I don't know why I dont have these assembly. In Telerik.WinControls.UI I have only is

Design, Grid, Layouts, Menu, Multimedia, properties and tabstriip. I am using telerik radcontrols for winforms q2 2007.
0
Nick
Telerik team
answered on 13 Jan 2009, 04:44 PM
Hello Santiago,

You need the following four assemblies to use RadGridView: TelerikCommon, Telerik.WinControls, Telerik.WinControls.UI, Telerik.WinControls.GridView. So you need Telerik.WinControls.GridView assembly reference in your application too.

Unrelated to your question, you are using a very old version of our controls so you lack a lot of improvements and fixes. We are going to release a new version this month - Q3 2008 SP2. I strongly suggest that you consider upgrading. We are going to help you in the upgrade process.

Greetings,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Praveen
Top achievements
Rank 1
answered on 03 Jun 2009, 11:31 AM

hi ,

I am facing problem with "Allowaddnewrow" is set to true,the thing is when i click on Perticular cell
and Press Enter ,Empty Value Cell(row) is Adding at last in the radgridview,so i dont want to add that
like that,can u suggest me...............

0
Nick
Telerik team
answered on 03 Jun 2009, 11:44 AM
Hi Praveen,

Thank you for contacting us. Unfortunately, I cannot understand completely your scenario. Perhaps you need DefaultValuesNeeded event to set default values for some (all) of your cells when you add a new row.

Sincerely yours,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Praveen
Top achievements
Rank 1
answered on 03 Jun 2009, 12:11 PM

When "Allowaddnewrow" is set to true,

i have two Cells in RADGRIDVIEW,one  radcheckbox and other cell is  radtextbox,
when i enter some thing in radtextbox and press enter,the newly enter value will be added as row at last in radgridview
its ok,
now if i dont enter any thing in that Cell and Press Enter that Empty Cell is added
at last as a row.....i dont want to happen like that...

,can u suggest me what i have to do...............

0
Nick
Telerik team
answered on 05 Jun 2009, 11:54 AM
Hello Praveen,

We cannot reproduce the problem. Please download the latest trial version of our controls and write us back if the issue persists.

Sincerely yours,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Christopher
Top achievements
Rank 1
Answers by
Nick
Telerik team
Christopher
Top achievements
Rank 1
Santiago
Top achievements
Rank 1
Ramius
Top achievements
Rank 1
Praveen
Top achievements
Rank 1
Share this question
or