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

Editing with Radgrid is not ocurring

6 Answers 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
griselda sirvent
Top achievements
Rank 1
griselda sirvent asked on 26 Feb 2011, 09:49 AM

Hi,

I am using Radgrid to display/retrieve/update data in an Access database.

Although I am able to delete and addd records, I cannot update.

There are no errors being displayed....I update the field(s) and press OK to accept the changes...but the new changes are not saved..the listing shows again the previous record/field...

As I said, no errors are shown after pressing ok.

Here is the code below (not all, but I assume is where the problem might be?)

II have not changed or added anything manual to the code.

Thank you in advance

<asp:AccessDataSource ID="AccessDataSource1" runat="server" 
            DataFile="~/App_Data/Registro_Planchas_be.mdb"
            DeleteCommand="DELETE FROM [Tabla Registro Planchas] WHERE [Nº] = ?" 
            InsertCommand="INSERT INTO [Tabla Registro Planchas] ([FECHA], [REFERENCIA], [PROVEEDOR], [REFERENCIA PEDIDO], [MAQUINA], [MARCA], [MEDIDA], [TROQUEL], [DISEÑO]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" 
            SelectCommand="SELECT * FROM [Tabla Registro Planchas]" 
            UpdateCommand="UPDATE [Tabla Registro Planchas] SET [FECHA] = ?, [REFERENCIA] = ?, [PROVEEDOR] = ?, [REFERENCIA PEDIDO] = ?, [MAQUINA] = ?, [MARCA] = ?, [MEDIDA] = ?, [TROQUEL] = ?, [DISEÑO] = ? WHERE [Nº] = ?">
            <DeleteParameters>
                <asp:Parameter Name="Nº" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="FECHA" Type="DateTime" />
                <asp:Parameter Name="REFERENCIA" Type="String" />
                <asp:Parameter Name="PROVEEDOR" Type="String" />
                <asp:Parameter Name="REFERENCIA_PEDIDO" Type="String" />
                <asp:Parameter Name="MAQUINA" Type="String" />
                <asp:Parameter Name="MARCA" Type="String" />
                <asp:Parameter Name="MEDIDA" Type="String" />
                <asp:Parameter Name="TROQUEL" Type="String" />
                <asp:Parameter Name="DISEÑO" Type="String" />                
            </UpdateParameters>    <br>            </UpdateParameters>

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Feb 2011, 10:39 AM
Hello Griselda,

Check whether you have set 'AllowAutomaticUpdates' property of RadGrid as 'True'. If not set it as 'true' and check if it works now.

-Shinu.
0
griselda sirvent
Top achievements
Rank 1
answered on 28 Feb 2011, 08:47 PM

Hi

I was hoping it would be that, however I have just checked and I do have allowautomaticupdates set to "true"

Any other ideas what it could be ?

0
Princy
Top achievements
Rank 2
answered on 01 Mar 2011, 10:01 AM
Hello Griselda,

I issue is because of not including the field in where condition in Update pramenter.

ASPX:
<UpdateParameters>
       .  .  . .   .  .
     <asp:Parameter Name="Nº" Type="Int32" />
 </UpdateParameters>

Thanks,
Princy.
0
griselda sirvent
Top achievements
Rank 1
answered on 01 Mar 2011, 08:16 PM

Hi Princy

Thanks for input

Unfortunately that didn't work either

Funny thing is that I don't get any type of errors....everything runs "like" if was working...only that record doesn't get updated...:)

You can see for yourselves in this temporary site:

http://www.xcelente.net

and here is the code...

http://www.xcelente.net/asptempsite.txt

Just do an update on any of the records...nothing happens

very frustrating...I hope someone can find the problem...

0
griselda sirvent
Top achievements
Rank 1
answered on 05 Mar 2011, 06:33 PM

Hi

Anyone has any ideas on this ?

0
Tsvetina
Telerik team
answered on 07 Mar 2011, 11:19 AM
Hi Griselda ,

I just answered the support ticket that you have submitted on the same issue. In case you have any further concerns, please post them there, so we can avoid duplicate posts.

For others who encounter such issue, I am attaching a small working sample using a grid quite similar to the one which is linked to in the previous post.

Greetings,
Tsvetina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
griselda sirvent
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
griselda sirvent
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Tsvetina
Telerik team
Share this question
or