Fill ods with list

I have a list which is set in my code behind - how can I set an ods on my page to use this list?

Hope that is enough info - if not, let me know :slight_smile:

cheers

monkey

Hmm. What’s an “ods”? Do you mean a CALC spreadsheet?

objectdatasource! :eek:

If you have a list in your code behind, why would you want to set it on an object data source? Explain what you are trying to achieve and we can possibly help you out a bit more

HAHA. Yeah, when I see 3 random letters in lowercase I instantly think file extension.

As Night said, is there a reason to go from List to DataSource to whatever it’s going to? Why not just make the List the DataSource?

OK - thought you might ask!

Currently I set the datasource to the list in the code behind and then bind, but I am trying to set up the grid so i can edit the data in situ but get the error:

The GridView ‘gvAssignments’ fired event RowEditing which wasn’t handled.

Having done a little research, i thought it would be easier to fill an ods so i could do edit and delete using the inbuilt funtionality

cheers

No, all you must do is implement that event on the grid view and do what you need to do to delete the item

It’s the edit i have the issue with

cheers

How’s that? :stuck_out_tongue:

ok. So I have added:

CommandName="Edit"

to the button. I add:

OnRowEditing="myMethod_OnRowEditing"

?

How do i get my gridview to switch to edit mode - i.e. show the EditItemTemplates and hide the ItemTemplates?

Is this what you mean? :stuck_out_tongue:

Any help? :shifty:

Can you show the entire thing? That would make it easier for me to see what’s going on.