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

RadGrid Edit, Insert, Update

1 Answer 589 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aaron Colbran
Top achievements
Rank 2
Aaron Colbran asked on 15 Jun 2008, 12:46 PM
G'day Telerik;

I am using RadGrid automatic edit, update, insert, I have been reviewing my code for the last 6hrs trying to resolve the problem.

Problem including stack trace:

Server Error in '/CWCMATest' Application.

Specified argument was out of the range of valid values.
Parameter name: index

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index]
System.Web.UI.ControlCollection.get_Item(Int32 index) +8659390
Telerik.Web.UI.GridTextBoxColumnEditor.LoadControlsFromContainer() +34
Telerik.Web.UI.GridColumnEditorBase.InitializeFromControl(Control containerControl) +20
Telerik.Web.UI.GridEditFormItem.InitializeEditorInCell(IGridEditableColumn column) +669
Telerik.Web.UI.GridEditManager.GetColumnEditor(IGridEditableColumn column) +57
Telerik.Web.UI.GridBoundColumn.FillValues(IDictionary newValues, GridEditableItem editableItem) +51
Telerik.Web.UI.GridEditableItem.ExtractValues(IDictionary newValues) +100
Telerik.Web.UI.GridEditFormItem.ExtractValues(IDictionary newValues) +65
Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +928
Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +129
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +576
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +416
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
Telerik.Web.UI.GridTableView.PerformSelect() +4
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
Telerik.Web.UI.GridTableView.DataBind() +235
Telerik.Web.UI.RadGrid.DataBind() +80
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
System.Web.UI.Control.EnsureChildControls() +87
Telerik.Web.UI.GridBaseDataList.get_Controls() +15
Telerik.Web.UI.RadAjaxControl.PopulatePlainPanels(Control parent, List`1 list, Control root) +63
Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e) +1090
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnPreRender(EventArgs e) +8673094
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <div> 
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/cmacms.mdb" 
            InsertCommand="INSERT INTO customers_data_0_details(Name_Contact, Name_Entity, CARMSID, Phone_Business, Mobile_Business, ABN, ACN, Name_LegalTrading, TradingNameCount, EntityTypeID, GST_Reg, ABNStatusDate, GSTStatusDate, LastModifiedDate, SAPVendor, State_ID, LocationID, PostcodeID, Fax_Business, CustomerTypeID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" 
            SelectCommand="SELECT * FROM [customers_data_0_details]" UpdateCommand="UPDATE customers_data_0_details SET Name_Contact = ?, Name_Entity = ?, CARMSID = ?, Phone_Business = ?, Mobile_Business = ?, ABN = ?, ACN = ?, Name_LegalTrading = ?, TradingNameCount = ?, EntityTypeID = ?, GST_Reg = ?, ABNStatusDate = ?, GSTStatusDate = ?, LastModifiedDate = ?, SAPVendor = ?, State_ID = ?, LocationID = ?, PostcodeID = ?, Fax_Business = ?, CustomerTypeID = ?"
            <UpdateParameters> 
                <asp:Parameter Name="Name_Contact" Type="String" /> 
                <asp:Parameter Name="Name_Entity" Type="String" /> 
                <asp:Parameter Name="CARMSID" Type="Int32" /> 
                <asp:Parameter Name="Phone_Business" Type="String" /> 
                <asp:Parameter Name="Mobile_Business" Type="String" /> 
                <asp:Parameter Name="ABN" Type="String" /> 
                <asp:Parameter Name="ACN" Type="String" /> 
                <asp:Parameter Name="Name_LegalTrading" Type="String" /> 
                <asp:Parameter Name="TradingNameCount" Type="Int32" /> 
                <asp:Parameter Name="EntityTypeID" Type="Int32" /> 
                <asp:Parameter Name="GST_Reg" Type="Int32" /> 
                <asp:Parameter Name="ABNStatusDate" Type="DateTime" /> 
                <asp:Parameter Name="GSTStatusDate" Type="DateTime" /> 
                <asp:Parameter Name="LastModifiedDate" Type="DateTime" /> 
                <asp:Parameter Name="SAPVendor" Type="String" /> 
                <asp:Parameter Name="LocationID" Type="Int32" /> 
                <asp:Parameter Name="State_ID" Type="Int32" /> 
                <asp:Parameter Name="PostcodeID" Type="Int32" /> 
                <asp:Parameter Name="Fax_Business" Type="String" /> 
                <asp:Parameter Name="CustomerTypeID" Type="String" /> 
            </UpdateParameters> 
            <InsertParameters> 
                <asp:Parameter Name="Name_Contact" Type="String" /> 
                <asp:Parameter Name="Name_Entity" Type="String" /> 
                <asp:Parameter Name="CARMSID" Type="Int32" /> 
                <asp:Parameter Name="Phone_Business" Type="String" /> 
                <asp:Parameter Name="Mobile_Business" Type="String" /> 
                <asp:Parameter Name="ABN" Type="String" /> 
                <asp:Parameter Name="ACN" Type="String" /> 
                <asp:Parameter Name="Name_LegalTrading" Type="String" /> 
                <asp:Parameter Name="TradingNameCount" Type="Int32" /> 
                <asp:Parameter Name="EntityTypeID" Type="Int32" /> 
                <asp:Parameter Name="GST_Reg" Type="Int32" /> 
                <asp:Parameter Name="ABNStatusDate" Type="DateTime" /> 
                <asp:Parameter Name="GSTStatusDate" Type="DateTime" /> 
                <asp:Parameter Name="LastModifiedDate" Type="DateTime" /> 
                <asp:Parameter Name="SAPVendor" Type="String" /> 
                <asp:Parameter Name="LocationID" Type="Int32" /> 
                <asp:Parameter Name="State_ID" Type="Int32" /> 
                <asp:Parameter Name="PostcodeID" Type="Int32" /> 
                <asp:Parameter Name="Fax_Business" Type="String" /> 
                <asp:Parameter Name="CustomerTypeID" Type="String" /> 
            </InsertParameters> 
        </asp:AccessDataSource> 
        <asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/App_Data/cmacms.mdb" 
            SelectCommand="SELECT [LocationID], [Town]  FROM [customers_lut_location]"></asp:AccessDataSource> 
        <asp:AccessDataSource ID="AccessDataSource3" runat="server" DataFile="~/App_Data/cmacms.mdb" 
            SelectCommand="SELECT [State], [State_ID] FROM [shared_lut_state_name]"></asp:AccessDataSource> 
        <asp:AccessDataSource ID="AccessDataSource4" runat="server" DataFile="~/App_Data/cmacms.mdb" 
            SelectCommand="SELECT [CARMSID], [UniqueCARMSID] FROM [customers_data_1_carms]"
        </asp:AccessDataSource> 
        <asp:AccessDataSource ID="AccessDataSource5" runat="server" DataFile="~/App_Data/cmacms.mdb" 
            SelectCommand="SELECT [PostCodeID], [Postcode] FROM [shared_lut_postcodes_nsw]"
        </asp:AccessDataSource> 
        <asp:AccessDataSource ID="AccessDataSource6" runat="server" DataFile="~/App_Data/cmacms.mdb" 
            SelectCommand="SELECT [CustomerTypeID], [Customer_Type] FROM [customers_lut_customer_type]"
        </asp:AccessDataSource> 
        <asp:AccessDataSource ID="AccessDataSource7" runat="server" DataFile="~/App_Data/cmacms.mdb" 
            SelectCommand="SELECT [EntityTypeID], [EntityType] FROM [customers_lut_entity_type]"
        </asp:AccessDataSource> 
        <asp:XmlDataSource ID="XmlDataSource1" runat="server"
            <Data> 
                <Items> 
                      <Item Value="0" Text="Inactive"/> 
                      <Item Value="1" Text="Active"/> 
                      <Item Value="2" Text="Cancelled"/> 
                    </Items> 
            </Data> 
        </asp:XmlDataSource> 
    </div> 
    <div> 
        <br /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableHistory="True"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadGrid1"
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
            Transparency="20" Width="75px"
            <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                style="border: 0;" /></telerik:RadAjaxLoadingPanel> 
        <br /> 
        <br /> 
        <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server"
            <NumericTextBox EmptyMessage="Ext." MaxLength="4"
                <NumberFormat GroupSeparator="" /> 
            </NumericTextBox></telerik:GridNumericColumnEditor> 
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server"
        </telerik:GridTextBoxColumnEditor> 
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
            AllowAutomaticUpdates="True" AllowSorting="True" AutoGenerateDeleteColumn="True" 
            DataSourceID="AccessDataSource1" EnableAJAX="True" GridLines="None" Skin="Vista"
            <ExportSettings FileName="CustomersList" IgnorePaging="True"
                <Excel Format="ExcelML" /> 
            </ExportSettings> 
            <MasterTableView AllowPaging="True" AutoGenerateColumns="False" CommandItemDisplay="Top" 
                DataKeyNames="CustomerID" PageSize="25" Width="100%" GridLines="Vertical"
                <CommandItemTemplate> 
                    <div style="float: right"
                        <asp:Label ID="Label50" runat="server" Text="Filter:"></asp:Label> 
                        <asp:DropDownList ID="ddlFieldName" runat="server"
                            <asp:ListItem Text="Name Contact" Value="Name_Contact" Selected="True"></asp:ListItem> 
                            <asp:ListItem Text="Entity Name" Value="Name_Entity" Selected="False"></asp:ListItem> 
                            <asp:ListItem Text="CARMSID" Value="CARMSID" Selected="False"></asp:ListItem> 
                        </asp:DropDownList> 
                        <asp:TextBox ID="txtSearch" onkeypress="doFilter(this, event)" runat="server"></asp:TextBox> 
                        <asp:Button ID="btnSearch" runat="server" CommandName="btnSearch" Text="Filter" /> 
                        <asp:Button ID="btnShowAll" runat="server" CommandName="btnShowAll" Text="Show All" /> 
                    </div> 
                </CommandItemTemplate> 
                <RowIndicatorColumn Visible="False"
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn Resizable="False" Visible="False"
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridEditCommandColumn AutoPostBackOnFilter="True" UniqueName="EditCommandColumn"
                        <ItemStyle Width="50px" /> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridHyperLinkColumn DataNavigateUrlFields="CustomerID" DataNavigateUrlFormatString="~/CustCalls.aspx?CustomerID={0}" 
                        HeaderText="View Calls" Text="Rentals" UniqueName="Column1"
                    </telerik:GridHyperLinkColumn> 
                    <telerik:GridHyperLinkColumn DataNavigateUrlFields="CustomerID" DataNavigateUrlFormatString="~/SAP.aspx?CustomerID(0)" 
                        HeaderText="View SAP Details" Text="Sales" UniqueName="column2"
                    </telerik:GridHyperLinkColumn> 
 
                    <telerik:GridBoundColumn DataField="CustomerID" Display="false" HeaderText="CustomerID" 
                        ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID" Visible="False"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Name_Contact" HeaderText="Contact Name" SortExpression="Name_Contact" 
                        UniqueName="Name_Contact" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="" HeaderText="Entity Name" SortExpression="Name_Entity" 
                        UniqueName="Name_Entity" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridDropDownColumn DataField="CARMSID" DataSourceID="AccessDataSource4" 
                        DropDownControlType="RadComboBox" HeaderText="CARMSID" ListTextField="CARMSID" 
                        ListValueField="UniqueCARMSID" SortExpression="CARMSID" UniqueName="CARMSID" 
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridDropDownColumn> 
                    <telerik:GridBoundColumn DataField="Phone_Business" HeaderText="Phone_Business" SortExpression="Phone_Business" 
                        UniqueName="Phone_Business" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Mobile_Business" HeaderText="Mobile_Business" 
                        SortExpression="Mobile_Business" UniqueName="Mobile_Business" AutoPostBackOnFilter="True" 
                        CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Fax_Business" HeaderText="Fax_Business" SortExpression="Fax_Business" 
                        UniqueName="Fax_Business" AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ABN" HeaderText="ABN" SortExpression="ABN" UniqueName="ABN" 
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ACN" HeaderText="ACN" SortExpression="ACN" UniqueName="ACN" 
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Name_LegalTrading" HeaderText="Name_LegalTrading" 
                        SortExpression="Name_LegalTrading" UniqueName="Name_LegalTrading" AutoPostBackOnFilter="True" 
                        CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="TradingNameCount" HeaderText="TradingNameCount" 
                        SortExpression="TradingNameCount" UniqueName="TradingNameCount" AutoPostBackOnFilter="True" 
                        CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridDropDownColumn DataField="EntityTypeID" DataSourceID="AccessDataSource7" 
                        DropDownControlType="RadComboBox" HeaderText="Entity Type" ListTextField="EntityTypeID" 
                        ListValueField="EntityTypeID" SortExpression="EntityTypeID" UniqueName="EntityTypeID" 
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridDropDownColumn> 
                    <telerik:GridDropDownColumn DataField="GST_Reg" DataSourceID="XmlDataSource1" DropDownControlType="RadComboBox" 
                        HeaderText="GST Registered" ListTextField="Text" ListValueField="Value" SortExpression="GST_Reg" 
                        UniqueName="GST_Reg" AutoPostBackOnFilter="True"  
                        CurrentFilterFunction="Contains"
                    </telerik:GridDropDownColumn> 
                    <%--                    <telerik:GridCheckBoxColumn DataField=""></telerik:GridCheckBoxColumn>--%> 
                    <telerik:GridBoundColumn DataField="ABN" HeaderText="ABN" SortExpression="ABN" UniqueName="ABN" 
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ABN" HeaderText="ABN" SortExpression="ABN" UniqueName="ABN" 
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridDateTimeColumn UniqueName="ABNStatusDate" PickerType="DatePicker" HeaderText="ABN Status Date" 
                        DataField="ABNStatusDate" DataFormatString="{0:d}"
                        <ItemStyle Width="120px" /> 
                    </telerik:GridDateTimeColumn> 
                    <telerik:GridDateTimeColumn UniqueName="GSTStatusDate" PickerType="DatePicker" HeaderText="GST Status Date" 
                        DataField="GSTStatusDate" DataFormatString="{0:d}"
                        <ItemStyle Width="120px" /> 
                    </telerik:GridDateTimeColumn> 
                    <telerik:GridDateTimeColumn UniqueName="LastModifiedDate" PickerType="DatePicker" 
                        HeaderText="Last Modified Date" DataField="LastModifiedDate"  
                        DataFormatString="{0:d}"
                        <ItemStyle Width="120px" /> 
                    </telerik:GridDateTimeColumn> 
                    <telerik:GridBoundColumn DataField="SAPVendor" HeaderText="SAP Vendor" SortExpression="SAPVendor" 
                        UniqueName="SAPVendor" AutoPostBackOnFilter="True"  
                        CurrentFilterFunction="Contains"
                    </telerik:GridBoundColumn> 
                    <telerik:GridDropDownColumn DataField="LocationID" DataSourceID="AccessDataSource2" 
                        DropDownControlType="RadComboBox" HeaderText="Town" ListTextField="Town" ListValueField="LocationID" 
                        SortExpression="LocationID" UniqueName="LocationID" AutoPostBackOnFilter="True" 
                        CurrentFilterFunction="Contains"
                    </telerik:GridDropDownColumn> 
                    <%--                    <telerik:GridBoundColumn DataField="PostcodeID" HeaderText="Postcode"  
                        SortExpression="PostcodeID" UniqueName="PostcodeID" 
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"  
                        Display="False"
                    </telerik:GridBoundColumn> 
--%> 
                    <telerik:GridDropDownColumn DataField="PostcodeID" DataSourceID="AccessDataSource5" 
                        DropDownControlType="RadComboBox" HeaderText="Postcode" ListTextField="Postcode" 
                        ListValueField="PostcodeID" SortExpression="PostcodeID" UniqueName="PostcodeID" 
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridDropDownColumn> 
                    <telerik:GridDropDownColumn DataField="State_ID" DataSourceID="AccessDataSource3" 
                        DropDownControlType="RadComboBox" HeaderText="State" ListTextField="State" ListValueField="State_ID" 
                        SortExpression="State_ID" UniqueName="State_ID"  
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridDropDownColumn> 
                    <telerik:GridDropDownColumn DataField="CustomerTypeID" DataSourceID="AccessDataSource6" 
                        DropDownControlType="RadComboBox" HeaderText="Customer Type" ListTextField="Customer_Type" 
                        ListValueField="CustomerTypeID" SortExpression="Customer_Type" UniqueName="Customer_Type" 
                        AutoPostBackOnFilter="True" CurrentFilterFunction="Contains"
                    </telerik:GridDropDownColumn> 
                    <%--                    <telerik:GridMaskedColumn DataField="Customer_Phone" HeaderText="Phone" Mask="##########" 
                        SortExpression="Customer_Phone" UniqueName="Customer_Phone" AutoPostBackOnFilter="True" 
                        CurrentFilterFunction="Contains"
                        <ItemStyle Width="100px" /> 
                    </telerik:GridMaskedColumn> 
                    <telerik:GridMaskedColumn DataField="Customer_Mobile" HeaderText="Mobile" Mask="##########" 
                        SortExpression="Customer_Mobile" UniqueName="Customer_Mobile"
                        <ItemStyle Width="100px" /> 
                    </telerik:GridMaskedColumn> 
                    <telerik:GridMaskedColumn DataField="Customer_Fax" HeaderText="Fax" Mask="##########" 
                        SortExpression="Customer_Fax" UniqueName="Customer_Fax"
                        <ItemStyle Width="100px" /> 
                    </telerik:GridMaskedColumn> 
                    <telerik:GridBoundColumn DataField="Customer_Email" HeaderText="Customer_Email" SortExpression="Customer_Email" 
                        UniqueName="Customer_Email"
                    </telerik:GridBoundColumn> 
                    <telerik:GridHTMLEditorColumn DataField="Notes" HeaderText="Notes" SortExpression="Notes" 
                        UniqueName="Notes"
                    </telerik:GridHTMLEditorColumn> 
--%> 
                </Columns> 
                <EditFormSettings> 
                    <EditColumn UniqueName="EditCommandColumn1"
                    </EditColumn> 
                    <PopUpSettings ScrollBars="None"></PopUpSettings> 
                </EditFormSettings> 
                <PagerStyle Mode="Slider" /> 
            </MasterTableView> 
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="True"
            </ClientSettings> 
        </telerik:RadGrid> 
    </div> 
    </form> 
</body> 
</html> 
 

C#
using System; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using Telerik.Web.UI; 
 
public partial class _Default : Page  
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
            RadGrid1.EditIndexes.Add(0); 
        } 
        if (Request.QueryString["CustomerID"] != null
        { 
            Session["CustomerID"] = Request.QueryString["CustomerID"].ToString(); 
            Response.Redirect("~/CustCall.aspx"); 
        } 
        if (Request.QueryString["CustomerID"] != null
        { 
            Session["CustomerID"] = Request.QueryString["CustomerID"].ToString(); 
            Response.Redirect("~/SAP.aspx"); 
        } 
    } 
    //protected void form1_Load(object sender, EventArgs e) 
    //{ 
    //    if (User.Identity.IsAuthenticated == false) 
    //    { 
    //        Server.Transfer("login.aspx"); 
    //    } 
 
    //    if (Roles.IsUserInRole("Users") == false) 
    //        Server.Transfer("PageCannotBeDisplayed.aspx"); 
    //} 
    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) 
    { 
        if (e.CommandName == "btnSearch"
        { 
            Button btn = (Button)e.CommandSource; 
            TextBox txt = btn.NamingContainer.FindControl("txtSearch"as TextBox; 
 
            if (source is RadGrid) 
            { 
                Session["filter1"] = txt.Text; 
            } 
        } 
        else if (e.CommandName == "btnShowAll"
        { 
            Session["filter1"] = null
        } 
 
    } 

I also cannot get the textbox filter to work properly.

how can i have mulitiple check boxes bound to an access db  in one colomun in edit mode and be able to check mulipules and when the update/insert is complete
only see thypes that were selected in edit mode seperated by a comma?

and i only want to be in edit mde when the user selects edit how do i fix this with automatic operations....?

Cheers

Trent

p.s I would have sent the entire project but the db alone is 50mb..

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 17 Jun 2008, 07:43 AM
Hi Aaron,

Based on the code snippet supplied, it is hard to determine the cause of the issue. In order to further progress with the investigation, it would be best if you open a formal support ticket, and send us a small working project, which we can debug locally. As soon as we do, we will get back to you with our findings.

Greetings,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Aaron Colbran
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Share this question
or