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

Image Missing In Inline Edit Mode

7 Answers 207 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 09 Feb 2010, 09:58 PM

[UPDATE]  I have attached an image highlighting the error.

THanks.

[Original message below] 

I am using the Inline Edit Mode of the radgrid.  When I enter Edit mode, the images for the control cannot be located.  For example, when I click the "Add New Record" link,  the "BreakStartTime" control displays "Open the time view popup" instead of showing the image for the time picker. 

Here is a code snippet:

<MasterTableView DataKeyNames="SchedNbr" HierarchyLoadMode="ServerOnDemand" Name="MainList"     
Width="95%" CommandItemDisplay="Bottom" InsertItemDisplay="Top" EditMode="InPlace"     
EditItemStyle-BackColor="BurlyWood">     
<Columns>    
    <telerik:GridBoundColumn UniqueName="Descript" SortExpression="Descript" HeaderText="<% $Resources:PageControls, Description %>" DataField="Descript" MaxLength="60" />     
    <telerik:GridNumericColumn UniqueName="BreakDuration" SortExpression="Duration" HeaderText="<% $Resources:PageControls, Duration %>" DataField="BreakDuration" NumericType="Number" MaxLength="3" />   
    <telerik:GridDateTimeColumn PickerType="TimePicker" UniqueName="BreakStartTime" HeaderText="<% $Resources:PageControls, StartTime %>" DataField="BreakStartTime" DataFormatString="{0:t}" />   
    <telerik:GridDateTimeColumn PickerType="TimePicker" UniqueName="BreakEndTime" HeaderText="<% $Resources:PageControls, EndTime %>" DataField="BreakEndTime" DataFormatString="{0:t}" />     
    <telerik:GridEditCommandColumn UpdateText="Update" UniqueName="EditCommandColumn"    
ButtonType="ImageButton" EditImageUrl="~/Images/icon_edit_16.png" CancelImageUrl="~/Images/icon_cancel_filter.png"    
InsertImageUrl="~/Images/icon_add_16.png">     
<HeaderStyle></HeaderStyle>    
</telerik:GridEditCommandColumn>   
    <telerik:GridButtonColumn CommandName="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" mageUrl="~/Images/icon_remove_16.png" />   
</Columns>   
<CommandItemSettings AddNewRecordText="Add new record" AddNewRecordImageUrl="~/Images/icon_add_16.png" />   
</MasterTableView> 

Any thoughts of what I can look for?

Thanks.
Steve

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 12 Feb 2010, 12:31 PM
Hi Steve,

Could you please prepare and send us a simple running project via a regular support ticket? Thus we can reproduce the problem locally, research what is causing it and provide a solution.

Looking forward for your reply.

Regards,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Steve
Top achievements
Rank 1
answered on 12 Feb 2010, 01:33 PM
Pavlina,

I have created a simple project that highlights my issue.  Unfortunately, I am unable to submit a support ticket because our support contract has expired.  What options do I have available to me so you can review the sample project?

Thanks.

Steve
0
Pavlina
Telerik team
answered on 16 Feb 2010, 03:27 PM
Hello Steve,

At this point I suggest that you send us the whole problematic page (aspx/code-behind) so we could investigate your case in depth and provide a proper solution for you.

Sincerely yours,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Steve
Top achievements
Rank 1
answered on 16 Feb 2010, 03:46 PM
Pavlina,

How can I get the project to you?  Your Attach your files option does not allow ZIP files.

Thanks.

Steve
0
Pavlina
Telerik team
answered on 17 Feb 2010, 05:19 PM
Hello Steve,

Could you paste your aspx and code-behind in this thread(please, use the code formatter tool of the ticket editor to paste your code).

Best wishes,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Steve
Top achievements
Rank 1
answered on 17 Feb 2010, 05:30 PM
Here is the aspx page:

<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="Default.aspx.cs" Inherits="InlineEdit.DefaultCS" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <!-- end of custom head section --> 
    <style> 
        body, table  
        {  
            font-family: Verdana;  
            font-size: 11px;  
        }  
    </style> 
