This is a migrated thread and some comments may be shown as answers.
Rebind/Refresh
23 Answers 1808 Views
This is a migrated thread and some comments may be shown as answers.
Chad Biggerstaff
Top achievements
Rank 1
Chad Biggerstaff asked on 12 May 2007, 06:08 AM
I display the grid.  Then run a query outside of the grid that deletes records that are displayed in the grid.  I now want to refresh the grid so it will no longer show the missing records.  What's the best way to do this? 
I've tried refresh and it doesn't seem to work.  I would try rebind, but I don't understand what to pass for GridViewTemplate.  I've tried resetting the datasource which works unless the grid has records in it and the new datasource returns no records then the grid continues to show all the records whereas if the new datasource has at least a record the grid will then correctly update, but I thought using rebind might be faster then resetting the datasource..
Also I wanted to mentions I'm looking forward to SP1 for the rowchanged event.  I appreciate you guys always improving these controls.

23 Answers, 1 is accepted

Sort by
0
Kiril
Telerik team
answered on 15 May 2007, 10:40 AM
Hi Chad,

Thank you for reporting this issue. It seems that we will have to add more clarity on the different ways to refresh the grid. What scenarios are you usually confronted with?

In the upcoming Service Pack 1, the grid will automatically update upon deleting records that are displayed in it.

 
Sincerely yours,
Kiril
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
PortVista
Top achievements
Rank 2
answered on 21 May 2007, 02:12 AM
Chad said he is deleting the record OUTSIDE the grid control, so an automatic refresh isn't possible. I do my updates to the data outside the grid as well, if you're looking for a second vote.

Typically I use a DETAIL VIEW totally separate from the grid. The inline detail included with the grid does not seem very user friendly, normally because there is far too much data to show. I normally show the detail right next to, or under the datagrid. That goes for Telerik's webforms control too. I've not found a datagrid that allows detail to be shown outside the datagrid, say in a panel. Is that possible for Telerik to work on??

As far as refresh, the only way I've ever updated the grid to reflect changes, is to set the datasource, and many times unfortunately making a round trip to the database even when only one record changed or was deleted. But this is the easiest way. I can't imagine the datagrid control making this easier... it's mainly how you manage your datasource.


0
Boris Rogge
Top achievements
Rank 1
answered on 21 May 2007, 11:23 AM

Hello Chad, Kiril, PortVista,

I'm experiencing the same problem. I'm having a dataset that changes every second. I would like to do a 'rebind' every second but the control doesn't seem to support this.

I have tried the UpdateView method on the GridView's MasterGridViewInfo but to no avail.

Furthermore, when I do a rebind by re-setting the datasource, this doesn't seem to work (haven't retested this using SP1).  Therefore I create a new list and attach this to the grid. This solves the problem but somehow the previous list is not releases, presenting me with a memory leak.

Any thoughts ?

Regards,

boris

0
Boris Rogge
Top achievements
Rank 1
answered on 21 May 2007, 11:44 AM
Hi all,

I have done some more tests on the binding and as far as I understood it, the behaviour seems to be the same in SP1.

I have created two lists and I am altering between the two lists when binding to the grid. Now I know the lists are not leaking because they stay alive and only two of them exist. However, when running this code my application keeps leaking memory. This is the code snippet:

if (updateList1.Count == 0)
{
foreach (object o in taskManager.FilteredTasks)
    updateList1.Add(o);
updateList2.Clear();
radGridViewTracking.DataSource = updateList1;
}
else
{
foreach (object o in taskManager.FilteredTasks)
    updateList2.Add(o);
updateList1.Clear();
radGridViewTracking.DataSource = updateList2;
}

b.

0
Dwight
Telerik team
answered on 21 May 2007, 03:47 PM
Hi Boris,

When updating the data source the grid should automatically update its contents.

Please, check that the list you are using implements IBindingList interface. If the problem still persists, please, create a simple project exposing the bug and send it to us to investigate. You can do so in a new support ticket.
 

