I have a radgrid where the entire grid is created at run-time. The issue I'm having is related to what happens if filtering produces no results. The phrase "No records to display." is repeated 6 times, 1 line below the other, with the first 3 or 4 letters being cut from the line above. Please see attached screen shot. Any idea as to why this is happening and how to get it to stop?
Thank you.
~Robin
Thank you.
~Robin
8 Answers, 1 is accepted
0

Jayesh Goyani
Top achievements
Rank 2
answered on 19 Nov 2011, 06:01 AM
Hello Robin,
I have checked from my side there is not any such type of issue with radgrid.
Please explain by which way /steps you can generate this issue.
Thanks,
Jayesh Goyani
I have checked from my side there is not any such type of issue with radgrid.
Please explain by which way /steps you can generate this issue.
Thanks,
Jayesh Goyani
0

Robin
Top achievements
Rank 1
answered on 21 Nov 2011, 05:22 PM
I'm not quite certain I understand what you are asking for. The grid columns are created completely in code-behind, and when it is first loaded it contains 5 records. If I filter any of the columns in such a way as to generate no results the grid comes back as depicted in the screen shot I originally attached.
I have defined the OnItemDataBound, OnItemCreated, OnDataBound and OnNeedDataSource methods for the grid. OnNeedDataSource calls a method that retrieves the data and creates the columns. OnItemCreated creates the controls that are placed in the grid cells. OnItemDataBound puts the data in the controls created in OnItemCreated. OnDataBound determines the width of the grid based upon the number & types of columns created.
I've attached another screen shot to show what happens if I change the length of the MasterTableView NoRecordsTemplate message. I ran a test where I set the MasterTableView.NoMasterRecordsText at the end of the OnDataBound method and I still had the same behavior.
I have defined the OnItemDataBound, OnItemCreated, OnDataBound and OnNeedDataSource methods for the grid. OnNeedDataSource calls a method that retrieves the data and creates the columns. OnItemCreated creates the controls that are placed in the grid cells. OnItemDataBound puts the data in the controls created in OnItemCreated. OnDataBound determines the width of the grid based upon the number & types of columns created.
I've attached another screen shot to show what happens if I change the length of the MasterTableView NoRecordsTemplate message. I ran a test where I set the MasterTableView.NoMasterRecordsText at the end of the OnDataBound method and I still had the same behavior.
0

Robin
Top achievements
Rank 1
answered on 21 Nov 2011, 07:07 PM
I have done some more testing with the grid and have noticed certain behavior. After the filtering is done, if I move the mouse over certain controls in the paging section of the bottom of the grid the duplicate lines of the empty text disappear. If I then move the mouse over any part of the header row the duplicate lines reappear and will stay there even if I move the mouse over the paging section at the bottom of the grid. Please see attached screenshot for more detail.
0
Hi Robin,
You need to create your columns when defining the grid on PageLoad or PageInit. The OnNeedDataSource is too late for creating columns. Check this topic about programmatic creation: http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html
Additionally could you tell us what browser do you use?
Note that we are still unable to replicate such a problem, and I believe you are the first one who reports it, so it will be in help if you could share the exact code that you use.
Kind regards,
Vasil
the Telerik team
You need to create your columns when defining the grid on PageLoad or PageInit. The OnNeedDataSource is too late for creating columns. Check this topic about programmatic creation: http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html
Additionally could you tell us what browser do you use?
Note that we are still unable to replicate such a problem, and I believe you are the first one who reports it, so it will be in help if you could share the exact code that you use.
Kind regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0

Robin
Top achievements
Rank 1
answered on 28 Nov 2011, 02:35 PM
I changed my OnNeedDataSource to have as its only line of code the reassignment of the dataset to the grid (radGrid.DataSource = myDataSet) and I'm still experiencing the same issue -- see attached screenshot telerik_11_28_2011.png. I changed the NoRecordsTemplate to be "No Records Found" with a linebreak after No and Records and 2 spaces after Found.
I had already found the link you were kind enough to provide and as such was creating the columns in PageInit and PageLoad.
I am using IE 8 as my browser.
I need to check with my manager to see if I can provide you the code as this is a product we are developing in-house. I am attaching a screenshot of my definition for the grid in case that is an issue -- telerik_11_28_2011_b.png.
BTW - I put a breakpoint in my OnNeedDataSource method and it's never hit regardless of what I do -- sorting, filtering, or paging.
I had already found the link you were kind enough to provide and as such was creating the columns in PageInit and PageLoad.
I am using IE 8 as my browser.
I need to check with my manager to see if I can provide you the code as this is a product we are developing in-house. I am attaching a screenshot of my definition for the grid in case that is an issue -- telerik_11_28_2011_b.png.
BTW - I put a breakpoint in my OnNeedDataSource method and it's never hit regardless of what I do -- sorting, filtering, or paging.
0

Princy
Top achievements
Rank 2
answered on 28 Nov 2011, 03:39 PM
Hello,
I have tried the same scenario but no avail. I tried in IE8 and IE9 and it worked on my end. I am using the version 2011, 2, 915, 35. Here is the screenshot.
Thanks,
Princy.
I have tried the same scenario but no avail. I tried in IE8 and IE9 and it worked on my end. I am using the version 2011, 2, 915, 35. Here is the screenshot.
Thanks,
Princy.
0

Robin
Top achievements
Rank 1
answered on 28 Nov 2011, 05:40 PM
I am using the same version of telerik. I am compiling in VS 2005 in case that makes a difference.
I have been given permission to send you the code. Is there an email address I can use as I'd rather not post it in this forum.
Thanks.
I have been given permission to send you the code. Is there an email address I can use as I'd rather not post it in this forum.
Thanks.
0
Hello Robin,
You could open a formal support ticket and attach your project there.
Best wishes,
Vasil
the Telerik team
You could open a formal support ticket and attach your project there.
Best wishes,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now