</head> 
<body> 
    <form runat="server" id="mainForm" method="post" onprerender="Page_PreRender">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <!-- content start --> 
    <div class="bigModule">  
        <div class="bigModuleBottom">  
            <div class="title">  
                To test the editing capabilities on this demo:</div> 
            <ul> 
                <li>Edit/Update/Insert/Delete records by pressing the corresponding buttons or double-clicking  
                    a record</li> 
                <li>Switch the edit modes using the options at the top of the page</li> 
                <li>Enable/Disable Multiline edit mode</li> 
            </ul> 
        </div> 
    </div> 
    <div class="module" style="height: 50px; width: 92%;">  
        <div style="float: left;">  
            <asp:RadioButton ID="RadioButton1" AutoPostBack="True" Text="In-forms editing mode" 
                runat="server" Checked="True" OnCheckedChanged="RadioCheckedChanged"></asp:RadioButton> 
            <asp:RadioButton ID="RadioButton2" AutoPostBack="True" Text="In-line editing mode" 
                runat="server" OnCheckedChanged="RadioCheckedChanged"></asp:RadioButton> 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
        </div> 
        <div style="float: left; margin: 10px;">  
            <asp:CheckBox ID="CheckBox1" Text="Allow multi-row edit" AutoPostBack="True" runat="server" 
                OnCheckedChanged="CheckBox1_CheckedChanged"></asp:CheckBox> 
        </div> 
        <div style="clear: both;">  
        </div> 
    </div> 
    <br /> 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
 
        <script type="text/javascript">  
            function RowDblClick(sender, eventArgs) {  
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());  
            }  
        </script> 
 
    </telerik:RadCodeBlock> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadioButton1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadioButton2" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadioButton2">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadioButton1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="CheckBox1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadGrid ID="RadGrid1" runat="server" Width="96%" GridLines="None" AutoGenerateColumns="False" 
        PageSize="13" AllowSorting="True" AllowPaging="True" OnUpdateCommand="RadGrid1_UpdateCommand" 
        OnNeedDataSource="RadGrid1_NeedDataSource" ShowStatusBar="true" OnInsertCommand="RadGrid1_InsertCommand" 
        OnDeleteCommand="RadGrid1_DeleteCommand">  
        <MasterTableView DataKeyNames="EmployeeID" AllowMultiColumnSorting="True" Width="100%" 
            CommandItemDisplay="Top" EditItemStyle-BackColor="Red">  
            <Columns> 
                <telerik:GridBoundColumn ReadOnly="true" UniqueName="FirstName" SortExpression="FirstName" 
                    HeaderText="First name" DataField="FirstName" /> 
                <telerik:GridBoundColumn UniqueName="LastName" SortExpression="LastName" HeaderText="Last name" 
                    DataField="LastName" ItemStyle-Width="200" /> 
                <telerik:GridDateTimeColumn PickerType="TimePicker" UniqueName="HireDate" HeaderText="Hire date" 
                    DataField="HireDate" DataFormatString="{0:t}" /> 
                <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" /> 
                <telerik:GridEditCommandColumn UpdateText="Update" UniqueName="EditCommandColumn" 
                    CancelText="Cancel" EditText="Edit">  
                    <HeaderStyle Width="85px"></HeaderStyle> 
                </telerik:GridEditCommandColumn> 
            </Columns> 
            <EditFormSettings CaptionFormatString="Edit details for employee with ID {0}" CaptionDataField="EmployeeID">  
                <FormTableItemStyle Width="100%" Height="29px"></FormTableItemStyle> 
                <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle> 
                <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle> 
                <EditColumn ButtonType="ImageButton" /> 
            </EditFormSettings> 
        </MasterTableView> 
        <ClientSettings> 
            <ClientEvents OnRowDblClick="RowDblClick" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    <telerik:RadGrid ID="grdBreaksList" runat="server" Height="150" EnableEmbeddedSkins="False" 
        Skin="Premise" AutoGenerateColumns="False" AllowSorting="false" Width="98%" GridLines="None" 
        OnNeedDataSource="grdBreaksList_NeedDataSource"   
        OnInsertCommand="grdBreaksList_InsertCommand" OnDeleteCommand="grdBreaksList_DeleteCommand" 
        OnUpdateCommand="grdBreaksList_UpdateCommand" ShowStatusBar="true">  
        <ClientSettings EnableRowHoverStyle="true">  
            <Selecting AllowRowSelect="true" /> 
            <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
            <ClientEvents OnGridCreated="GridHeight" /> 
        </ClientSettings> 
        <MasterTableView DataKeyNames="EmployeeID" Name="MainList" Width="95%" CommandItemDisplay="Bottom" 
            InsertItemDisplay="Top" EditMode="InPlace" EditItemStyle-BackColor="BurlyWood">  
            <Columns> 
                <telerik:GridBoundColumn UniqueName="Descript" SortExpression="Descript" HeaderText="Description" 
                    DataField="FirstName" MaxLength="60" /> 
                <telerik:GridNumericColumn UniqueName="BreakDuration" SortExpression="Duration" HeaderText="Duration" 
                    DataField="BreakDuration" NumericType="Number" MaxLength="3" /> 
                <telerik:GridDateTimeColumn PickerType="TimePicker" UniqueName="BreakStartTime" HeaderText="StartTime" 
                    DataField="HireDate" DataFormatString="{0:t}" /> 
                <telerik:GridDateTimeColumn ReadOnly="true" PickerType="TimePicker" UniqueName="BreakEndTime" 
                    HeaderText="EndTime" DataField="HireDate" 
                    DataFormatString="{0:t}" /> 
                <telerik:GridEditCommandColumn UpdateText="Update" UniqueName="EditCommandColumn" 
                    ButtonType="ImageButton" EditImageUrl="~/Images/icon_edit_16.png" CancelImageUrl="~/Images/icon_cancel_filter.png" 
                    InsertImageUrl="~/Images/icon_add_16.png" UpdateImageUrl="~/Images/icon_save_16.png">  
                    <HeaderStyle></HeaderStyle>  
                </telerik:GridEditCommandColumn> 
                <telerik:GridButtonColumn CommandName="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" 
                    ImageUrl="~/Images/icon_remove_16.png" /> 
            </Columns> 
            <CommandItemSettings AddNewRecordText="Add new record" AddNewRecordImageUrl="~/Images/icon_add_16.png" /> 
        </MasterTableView> 
    </telerik:RadGrid> 
    <!-- content end --> 
    </form> 
