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

Show insert record when grid is empty

2 Answers 118 Views
GridView
This is a migrated thread and some comments may be shown as answers.
MGrassman
Top achievements
Rank 2
MGrassman asked on 27 Jan 2009, 04:33 AM
I'm trying to show the insert row when the grid has 0 records.

(rgTasks.FindNewRow() as GridViewNewRow).Visibility = Visibility.Visible;

I can't seem to get this to work.

Am I missing something.

I call this after the grids datasource is set.

Thanks,

2 Answers, 1 is accepted

Sort by
0
MGrassman
Top achievements
Rank 2
answered on 27 Jan 2009, 05:20 AM
I found a Solution
A Work around was to add a blank record to the datasource if the returned results were 0 records.

New Question
Is there a way to just toggle the new row record.

Thanks,
0
Valentin.Stoychev
Telerik team
answered on 27 Jan 2009, 10:25 AM
Hi Michael,

The correct way of doig this is to call BeginEdit() method of the new row like that:

RadGridView1.FindNewRow().BeginEdit();


Sincerely yours,
Valentin.Stoychev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
MGrassman
Top achievements
Rank 2
Answers by
MGrassman
Top achievements
Rank 2
Valentin.Stoychev
Telerik team
Share this question
or