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

Rebind a RadGrid from a rad window

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 31 Oct 2012, 10:51 AM
Hi,
Thanks in advance for your help.
I have a rad grid connected to a SQL database, and also a button that pops up and allows user to add more items to the radgrid.
The data added from the seperate window is added into the radgrid and shows when I rebind it, so when I 'Import' the data from the pop up how do I rebind the radgrid in the parent window to display the data?
Many Thanks
Ryan

UPDATE: I now have it running how I need it to, however it is still not updating the screen without refreshing it, How do I add the Ajax controls?

The code it runs through currently
function refreshRadGrid() {
    var masterTable = $find("<%=RadGrid2.ClientID%>").get_masterTableView();
    masterTable.rebind();
}
 then
Protected Sub RadGrid2_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid2.NeedDataSource
    ' MATERIALS FOR DAYSHEET
    Dim dt As New DataTable
    If lblHeaderID.Text <> 0 Then
        Dim itm As New dbrcOrdItems(Session("ConnectionString"))
        Dim HeaderID As Integer = lblHeaderID.Text
        dt = itm.ListforDaySheet(HeaderID)
        RadGrid2.DataSource = dt
    End If
    RadGrid2.DataSource = dt
End Sub

Thanks once again

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 02 Nov 2012, 11:27 AM
Hello Ryan,

In case you want to use an external edit form, please check out the following demos and choose which implementation best matches your requirements:
 Grid / PopUp Edit Form
 Grid / Editing with External Form 
 Window / Use as controls container
 Window / Edit Dialog for RadGrid
  Grid / Insert with Tooltip

I hope this will prove helpful.

Greetings,
Eyup
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.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or