</body> 
</html> 
 

Here is the code behind:

using System;  
using System.Configuration;  
using System.Data;  
using System.Data.SqlClient;  
using System.Web.UI.WebControls;  
using System.Web.UI;  
 
using Telerik.Web.UI;  
 
namespace InlineEdit  
{  
    public partial class DefaultCS : System.Web.UI.Page  
    {  
        protected void RadioCheckedChanged(object sender, System.EventArgs e)  
        {  
            switch ((sender as RadioButton).ID)  
            {  
                case "RadioButton1":  
                    {  
                        RadGrid1.MasterTableView.EditMode = GridEditMode.EditForms;  
                        RadioButton1.Checked = true;  
                        RadioButton2.Checked = false;  
                        break;  
                    }  
                case "RadioButton2":  
                    {  
                        RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace;  
                        RadioButton1.Checked = false;  
                        RadioButton2.Checked = true;  
                        break;  
                    }  
            }  
            RadGrid1.Rebind();  
        }  
 
        public DataSet EmployeesData  
        {  
            get  
            {  
                object obj = this.Session["EmployeesData"];  
                if (obj != null)  
                {  
                    return (DataSet)obj;  
                }  
 
                DataSet employeesData = new DataSet();  
 
                String ConnString = ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString;  
                //String ConnString = ConfigurationManager.AppSettings["PREMISE.CONNECT"].ToString();  
                SqlConnection conn = new SqlConnection(ConnString);  
                //SqlDataAdapter adapter = new SqlDataAdapter();  
                //adapter.SelectCommand = new SqlCommand("SELECT EmployeeID, FirstName, LastName, TitleOfCourtesy, HireDate FROM Employees;", conn);  
 
                //adapter.Fill(employeesData, "Employees");  
                //adapter.Fill(employeesData, "BreakTyp");  
 
                //-----------------------------------------------------  
                //Create a SqlDataAdapter for the Suppliers table.  
                SqlDataAdapter adapter = new SqlDataAdapter();  
 
                // A table mapping names the DataTable.  
                adapter.TableMappings.Add("Table", "Employees");  
 
                // Create a SqlCommand to retrieve Suppliers data.  
                SqlCommand command = new SqlCommand("SELECT EmployeeID, FirstName, LastName, TitleOfCourtesy, HireDate FROM Employees;", conn);  
                command.CommandType = CommandType.Text;  
 
                // Set the SqlDataAdapter's SelectCommand.  
                adapter.SelectCommand = command;  
 
                // Fill the DataSet.  
                DataSet dataSet = new DataSet("Employees");  
                adapter.Fill(dataSet);  
 
                // Create a second Adapter and Command to get  
                // the Products table, a child table of Suppliers.   
                SqlDataAdapter productsAdapter = new SqlDataAdapter();  
                productsAdapter.TableMappings.Add("Table", "BreakTyp");  
 
                SqlCommand productsCommand = new SqlCommand("SELECT BreakTypCd, Descript FROM BreakTyp;", conn);  
                productsAdapter.SelectCommand = productsCommand;  
 
                // Fill the DataSet.  
                productsAdapter.Fill(dataSet);  
                this.Session["EmployeesData"] = dataSet;  
 
                //-----------------------------------------------------  
 
 
                //this.Session["EmployeesData"] = employeesData;  
 
                conn.Close();  
 
                //return employeesData;  
                return dataSet;  
            }  
        }  
 
