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

[Solved] Delete not working. Object reference not set to an instance of an object.

4 Answers 323 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Roman
Top achievements
Rank 1
Roman asked on 20 May 2009, 07:31 AM
Hi!

I was reading all articles, like this:
Deleting records
Automatic DataSource operations
Insert/Update/Delete
Client-side delete

but it doesn't help me.

I found the reason, but i don't know how to solve it. On my site, i am using RadGrid for administrate news, and there i am using RadEditor in RadGrid

example:
//---------------------------
 <telerik:GridTemplateColumn UniqueName="RadEditorColumn1" CurrentFilterFunction="NoFilter"
                            FilterListOptions="VaryByDataType" ForceExtractValue="None">
                            <EditItemTemplate>
                                <telerik:RadEditor ID="RadEditor1" OnClientLoad="OnClientLoad" runat="server" Skin="Default2006" Content='<%# Bind("previewtext") %>'
                                     Height="300px" Width="800px" FlashManager-UploadPaths="~/Admin/uploads_files/flash" FlashManager-ViewPaths="~/Admin/uploads_files" FlashManager-DeletePaths="~/Admin/uploads_files/flash" ImageManager-DeletePaths="~/Admin/uploads_files/images" ImageManager-UploadPaths="~/Admin/uploads_files/images" ImageManager-ViewPaths="~/Admin/uploads_files" MediaManager-DeletePaths="~/Admin/uploads_files/files" MediaManager-UploadPaths="~/Admin/uploads_files/images" MediaManager-ViewPaths="~/Admin/uploads_files/files" DocumentManager-DeletePaths="~/Admin/uploads_files/doc" DocumentManager-UploadPaths="~/Admin/uploads_files/doc" DocumentManager-ViewPaths="~/Admin/uploads_files" />
                            <script type="text/javascript">
                                function OnClientLoad(editor, args) {
                                    var style = editor.get_contentArea().style;
                                    style.backgroundImage = "none";
                                    style.backgroundColor = "white";
                                }
                            </script>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
//--------------------------

And when i want to delete some record it gives me an error "Object reference not set to an instance of an object.", but if i dont use RadEditor in RadGrid, delete works fine.

How can i delete records, using RadEditor in RadGrid?

Insert, Update, Edit, Refresh, Add new record - work fine.


4 Answers, 1 is accepted

Sort by
0
Roman
Top achievements
Rank 1
answered on 24 May 2009, 06:58 AM
Hi!

Can anyone help me please?

Roman
0
Yavor
Telerik team
answered on 25 May 2009, 08:01 AM
Hi Roman,

Based on this information, it is hard to determine what is causing this behavior. If the issue persists, you can open a formal support ticket, and send us a small working project, demonstrating your logic, and the unwanted behavior. We will review it locally, and advise you further.

Greetings,
Yavor
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.
0
Roman
Top achievements
Rank 1
answered on 25 May 2009, 08:18 AM
Hi!

If it helps, i put my preview files here. If you need more files, let me know.

Greetings,
Roman
0
Accepted
Yavor
Telerik team
answered on 28 May 2009, 07:36 AM
Hi Roman,

I reviewed the code, and the setup seems correct. However, since the project is not runnable, I cannot debug it locally. As mentioned previously, the best option in this case would be to open a formal support ticket, and send us a small working project. As soon as I review it, I will get back to you with additional information. Thank you for your cooperation!

All the best,
Yavor
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
Roman
Top achievements
Rank 1
Answers by
Roman
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or