logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > ASP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 11-24-2008, 10:07 PM   #1
jilltre
 
Join Date: Nov 2008
Posts: 2
Default DataGrid not Updating

I've created a datagrid using the 'edit' option. When I click Edit, it does open up the record for me to edit, but when I click Update, nothing happens. It appears that nothing is being posted back to the database... I'm somewhat of a beginner with ASP in Dreamweaver, but can copy code if you need it...

Any suggestions or work arounds would be appreciated.

thanks!

Jill
jilltre is offline   Reply With Quote
Old 12-06-2008, 05:55 PM   #2
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

Take the update option off and apply it again. if that doesn't work, post your code.

Javier
__________________
J.
DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu
mangofreak is offline   Reply With Quote
Old 12-08-2008, 04:08 PM   #3
jilltre
 
Join Date: Nov 2008
Posts: 2
Default Still not updating

I did as you suggested,, now I do receive an error message:

Code:
Untitled DocumentSystem.Exception: Unsupported TYPE attribute: undefined 
at  DreamweaverCtrls.DataSet.GetDbTypeFromString(String str) 
at  DreamweaverCtrls.DataSet.OnDataGridUpdate(Object Src, DataGridCommandEventArgs  E)
this pops up after I click update... I've attached the code.

HTML Code:
 <form id="form1" name="form1" method="post" action="" runat="server">
      <asp:DataGrid AllowPaging="false" 
  AllowSorting="False" 
  AutoGenerateColumns="false" 
  CellPadding="3" 
  CellSpacing="0" DataKeyField="ID" 
  DataSource="<%# DataSet1.DefaultView %>" ID="DataGrid1" 
  runat="server" 
  ShowFooter="false" 
  ShowHeader="true" OnUpdateCommand="DataSet1.OnDataGridUpdate" OnEditCommand="DataSet1.OnDataGridEdit" OnCancelCommand="DataSet1.OnDataGridCancel" OnItemDataBound="DataSet1.OnDataGridItemDataBound" 
>
        <headerstyle HorizontalAlign="center" BackColor="#E8EBFD" ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Bold="true" Font-Size="smaller" />      
        <itemstyle BackColor="#F2F2F2" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Size="smaller" />      
        <alternatingitemstyle BackColor="#E5E5E5" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Size="smaller" />      
        <footerstyle HorizontalAlign="center" BackColor="#E8EBFD" ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Bold="true" Font-Size="smaller" />      
        <pagerstyle BackColor="white" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Size="smaller" />      
        <columns>
        <asp:BoundColumn DataField="Date" 
        HeaderText="Date" 
        ReadOnly="false" 
        Visible="True"/>      
        <asp:BoundColumn DataField="Name" 
        HeaderText="Name" 
        ReadOnly="false" 
        Visible="True"/>      
        <asp:BoundColumn DataField="Time_Out" 
        HeaderText="Time_Out" 
        ReadOnly="false" 
        Visible="True"/>      
        <asp:BoundColumn DataField="Description" 
        HeaderText="Description" 
        ReadOnly="false" 
        Visible="True"/>      
        <asp:BoundColumn DataField="Notes" 
        HeaderText="Notes" 
        ReadOnly="false" 
        Visible="True"/>      
        <asp:BoundColumn DataField="Date_Entered" 
        HeaderText="Date_Entered" 
        ReadOnly="false" 
        Visible="True"/>      
        <asp:EditCommandColumn 
        ButtonType="LinkButton" 
        CancelText="Cancel" 
        EditText="Edit" 
        HeaderText="ID" 
        UpdateText="Update" 
        Visible="True"/>        
</columns>
      </asp:DataGrid>
        </form>

Last edited by davidj; 12-08-2008 at 07:32 PM..
jilltre is offline   Reply With Quote
Old 12-13-2008, 03:30 AM   #4
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

Sorry for the delay. Too busy at work.

I have noticed that your code is not ASP(classic ASP) but ASP.Net maybe?
Oops, not versed on that type of ASP but if I'm not mistaken seem that one of your values may be of the wrong data type. integer, text, date

Make sure your values are appropriate for the data type the database is expecting.

Good luck.
__________________
J.
DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu
mangofreak is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:40 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com