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

Problem with Grid an d editing Collection

2 Answers 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 04 Mar 2009, 10:06 AM
Hello I am trying out your Controls
in the Sharepoint.

I have made a Test Class People with Name, Age, Link, Image and so on.

I have a Class named PeopleCollection that contains a People list.

I have a drop down That Contains All Kind Of People Collection adn A Dictornary taht has the
People Collection by their name:

for ex.

PeopleDropdown:

On DropDownLoad()
{ Fill PeopleDictonary with all Kind of People
)

onDrpDownSlectedIndexChange
{
Grid.Datasource=null
Grid.Rebind()
Grid.DataSource = dictonarywithpeople[Combobox.SelectedItem.Text].PeopleList;}
Grid.Rebind()
}
onGridLoad()
{
Grid.DataSource = dictonarywithpeople[Combobox.SelectedItem.Text].PeopleList;}
Grid.DataBind()
}

onGridUpdate(object source, DataGridEvents e)
{
Here i like to get the Item that has chaneged but it has only the old values ??

}

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 04 Mar 2009, 10:48 AM
 
not working:

 people data = new People();
            ((GridEditableItem)e.Item).UpdateValues(data);

the item is not Updated


0
Accepted
Sebastian
Telerik team
answered on 07 Mar 2009, 08:48 AM
Hi David,

From your code snippets I see that you are using simple binding for your grid with DataBind() calls. Note that RadGrid features like data editing, filtering, grouping, etc. require advanced binding with NeedDataSource event handling or assigning a data source control for grid items generator.

Please revise your code accordingly to address the issue. You may also be interested in reviewing the online resources linked below which concern data editing:

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editmodes/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/extractvalues/defaultcs.aspx

http://www.telerik.com/help/aspnet-ajax/grdupdatinginplaceandeditforms.html
http://www.telerik.com/help/aspnet-ajax/grdinsertingvaluesinplaceandeditforms.html
 
Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or