Kind regards,
Evtim
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Fabio Videira
Top achievements
Rank 2
answered on 22 May 2007, 10:02 PM
I was encountering the same issue with version Q1.  Today I installed Q1 SP1 and the refresh started working.

Now the issue is a memory leak.  My project works just fine with DataGridView controls, but as soon as I add RadGridView and change the dataset (every second), I see memory utilization increasing little by little.

Just to make sure I did not screw up anything, I've created a simple project that has a data set that is updated every second with the time information.  I see the same issues with memory leak.  See code below.

Public Class Form1

    Dim DT As DataTable

 
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        DT = New DataTable
        Dim Key(0) As DataColumn
        Dim Column As DataColumn

        Column = New DataColumn
        Column.DataType = System.Type.GetType("System.Int16")
        Column.ColumnName = "RowId"
        DT.Columns.Add(Column)
        Key(0) = Column
        DT.PrimaryKey = Key

        Column = New DataColumn
        Column.DataType = System.Type.GetType("System.String")
        Column.ColumnName = "Time"
        DT.Columns.Add(Column)

        Dim DR As DataRow = DT.NewRow
        DR.Item("RowId") = 1
        DR.Item("Time") = Now().ToString
        DT.Rows.Add(DR)
        RadGridView1.DataSource = DT
    End Sub


    Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim DR As DataRow = DT.Rows.Find(1)
        If DR IsNot Nothing Then
            DR.Item("Time") = Now().ToString
        End If
        RadGridView1.DataSource = DT
    End Sub
End Class


I have plenty experience with rad.ASP.Net rad.GridView, but I am a novice with Winforms.

Also, I could not figure out how to have the cells auto-resizing based on data changes.  Is that possible?

Let me know if you want me to send you the project as a zipped file.

Thanks!!

Fabio Videira.
0
PortVista
Top achievements
Rank 2
answered on 22 May 2007, 10:52 PM
Ok so I'm home from work and was bored and thought I'd give it a try. Confirmed! The RadGridView uses over 10kbytes more memory right off the bat, and slowly climbed to at least 200kbytes before I shut it off. Just to see if for some reason it was the datatable, I threw in the MS DataGridView and found no increase in memory.

*begin rant*
HONESTLY, I've really had it with Telerik's WinForms. I'm starting to wonder if there are any problems with Telerik's ASP controls. I have noticed minor UI issues with the menus and editor messing up in DotNetNuke, but I've not really looked into it. I've been moved onto a Windows app, and I thought why not use the Telerik WinForms?

I didn't realize that not only do they contain lots of bugs, but they are much slower. How is this making our products better? Seriously!
*end rant*
0
Boris Rogge
Top achievements
Rank 1
answered on 22 May 2007, 11:09 PM
Hello All,

some thoughts/answers:

To Kiril: I have now implemented the IBindingList and the grid view is indeed updating the contents automatically.

To Fabio: I have not yet found the time to create a test project, but I'm confident yours proofs that there is indeed a memory leak. One of my beta-testers used the tool (a time tracking application) and found that it locked over a GB of RAM.

To PortVista: I too am under the impression that the quality of the WinForm controls is inferior to the ASP.NET controls. The performance appears indeed to be a problem. For now I'm still giving them the benefit of the doubt (because of a proven track record), but we need to ship our products too, so... Should I have more time I'd try to have a look at the code of the controls, but for now time is a luxury that I don't have.

To Telerik: Would it be possible to fix the memory leak problem and provide us with an intermediate build ?

Regards,

boris
0
Julian Benkov
Telerik team
answered on 23 May 2007, 02:13 PM
Hi Boris,

We will review and research the memory leak and performance problems and will do our best to fix them for SP2. We do not have an official policy to provide custom builds on a regular basis, because our service packs are usually just 4 weeks apart. Still, we may  provide a custom build or two to the most active users. I hope you understand our position on this.


