8 Answers, 1 is accepted
0

Richard Slade
Top achievements
Rank 2
answered on 15 Nov 2010, 12:19 PM
Hello Raymond,
This should provide you with some text to show that they are cells to add new data. You'll need to register the ViewCellFormatting event
hope that helps
Richard
This should provide you with some text to show that they are cells to add new data. You'll need to register the ViewCellFormatting event
private void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
if (e.CellElement.RowElement is GridNewRowElement)
{
e.CellElement.RowElement.TextAlignment = ContentAlignment.MiddleCenter;
if (e.CellElement is GridDataCellElement)
{
e.CellElement.Text =
"Add Data"
;
e.CellElement.Visibility = Telerik.WinControls.ElementVisibility.Visible;
}
}
}
hope that helps
Richard
0

Raymond
Top achievements
Rank 1
answered on 15 Nov 2010, 03:27 PM
No it doesn`t solve my problem.
In Q2 SP2 I could get result as in attached image.
I Q2 SP2 there is bug that if there are no real rows in grid this text doesn`t appear, so I handled this programmatically:
(related thread from Q2 SP2: http://www.telerik.com/community/forums/winforms/gridview/three-problems-with-adding-new-row.aspx )
private void radGridView1_ViewRowFormatting(object sender, RowFormattingEventArgs e)
{
if (e.RowElement is GridNewRowElement)
{
adding text click here to add new row, problem is only if there are no real rows in grid
if (radGridView1.Rows.Count == 0)
{
if ((e.RowElement.RowVisualState == GridRowElement.RowVisualStates.Current) &&
(e.RowElement.RowInfo.Cells[0].Value == null) && (e.RowElement.RowInfo.Cells[1].Value == null) && (e.RowElement.RowInfo.Cells[2].Value == null))
{
e.RowElement.Text = RadGridLocalizationProvider.CurrentProvider.GetLocalizedString(RadGridStringId.AddNewRowString);
}
else
{
if (!string.IsNullOrEmpty(e.RowElement.Text))
{ e.RowElement.Text = string.Empty; }
}
}
}
}
If there is at least one real row and row for adding new rows doesn`t have focus this text appears by deafult (in Q2 SP2).
I cannot get the same result in Q3.
Regards
0

Richard Slade
Top achievements
Rank 2
answered on 15 Nov 2010, 03:54 PM
Hello,
it looks as though this has been removed to me in the Q3 release. None of the demos I have seen so far have the "Click here to add new row" text, and setting a RadGridLocalizationProvider for AddNewRowString no longer produces a result.
I'll look further however and see if I can come up with something
Richard
it looks as though this has been removed to me in the Q3 release. None of the demos I have seen so far have the "Click here to add new row" text, and setting a RadGridLocalizationProvider for AddNewRowString no longer produces a result.
I'll look further however and see if I can come up with something
Richard
0

Raymond
Top achievements
Rank 1
answered on 15 Nov 2010, 04:01 PM
I am looking forward on message from you because I showed this text my clients and they liked it and with Q3 I cannot display this text in the same manner.
0

Richard Slade
Top achievements
Rank 2
answered on 16 Nov 2010, 08:34 AM
Hello Raymond,
At the moment, I haven't got a workaround for this for you. I'll continue to look as and when I can to see if I can.
Regards,
Richard
At the moment, I haven't got a workaround for this for you. I'll continue to look as and when I can to see if I can.
Regards,
Richard
0
Hi Raymond,
We have not removed the "Click here to add new row" text intentionally. However, this is an issue which we introduced in our latest release. It will be addressed in our upcoming service pack. This is a critical issue for us and that is why we plan to release an internal build which will be available later this week.
I hope this helps. If you have any further questions, do not hesitate to contact us.
Kind regards,
Jack
the Telerik team
We have not removed the "Click here to add new row" text intentionally. However, this is an issue which we introduced in our latest release. It will be addressed in our upcoming service pack. This is a critical issue for us and that is why we plan to release an internal build which will be available later this week.
I hope this helps. If you have any further questions, do not hesitate to contact us.
Kind regards,
Jack
the Telerik team
See What's New in RadControls for WinForms in Q3 2010 on Wednesday, November 17, 11am Eastern Time: Register here>>
0

Emanuel Varga
Top achievements
Rank 1
answered on 18 Jan 2011, 09:37 AM
Hello guys,
There is another problem in the latest Q3 SP1 release regarding the Click here to add new row text, if you use the CurrentRowChanging event and cancel the change if it's the new row, then the click here... text will not be visible anymore.
A workaround for this:
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
There is another problem in the latest Q3 SP1 release regarding the Click here to add new row text, if you use the CurrentRowChanging event and cancel the change if it's the new row, then the click here... text will not be visible anymore.
A workaround for this:
void
radGridView1_CurrentRowChanging(
object
sender, CurrentRowChangingEventArgs e)
{
if
(e.Cancel = e.NewRow
is
GridViewNewRowInfo)
{
var newRowElement = radGridView1.TableElement.VisualRows.Where(r => r.RowInfo == e.NewRow).FirstOrDefault();
if
(newRowElement !=
null
)
{
newRowElement.Text = RadGridLocalizationProvider.CreateDefaultLocalizationProvider().GetLocalizedString(RadGridStringId.AddNewRowString);
}
}
}
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
Hi Emanuel,
Thank you for reporting this issue. I was able to reproduce it with the latest version - Q3 2010 SP1 and added the issue to our issue tracking system. It will be addressed in one of the upcoming releases.
Regards,
Jack
the Telerik team
Thank you for reporting this issue. I was able to reproduce it with the latest version - Q3 2010 SP1 and added the issue to our issue tracking system. It will be addressed in one of the upcoming releases.
Regards,
Jack
the Telerik team