        protected void Page_Load(object sender, System.EventArgs e)  
        {  
            if (!this.IsPostBack)  
            {  
            }  
        }  
 
        protected void Page_PreRender(object sender, System.EventArgs e)  
        {  
            if (!this.IsPostBack)  
            {  
                //this.RadGrid1.MasterTableView.Items[0].Edit = true;  
                this.RadGrid1.MasterTableView.Rebind();  
                this.grdBreaksList.MasterTableView.Rebind();  
            }  
        }  
 
        protected void CheckBox1_CheckedChanged(object sender, System.EventArgs e)  
        {  
            thisthis.RadGrid1.AllowMultiRowEdit = this.CheckBox1.Checked;  
            this.RadGrid1.Rebind();  
        }  
 
        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
        {  
            thisthis.RadGrid1.DataSource = this.EmployeesData;  
            this.EmployeesData.Tables["Employees"].PrimaryKey = new DataColumn[] { this.EmployeesData.Tables["Employees"].Columns["EmployeeID"] };  
        }  
        protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)  
        {  
            GridEditableItem eeditedItem = e.Item as GridEditableItem;  
            //GridEditManager editMan = editedItem.EditManager;  
            //DataTable employeesTable = this.EmployeesData.Tables["Employees"];  
 
            //DataRow newRow = employeesTable.NewRow();  
 
            ////Set new values  
 
            //foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)  
            //{  
            //    if (column is IGridEditableColumn)  
            //    {  
            //        IGridEditableColumn editableCol = (column as IGridEditableColumn);  
            //        if (editableCol.IsEditable)  
            //        {  
            //            IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);  
 
            //            string editorText = "unknown";  
            //            object editorValue = null;  
 
            //            if (editor is GridTextColumnEditor)  
            //            {  
            //                editorText = (editor as GridTextColumnEditor).Text;  
            //                editorValue = (editor as GridTextColumnEditor).Text;  
            //            }  
 
            //            if (editor is GridBoolColumnEditor)  
            //            {  
            //                editorText = (editor as GridBoolColumnEditor).Value.ToString();  
            //                editorValue = (editor as GridBoolColumnEditor).Value;  
            //            }  
 
            //            if (editor is GridDropDownColumnEditor)  
            //            {  
            //                editorText = (editor as GridDropDownColumnEditor).SelectedText + "; " +  
            //                 (editor as GridDropDownColumnEditor).SelectedValue;  
            //                editorValue = (editor as GridDropDownColumnEditor).SelectedValue;  
            //            }  
 
            //            try  
            //            {  
            //                newRow[column.UniqueName] = editorValue;  
            //            }  
            //            catch (Exception ex)  
            //            {  
            //                RadGrid1.Controls.Add(new LiteralControl("Unable to insert into Employees. Reason: " + ex.Message));  
            //                e.Canceled = true;  
            //            }  
 
            //        }  
            //    }  
            //}  
            ////As this example demonstrates only in-memory editing, a new primary key value should be generated  
            ////This should not be applied when updating directly the database  
            //newRow["EmployeeID"] = (int)employeesTable.Rows[employeesTable.Rows.Count - 1]["EmployeeID"] + 1;  
 
            //employeesTable.Rows.Add(newRow);  
            ////this.EmployeesData.Tables["Employees"].AcceptChanges();  
        }  
        protected void RadGrid1_DeleteCommand(object source, GridCommandEventArgs e)  
        {  
            string ID = (e.Item as GridDataItem).OwnerTableView.DataKeyValues[e.Item.ItemIndex]["EmployeeID"].ToString();  
            DataTable employeeTable = this.EmployeesData.Tables["Employees"];  
            if (employeeTable.Rows.Find(ID) != null)  
            {  
                employeeTable.Rows.Find(ID).Delete();  
                employeeTable.AcceptChanges();  
            }  
        }  
        protected void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
            GridEditableItem eeditedItem = e.Item as GridEditableItem;  
            GridEditManager editMan = editedItem.EditManager;  
 
            foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)  
            {  
                if (column is IGridEditableColumn)  
                {  
                    IGridEditableColumn editableCol = (column as IGridEditableColumn);  
                    if (editableCol.IsEditable)  
                    {  
                        IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);  
 
                        string editoreditorType = editor.ToString();  
                        string editorText = "unknown";  
                        object editorValue = null;  
 
                        if (editor is GridTextColumnEditor)  
                        {  
                            editorText = (editor as GridTextColumnEditor).Text;  
                            editorValue = (editor as GridTextColumnEditor).Text;  
                        }  
 
                        if (editor is GridBoolColumnEditor)  
                        {  
                            editorText = (editor as GridBoolColumnEditor).Value.ToString();  
                            editorValue = (editor as GridBoolColumnEditor).Value;  
                        }  
 
                        if (editor is GridDropDownColumnEditor)  
                        {  
                            editorText = (editor as GridDropDownColumnEditor).SelectedText + "; " +  
                                (editor as GridDropDownColumnEditor).SelectedValue;  
                            editorValue = (editor as GridDropDownColumnEditor).SelectedValue;  
                        }  
 
                        try  
                        {  
                            DataRow[] changedRows = this.EmployeesData.Tables["Employees"].Select("EmployeeIDEmployeeID = " + editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["EmployeeID"]);  
                            changedRows[0][column.UniqueName] = editorValue;  
                            this.EmployeesData.Tables["Employees"].AcceptChanges();  
                        }  
                        catch (Exception ex)  
                        {  
                            RadGrid1.Controls.Add(new LiteralControl("<strong>Unable to set value of column '" + column.UniqueName + "'</strong> - " + ex.Message));  
                            e.Canceled = true;  
                            break;  
                        }  
                    }  
                }  
            }  
        }  
 
        protected void grdBreaksList_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
        {  
            thisthis.grdBreaksList.DataSource = this.EmployeesData;  
            this.EmployeesData.Tables["Employees"].PrimaryKey = new DataColumn[] { this.EmployeesData.Tables["Employees"].Columns["EmployeeID"] };  
        }  
        protected void grdBreaksList_InsertCommand(object source, GridCommandEventArgs e)  
        {  
            GridEditableItem eeditedItem = e.Item as GridEditableItem;  
            //GridEditManager editMan = editedItem.EditManager;  
            //DataTable employeesTable = this.EmployeesData.Tables["Employees"];  
 
            //DataRow newRow = employeesTable.NewRow();  
 
            ////Set new values  
 
            //foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)  
            //{  
            //    if (column is IGridEditableColumn)  
            //    {  
            //        IGridEditableColumn editableCol = (column as IGridEditableColumn);  
            //        if (editableCol.IsEditable)  
            //        {  
            //            IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);  
 
            //            string editorText = "unknown";  
            //            object editorValue = null;  
 
            //            if (editor is GridTextColumnEditor)  
            //            {  
            //                editorText = (editor as GridTextColumnEditor).Text;  
            //                editorValue = (editor as GridTextColumnEditor).Text;  
            //            }  
 
            //            if (editor is GridBoolColumnEditor)  
            //            {  
            //                editorText = (editor as GridBoolColumnEditor).Value.ToString();  
            //                editorValue = (editor as GridBoolColumnEditor).Value;  
            //            }  
 
            //            if (editor is GridDropDownColumnEditor)  
            //            {  
            //                editorText = (editor as GridDropDownColumnEditor).SelectedText + "; " +  
            //                 (editor as GridDropDownColumnEditor).SelectedValue;  
            //                editorValue = (editor as GridDropDownColumnEditor).SelectedValue;  
            //            }  
 
            //            try  
            //            {  
            //                newRow[column.UniqueName] = editorValue;  
            //            }  
            //            catch (Exception ex)  
            //            {  
            //                RadGrid1.Controls.Add(new LiteralControl("Unable to insert into Employees. Reason: " + ex.Message));  
            //                e.Canceled = true;  
            //            }  
 
            //        }  
            //    }  
            //}  
            ////As this example demonstrates only in-memory editing, a new primary key value should be generated  
            ////This should not be applied when updating directly the database  
            //newRow["EmployeeID"] = (int)employeesTable.Rows[employeesTable.Rows.Count - 1]["EmployeeID"] + 1;  
 
            //employeesTable.Rows.Add(newRow);  
            ////this.EmployeesData.Tables["Employees"].AcceptChanges();  
        }  
        protected void grdBreaksList_DeleteCommand(object source, GridCommandEventArgs e)  
        {  
            string ID = (e.Item as GridDataItem).OwnerTableView.DataKeyValues[e.Item.ItemIndex]["EmployeeID"].ToString();  
            DataTable employeeTable = this.EmployeesData.Tables["Employees"];  
            if (employeeTable.Rows.Find(ID) != null)  
            {  
                employeeTable.Rows.Find(ID).Delete();  
                employeeTable.AcceptChanges();  
            }  
        }  
        protected void grdBreaksList_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
            GridEditableItem eeditedItem = e.Item as GridEditableItem;  
            GridEditManager editMan = editedItem.EditManager;  
 
            foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)  
            {  
                if (column is IGridEditableColumn)  
                {  
                    IGridEditableColumn editableCol = (column as IGridEditableColumn);  
                    if (editableCol.IsEditable)  
                    {  
                        IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);  
 
                        string editoreditorType = editor.ToString();  
                        string editorText = "unknown";  
                        object editorValue = null;  
 
                        if (editor is GridTextColumnEditor)  
                        {  
                            editorText = (editor as GridTextColumnEditor).Text;  
                            editorValue = (editor as GridTextColumnEditor).Text;  
                        }  
 
                        if (editor is GridBoolColumnEditor)  
                        {  
                            editorText = (editor as GridBoolColumnEditor).Value.ToString();  
                            editorValue = (editor as GridBoolColumnEditor).Value;  
                        }  
 
                        if (editor is GridDropDownColumnEditor)  
                        {  
                            editorText = (editor as GridDropDownColumnEditor).SelectedText + "; " +  
                                (editor as GridDropDownColumnEditor).SelectedValue;  
                            editorValue = (editor as GridDropDownColumnEditor).SelectedValue;  
                        }  
 
                        try  
                        {  
                            DataRow[] changedRows = this.EmployeesData.Tables["Employees"].Select("EmployeeIDEmployeeID = " + editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["EmployeeID"]);  
                            changedRows[0][column.UniqueName] = editorValue;  
                            this.EmployeesData.Tables["Employees"].AcceptChanges();  
                        }  
                        catch (Exception ex)  
                        {  
                            RadGrid1.Controls.Add(new LiteralControl("<strong>Unable to set value of column '" + column.UniqueName + "'</strong> - " + ex.Message));  
                            e.Canceled = true;  
                            break;  
                        }  
                    }  
                }  
            }  
        }  
    }  
}  
 

thanks.
0
Pavlina
Telerik team
answered on 23 Feb 2010, 08:19 AM
Hi Steve,

Thank you for the provided code. I was able to replicate the issue you are facing - RadTimePicker appears without a skin. Do you have a custom skin for RadTimePicker with the same name as the RadGrid's custom skin, registered on the page? You should registered it on the web page, similarly to the Grid.Custom.css file.

Additionally, you could review the following links which elaborates on this subject:
http://www.telerik.com/community/forums/aspnet-ajax/grid/skinning-causes-some-images-to-disapear.aspx
http://www.telerik.com/help/aspnet-ajax/calendar_appearancecustomskin.html

I hope this helps.

All the best,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Steve
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Steve
Top achievements
Rank 1
Share this question
or