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

grid dont refresh with new data after edit (template edit form)

3 Answers 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
feras
Top achievements
Rank 1
feras asked on 19 Nov 2008, 11:37 PM
hi, i managed to make the CRUD operations work with custom edit form, but the new data is not showing on the grid unless i hit refresh the page.
what am i missing here ?
thanks in advanced.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Nov 2008, 04:20 AM
Hello Feras,

Are you binding the grid using Advanced Binding techniques? If not, try binding the grid using Advanced binding so that you dont have to DataBind to see the Newly added data. Check out the following help link to understand better on Advanced DataBinding Techniques.
Advanced data-binding

Thanks
Princy.

0
feras
Top achievements
Rank 1
answered on 20 Nov 2008, 06:26 AM
thanks princy for reply ,but it is not working, not even with refresh now, as i am using form view to update or insert a record by clicking on  a delete button template column i made in the grid which will trigger a form view outside the page to be visible and start editing, the update or insert works fine with the form view and i checked the DB and the records were updated but i cant see the new data in grid , thanks in advanced


    protected void Grid_Sections_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
      
        DataClasses DB = new DataClasses();
        IQueryable<News_section> Query_Sections = from s in DB.News_sections select s;
        Grid_Sections.DataSource = Query_Sections.ToList();
       
    }

and aspx code
  <telerik:RadGrid ID="Grid_Sections" runat="server" AutoGenerateColumns="False"
                    GridLines="None"
                ondeletecommand="Grid_Sections_DeleteCommand"
                onneeddatasource="Grid_Sections_NeedDataSource">
0
feras
Top achievements
Rank 1
answered on 21 Nov 2008, 12:54 AM
never mind,
i solved it by calling grid.databind() ; in the form view .
Tags
Grid
Asked by
feras
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
feras
Top achievements
Rank 1
Share this question
or