Kind regards,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Boris Rogge
Top achievements
Rank 1
answered on 23 May 2007, 09:51 PM
OK. Thanks for the information Julian,

boris
0
Greg
Top achievements
Rank 2
answered on 17 Jun 2007, 03:39 PM
I have actually implemented a production application with the GridView.  The application has been in operation for two years using the Microsoft DataGridView control.  The memory foot print of the application has always been about 45 meg.

This Application runs several processes, and stores the results of those processes in a Microsoft SQL Server Database.  That information is displayed in a Grid.  After the processes complete, the grid is rebound and refreshed.

I changed the application to use the RadGridView control, and now, with each rebind and refesh, the foot print increases by over 1 meg.  In a 13 hour period, the foot print went from 45 Meg, to over 460 Meg.

As you can see this is unacceptable.  I would suggest that the severity of this issue be escalated, and even warn customers of the problem.  I  run this application in-house, so I can return it to the Microsoft control without much impact.

However, any customer deploying this control to their customer base, are in for major performance and technical support problems.  Not to mention the cost of rolling out a fix to that customer base.

I'm a staunch supporter of Telerik Controls, but this particular problem is a bit disturbing.

I would like to make a suggestion.  I'm making assumptions here, but it appears that your QA department focuses their testing on basic uses of the control.  May I suggest that they do more complex testing with the controls before they are released to the public.  Most of us do not simply plop a control on a form, fill it with data, and be done. 

Finally, may I suggest that CHM file be taken down off of your site, until it can be properly filled out.  Some links refer to ASPNET controls (and named that way), and redirect to pages that don't exist in the CHM.  Further, the "Tutorial" sections fo the CHM are blank.  They should at least state that tutorials would be available in the future.  Worse than that, some of the help pages for the GridView indicate from some of the screen shots, that the grid is capable of paging.

If it is capable of paging, I have yet to find it, and there is no direct description of the ability, however, as I said, some screen shots give that impression.

Hopefully, we'll see an SP2 with some significant updates that will address many of these issues.

Thanks
0
PortVista
Top achievements
Rank 2
answered on 17 Jun 2007, 05:12 PM
I'm in full agreement here Kuba. It has been a few weeks and there doesn't seem to be an update. I haven't heard anything from Telerik. But the same broken versions of the software is still available for download and use with no warnings about our findings whatsoever.

I suggest a history or public confirmed bug report list we can all look at. I really did waste a lot of time on Telerik controls only to find it was actually a bug and not anything I could work around.
0
Boris Rogge
Top achievements
Rank 1
answered on 17 Jun 2007, 05:27 PM
Hi all,

I'm currently trying to postpone the (beta-)release of the product we are working on. However, it's becoming a rather big problem. Telerik has confirmed (in a support thread) that SP2 of the controls should fix the problems (by the end of this month)

Unfortunately I don't have any time to spare, because otherwise I would have had a look at the code...

Good point on the documentation Kuba Cole !
0
Greg
Top achievements
Rank 2
answered on 18 Jun 2007, 03:58 AM
Telerik,

   I need to add another problem to the list.  I've only realized this today, but dates are not properly sorted in a GridView.  Say I have the following dates in a column:

6/1/2007 12:00:00 AM
6/5/2007 12:00:00 AM
6/11/2007 12:00:00 AM

Sorting in ascending order does the following:

6/1/2007 12:00:00 AM
6/11/2007 12:00:00 AM
6/5/2007 12:00:00 AM

I understand why, however, the Microsoft control does not function this way.  The Microsoft Control correctly identifies the column as date data, and sorts it properly.  It can be averted by filling the data in the column to displaying this way:

06/01/2007 12:00:00 AM
06/05/2007 12:00:00 AM
06/11/2007 12:00:00 AM

I don't know if anyone has already identified this problem, but here it is in the case that they haven't.

Thanks
0
Julian Benkov
Telerik team
answered on 18 Jun 2007, 04:36 PM
Hello Cuba,

