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

[Solved] issue with Updating grid

1 Answer 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gina
Top achievements
Rank 1
Gina asked on 24 Apr 2009, 01:44 PM
I am trying to edit any of the fields in my grid and I keep getting the following error get' is not a recognized function name... Can someone help me to understand what it means ? or how I can fix it... I am guessing I have one little thing off but I sure do not see it :(

Below is my code:

   protected void rgPRCA_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)
    {
        GridEditableItem item = (GridEditableItem)e.Item;
        String Name = item.GetDataKeyValue("Login").ToString();

        if (e.Exception != null)
        {
            e.KeepInEditMode = true;
            e.ExceptionHandled = true;

            SetMessage("Attended " + Name + " cannot be updated. Reason: " + e.Exception.Message);
        }
        else
        {
            SetMessage("Attended " + Name + " is updated!");
        }
    }

here is the grid:
  <telerik:RadGrid ID="rgPRCA" runat="server"
                        DataSourceID="SqlDataSource1"
                        GridLines="None"
                        OnItemUpdated=rgPRCA_ItemUpdated
                        OnDataBound="rgPRCA_DataBound"
                        AllowPaging="True"
                        AllowSorting="True"
                        AutoGenerateEditColumn="false"
                        AllowAutomaticUpdates="True" >
    <ExportSettings>
    <Pdf PaperSize="Letter" FontType="Subset"></Pdf>
    <Excel Format="Html"></Excel>
    <Csv RowDelimiter="NewLine" ColumnDelimiter="Comma"></Csv>
    </ExportSettings>
    <MasterTableView CurrentResetPageIndexAction="SetPageIndexToFirst" Dir="LTR"
            Frame="Border" TableLayout="Auto"
            CommandItemDisplay="None"
            AutoGenerateColumns="False"
            DataKeyNames="Login"
            DataSourceID="SqlDataSource1">
    <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Visible="False">
    <HeaderStyle Width="20px"></HeaderStyle>
    </RowIndicatorColumn>
    <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" Visible="False" Resizable="False">
    <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
    <Columns>
    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
            <ItemStyle CssClass="MyImageButton" />
        </telerik:GridEditCommandColumn>
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Login"
            FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Login"
            SortExpression="Login" UniqueName="Login" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Attendee"
            FilterListOptions="VaryByDataType" ForceExtractValue="None"
            HeaderText="Attendee" SortExpression="Attendee" UniqueName="Attendee">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Location"
            FilterListOptions="VaryByDataType" ForceExtractValue="None"
            HeaderText="Location" SortExpression="Location" UniqueName="Location">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Role"
            FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Role"
            SortExpression="Role" UniqueName="Role">
        </telerik:GridBoundColumn>
        
        <telerik:GridDateTimeColumn UniqueName="CallDate" PickerType="DatePicker" HeaderText="CallDate"
            DataField="CallDate">
            <ItemStyle Width="120px" />
        </telerik:GridDateTimeColumn>
      
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter"
            DataField="PassPhrase" FilterListOptions="VaryByDataType"
            ForceExtractValue="None" HeaderText="PassPhrase" SortExpression="PassPhrase"
            UniqueName="PassPhrase">
        </telerik:GridBoundColumn>      
     
        
         <%-- <telerik:GridDropDownColumn DataSourceID="sqlCallAttended" ListTextField="DisplayText" ListValueField="ValueText"
             SortExpression="DisplayText" HeaderText="DisplayText" DropDownControlType="RadComboBox"
            DataField="DisplayText">
        </telerik:GridDropDownColumn>--%>
        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter"
            DataField="CallAttended" FilterListOptions="VaryByDataType"
            ForceExtractValue="None" HeaderText="CallAttended"
            SortExpression="CallAttended" UniqueName="CallAttended">           
            <ItemStyle Width="350px" />
        </telerik:GridBoundColumn>
    </Columns>
<EditFormSettings ColumnNumber="2" CaptionDataField="Attendee" CaptionFormatString="Edit properties of {0}">
                    <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                    <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White"
                        Width="100%" />
                    <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                    <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record"
                        UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                    </EditColumn>
     <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
 </EditFormSettings>

</MasterTableView>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:EDCCConnectString %>"
        SelectCommand="PRCA_GetDetails" SelectCommandType="StoredProcedure"
                UpdateCommand="update TD_PRCA_Details set CallDate=@CallDate, PassPhrase = @PassPhrase,
                                CallAttended=@CallAttended, LastChangeDate = get()
                                WHERE Login =@Login" >
        <SelectParameters>
            <asp:SessionParameter Name="StartDate" SessionField="StartDate"
                Type="DateTime" />
            <asp:SessionParameter Name="EndDate" SessionField="EndDate" Type="DateTime" />
            <asp:SessionParameter Name="Location" SessionField="Location" Type="String" />
            <asp:SessionParameter Name="Attendee" SessionField="Attendee" Type="String" />
            <asp:SessionParameter Name="CallAttended" SessionField="CallAttended"
                Type="String" />
        </SelectParameters>
        <UpdateParameters>
                <asp:Parameter Name="CallDate" Type="DateTime" />
                <asp:Parameter Name="PassPhrase" Type="String" />
                 <asp:Parameter Name="CallAttended" Type="String" />
</UpdateParameters>             
    </asp:SqlDataSource>
    
    <br />
    <br />
   <asp:SqlDataSource ID="sqlCallAttended" runat="server"
        ConnectionString="<%$ ConnectionStrings:EDCCConnectString %>"
        SelectCommand="REF_Get_ListType" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter DefaultValue="Process Release Call" Name="ListType" Type="String" />
            <asp:Parameter DefaultValue="EDCC" Name="AppName" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>

I also have a RadAjaxManager :
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgPRCA">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgPRCA" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
        Width="75px" Transparency="25">
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
            style="border: 0;" />
    </telerik:RadAjaxLoadingPanel>

Thank you so much for the help
Gina







1 Answer, 1 is accepted

Sort by
0
Gina
Top achievements
Rank 1
answered on 24 Apr 2009, 01:55 PM
i found my issue... I had get() in the update that it did not like... Sorry
Tags
Grid
Asked by
Gina
Top achievements
Rank 1
Answers by
Gina
Top achievements
Rank 1
Share this question
or