There have been no issues reported to DateTime column sorting. Will it be possible to send us your project so that we can research the report? Please, open a support ticket and attach it there together with the steps to reproduce the problem.

Thank you for the feedback.

 
Regards,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Greg
Top achievements
Rank 2
answered on 23 Jun 2007, 06:39 AM
Hello Julian,

A sample project isn't necessary.  The only ocnditions need to be apply:

1)  Create a form with a RadGridView
2)  Bind it to an Microsoft SQL 2005 Database with a Datetime Field
3)  The Default date format should be m/d/yyyy hh:mm:ss tt

Run the form, and you will get your sorting problem.
Note, if the date format is mm/dd/yyyy hh:mm:ss tt, it sorts correctly.

Thanks, Greg
0
Julian Benkov
Telerik team
answered on 25 Jun 2007, 04:56 PM
Hi Greg,

We are still unable to reproduce the problem with the DateTime column with the instructions you have provided. We will be grateful if you send send us a simple application (or a code snippet used in your scenario) with a small part of your database so that we can research where the problem comes from. This will be very helpful for us. 


Thanks in advance,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Greg
Top achievements
Rank 2
answered on 25 Jun 2007, 05:14 PM
I will provide one as soon as possible.

Thanks, Kuba
0
Raj
Top achievements
Rank 1
answered on 06 Feb 2008, 02:32 PM
Hi Chad,

I am also facing the same problem, i m updating the database from outside the grid. The grid is not refreshed when you insert or delete any rows in the database. I tried rebinding the datasource to the grid, but no luck.

I m using the Radgridview Q3.

Did you find any solultion to this problem ??
0
parimal
Top achievements
Rank 1
answered on 11 Jul 2008, 02:30 AM
Hi,
We are facing the same issue. Dataset shows updated number of records but when we bind the same to RAD GRID no changes are reflected.

We have set the grid datasource as Null and then bind again with the udpated dataset but no help.

Need help on urgent basis.

regards,

Parimal
0
Julian Benkov
Telerik team
answered on 11 Jul 2008, 11:03 AM
Hello guys,

We will suggest upgrading to the latest Q1 2008 SP1 release. There are many improvements and enhancements to our RadGridView component, including a couple of fixes to your particular problems. In case you still have issues, please send us a simple application (or a code snippet used in your scenario) with a small part of your database so that we can research where the problem comes from.

You can download component suite from your Client.net accounts.
 

Sincerely yours,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Gil
Top achievements
Rank 1
answered on 24 Feb 2014, 04:58 PM
Hello,
I've also implemented the IBindingList and the IEditableObject 
the add/remove indeed updates the raddropdownlist
But if a property is changed inside an entity contained in the datasouce, the control does not updates
What can I do?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Feb 2014, 12:43 PM
Hello Gil,

Thank you for contacting us.

RadGridView is capable of fetching bindable properties and data. However, one important issue must be noted: During the data binding process, the grid extracts the data from the data source, but for any later changes in the data source, RadGridView should be notified. Your bindable collection and business objects should follow some standards established in .NET in order to notify RadGridView about the changes:
  • The collection that you will bind to RadGridView should implement IBindingList or IBindingListView interfaces. This will allow RadGridView to get notified about insert and delete operations of records.
  • Your business objects should implement INotifyPropertyChanged interface (.NET 2.0). This will allow RadGridView to reflect changes which occur to the properties of the business objects.

Please refer to our Reflecting Custom Object Changes in RGV help article.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
Asked by
Chad Biggerstaff
Top achievements
Rank 1
Answers by
Kiril
Telerik team
PortVista
Top achievements
Rank 2
Boris Rogge
Top achievements
Rank 1
Dwight
Telerik team
Fabio Videira
Top achievements
Rank 2
Julian Benkov
Telerik team
Greg
Top achievements
Rank 2
Raj
Top achievements
Rank 1
parimal
Top achievements
Rank 1
Gil
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or