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

GridDropdownColumn in RadGrid not working

28 Answers 668 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vijaianand
Top achievements
Rank 1
Vijaianand asked on 30 Aug 2011, 04:33 PM
Hi

I have GridDropdownColumn in RadGrid with different source. I wired the DataField, ListValueField and ListTextField all correctly. It doesn't show the value properly when the grid is shown but when edit mode you select the dropdown value it stores is correctly. When displaying in grid, it all shows " "  am I missing anything?

Attached the code.

 <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="true" AllowPaging="true"
            PageSize="25" ShowStatusBar="true" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
            AllowAutomaticDeletes="True" DataSourceID="PetroSqlDataSource">
            <MasterTableView EditMode="Popup" CommandItemDisplay="Bottom" DataSourceID="PetroSqlDataSource"
                DataKeyNames="Id" AutoGenerateColumns="false">
                <Columns>
                    <telerik:GridEditCommandColumn />
                    <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" />
                    <telerik:GridBoundColumn DataField="Id" HeaderText="Unique ID" ReadOnly="True" UniqueName="UniqueID"
                        Display="false" />
                    <telerik:GridBoundColumn DataField="SkillId" HeaderText="Skill ID" UniqueName="SkillID" />
                    <telerik:GridDropDownColumn UniqueName="DropDownListColumn" ListTextField="Discipline"
                        ListValueField="Discipline" DataSourceID="PetroSqlDataSource2" HeaderText="Discipline"
                        DataField="Discipline" DropDownControlType="RadComboBox" AllowSorting="true" Display="false">
                    </telerik:GridDropDownColumn>
                    <telerik:GridBoundColumn DataField="Discipline" HeaderText="Discipline" UniqueName="Discipline"
                        ReadOnly="True" />
                    <telerik:GridBoundColumn DataField="Skill" HeaderText="Skill" UniqueName="Skill" />
                    <telerik:GridBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description" />
                    <telerik:GridBoundColumn DataField="Foundation" HeaderText="Foundation" UniqueName="Foundation" />
                    <telerik:GridBoundColumn DataField="SkillType" HeaderText="SkillType" UniqueName="SkillType" />
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="PetroSqlDataSource" ConnectionString="<%$ConnectionStrings:PetroTechConnectionString%>"
            runat="server" SelectCommand="SELECT [Id],[SkillId], [Discipline],[Skill],[Description], [Foundation],[SkillType] FROM [Skills]"
            InsertCommand="INSERT INTO [Skills] ([SkillId],[Discipline],[Skill],[Description],[Foundation],[SkillType]) VALUES (@SkillId,@Discipline,@Skill,@Description,@Foundation,@SkillType)"
            UpdateCommand="UPDATE [Skills] SET [SkillId] = @SkillId,[Skill] = @Skill, [Description] = @Description, [Foundation] = @Foundation, [SkillType] = @SkillType WHERE [ID] = @ID"
            DeleteCommand="DELETE FROM [Skills] WHERE [Id] = @ID">
            <InsertParameters>
                <asp:Parameter Name="SkillId" Type="String" Size="10" />
                <asp:Parameter Name="Discipline" Type="String" Size="50" />
                <asp:Parameter Name="Skill" Type="String" Size="50" />
                <asp:Parameter Name="Description" Type="String" />
                <asp:Parameter Name="Foundation" Type="Int32" />
                <asp:Parameter Name="SkillType" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource>


        <asp:SqlDataSource ID="PetroSqlDataSource2" ConnectionString="<%$ConnectionStrings:PetroTechConnectionString%>"
            runat="server" SelectCommand="SELECT [Id],[Discipline] FROM [Disciplines]">
            </asp:SqlDataSource>

28 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 31 Aug 2011, 04:49 AM
Hello Vijai,

GridDropDownColumn looks and behaves like a standard GridBoundColumn in browser mode. When in edit mode, however, it displays a drop-down control for each edited cell in the column. Check the following help documentation which explains more about this.
Column Types.

Thanks,
Princy.
0
Vijaianand
Top achievements
Rank 1
answered on 31 Aug 2011, 01:21 PM
Princy  

Thanks for help but I already seen that page. I know the GridDropdown will be show similar to GridboundColumn but it has to show the selected value right. It is not showing that, it just shows "&nbsp;". Also in the edit mode, it always defaults to the first on the list and not showing the selected value. I also check out the demo on telerik tv and followed the same but it giving the same output. Check out the output attached. 

I just need to show the selected value on the grid and edit modes. It works fine on the insert mode. May be there is a small option which I might be missing out. 

Vijai

0
Iana Tsolova
Telerik team
answered on 31 Aug 2011, 02:27 PM
Hello Vijaianand,

This issue is already fixed. Download the Latest Internal Build and check it out.

Kind regards,
Iana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Vijaianand
Top achievements
Rank 1
answered on 31 Aug 2011, 02:39 PM
Can you point to the link to download the latest build or service pack?
0
Princy
Top achievements
Rank 2
answered on 31 Aug 2011, 02:51 PM
Hello Vijainand,

Check the following KB article to download to the latest build.
Updating RadControls for ASP.NET AJAX to another version or license.

Thanks,
Princy.
0
Vijaianand
Top achievements
Rank 1
answered on 31 Aug 2011, 02:55 PM
Thanks. I already found the build and working on installing it.
0
Vijaianand
Top achievements
Rank 1
answered on 31 Aug 2011, 03:09 PM
Alright, it fixed the &nbsp; problem but still not showing up the corresponding values in the grid. It shows blank. 
0
Iana Tsolova
Telerik team
answered on 01 Sep 2011, 07:40 AM
Hi Vijaianand,

The lastly described issue is usually due to incorrect configuration of the GridDropDownColumn. However looking at the provided code I can confirm that you did it properly. In order to be able to help further investigate the cause of the problem, I suggest that you open a formal support ticket and send us a runnable version of your code.

Greetings,
Iana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Vijaianand
Top achievements
Rank 1
answered on 01 Sep 2011, 01:11 PM
I will do that right now. 
0
Vijaianand
Top achievements
Rank 1
answered on 01 Sep 2011, 01:17 PM
I sent a support ticket. Also you can replicate the issue by creating a new project in VS2010 with radgrid and griddropdown column and you will see the issue.
0
Iana Tsolova
Telerik team
answered on 01 Sep 2011, 03:53 PM
Hello Vijaianand,

Thank you for that. I will check it out and turn back to you with my findings.

All the best,
Iana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
paaland
Top achievements
Rank 2
answered on 04 Oct 2011, 09:11 AM
Any update on this issue? I've got exactly the same problem.

GridDropDownColumn works fine when in edit mode. The list populates and the correct item is selected.
But when in "normal" mode the column displays nothing.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 04 Oct 2011, 09:41 AM
Hello,

This issue was already cleared in latest version.
so, please update your version.

let me know if you still have any concern.

Thanks,
Jayesh Goyani
0
Jay
Top achievements
Rank 1
answered on 02 Nov 2011, 06:52 PM
Hi Jayesh,

I am working in trail version 2011 Q2 Net 40 (VS.Net2010 - .Net Framework 4.0),  Still the GridDropDownColumn value is not displayed in View Mode.  Can you tell me what version or dll need to install/add for this issue.

regards
Jay
0
Jayesh Goyani
Top achievements
Rank 2
answered on 03 Nov 2011, 06:03 AM
Hello,

i have not exact idea about version but you can download latest version and check this thing.

let me know if any concern.

Thanks,
Jayesh Goyani
0
Tim
Top achievements
Rank 2
answered on 21 Dec 2011, 05:05 PM
This still appears to be an issue in the 2011.3.1115.0 release (see attached image file). Any word on this fix?

FYI here is the code I am using.
GridDropDownColumn _legacyReinsurerID = new GridDropDownColumn
                         {
                             DataField = "LegacyReinsurerID",
                             HeaderText = "Legacy Reinsurer ID",
                             UniqueName = "LegacyReinsurerID",
                             ListTextField = "LegacyReinsurerID",
                             ListValueField = "LegacyReinsurerID",
                             DropDownControlType = GridDropDownColumnControlType.RadComboBox,
                             HeaderStyle = { Width = Unit.Pixel(140) },
                             ItemStyle = { Width = Unit.Pixel(140) },
                             ReadOnly = false,
                         };
_reinsurerRadGrid.MasterTableView.Columns.Add(_legacyReinsurerID);

private void ReInsurerRadGrid_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                try
                {
                    string _legacyReinsurerID = ((ReinsuranceAgreementParticipant)(e.Item.DataItem)).LegacyReinsurerID.ToString();
                    RadComboBox _participantList = (e.Item as GridEditableItem)["LegacyReinsurerID"].Controls[0] as RadComboBox;
                    ReinsuranceAgreementParticipantList _participants = MAASBaseInterface.ReinsuranceAgreementParticipantAPI.GetParticipants();
 
                    _participantList.AutoPostBack = true;
                    _participantList.Width = Unit.Pixel(120);
                    _participantList.DataSource = _participants;
                    _participantList.DataValueField = "LegacyReinsurerID";
                    _participantList.DataTextField = "LegacyReinsurerID";
                    _participantList.DataBind();
                    _participantList.SelectedValue = _legacyReinsurerID;
                    _participantList.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(list_SelectedIndexChanged);
                     
                    ((e.Item as GridDataItem)["ParticipantPercentage"].Controls[0] as RadNumericTextBox).Width = Unit.Pixel(75);
                }
                catch (Exception ex)
                {
 
                    string _ex = ex.Message;
                }
            }

I would also note that in the ReInsurerRadGrid_ItemCreated method the below line does contain a value.

string _legacyReinsurerID = ((ReinsuranceAgreementParticipant)(e.Item.DataItem)).LegacyReinsurerID.ToString

0
Princy
Top achievements
Rank 2
answered on 22 Dec 2011, 06:22 AM
Hello,

I tried the same in the latest version 2011.2.712.35 which worked as expected. Try upgrading to the latest version.
Updating RadControls for ASP.NET AJAX to another version or license
Attached is the screenshot.

Thanks,
Princy.
0
Tsvetina
Telerik team
answered on 22 Dec 2011, 12:58 PM
Hi Tim,

The built-in GridDropDownColumn is designed to be used mainly with DataTables in order to easily map and generate their dropdown items values in conjunction with the DataField/ListValueField/DataSourceID/ListDataMember values of the column. For custom objects collections, which you seem to be using, consider replacing the GridDropDownColumn with template column holding a RadComboBox in its edit template (generating/binding the items for the MS DropDownList inside the ItemDataBound handler of RadGrid).

Regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Tim
Top achievements
Rank 2
answered on 22 Dec 2011, 03:53 PM
Thanks for the quick response Tsvetina. I did get it to work the way I needed it at least to this point. I added the property and field value

ListDataMember = "ID",

in the column definition. This solved my display issue in normal mode. Edit mode displays my values in the RadComboBox from a separate data source. I am able to retrieve the columns value which I default the initially loaded value of the RadComboBox when it opens. However I am having a problem wiring up the SelectedIndexChanged event see forum post and yes, I am using myRadComboBox .AutoPostback = true;
0
Tsvetina
Telerik team
answered on 27 Dec 2011, 03:30 PM
Hi Tim,

I tried this in another grid end it worked on my side. The grid is the second one in this demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/columntypes/defaultcs.aspx
and this is the code I use in ItemCreated:
protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    {
        RadComboBox combo = (e.Item as GridEditableItem)["City"].Controls[0] as RadComboBox;
        combo.AutoPostBack = true;
        combo.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(combo_SelectedIndexChanged);
    }
}

So, as for this part of the code, it  should not be a problem.

Can you please elaborate on when and where you dynamically create the column?

Kind regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
David Simmonds
Top achievements
Rank 1
answered on 02 Mar 2012, 04:04 AM
I have version 2011.2.915.40 installed. What I see is a blank column when there really is data for that column in the datasource. I have put another column in that is just a GridBoundColumn that references the same column in the datasource. It properly shows the data. Why is this happening to the GridDropDownColumn?

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Sales.ascx.cs" Inherits="CharityCheck.Controls.Sales" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<asp:Panel ID="Panel1" runat="server">
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%" LoadingPanelID="RadAjaxLoadingPanel1">
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
            CellSpacing="0" GridLines="None" Height="233px"
            onitemdatabound="RadGrid1_ItemDataBound"
            onneeddatasource="RadGrid1_NeedDataSource"
            oninsertcommand="RadGrid1_InsertCommand" onitemdeleted="RadGrid1_ItemDeleted"
            oniteminserted="RadGrid1_ItemInserted"
            onitemupdated="RadGrid1_ItemUpdated" ondeletecommand="RadGrid1_DeleteCommand"
            onupdatecommand="RadGrid1_UpdateCommand" >
            <MasterTableView DataKeyNames="ID"
                             commanditemdisplay="Top" commanditemsettings-addnewrecordtext="Add new item"
                             EditMode="InPlace">
                <CommandItemSettings AddNewRecordText="Add item" ExportToPdfText="Export to PDF"></CommandItemSettings>
 
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                </RowIndicatorColumn>
 
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                </ExpandCollapseColumn>
             
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton"
                        UniqueName="EditCommandColumn" >
                        <HeaderStyle Width="60px" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridDropDownColumn HeaderText="Description" DataField="Description"
                        ListTextField="Description"
                        ListValueField="Amount" UniqueName="GridDropDownColumn"
                        DropDownControlType="DropDownList">
                    </telerik:GridDropDownColumn>
                    <telerik:GridNumericColumn DecimalDigits="2" HeaderText="Price" DataField="Price"
                        UniqueName="Price" ReadOnly="true">
                        <HeaderStyle Width="100px" />
                    </telerik:GridNumericColumn>
                    <telerik:GridBoundColumn HeaderText="ID" DataField="ID" ReadOnly="True"
                    UniqueName="ID" Display="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn Text="Delete" CommandName="Delete"
                        ButtonType="ImageButton" >
                        <HeaderStyle Width="25px" />
                    </telerik:GridButtonColumn>
                </Columns>
 
                <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                </EditFormSettings>
            </MasterTableView>
 
            <FilterMenu EnableImageSprites="False"></FilterMenu>
 
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>
</asp:Panel>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using Telerik.Web.UI;
using System.Data;
using System.Collections;
 
namespace CharityCheck.Controls
{
    public partial class Sales : CharityCheck.MyUserControl
    {
        #region Properties
        [Browsable(false)]
        public int CompanyID
        {
            get
            {
                object obj2 = this.ViewState["CompanyID"];
                return (obj2 != null) ? (int)obj2 : 0;
            }
            set
            {
                this.ViewState["CompanyID"] = value;
            }
        }
        [Browsable(false)]
        public String Type
        {
            get
            {
                object obj2 = this.ViewState["Type"];
                return (obj2 != null) ? (String)obj2 : "";
            }
            set
            {
                this.ViewState["Type"] = value;
            }
        }
        private DataTable GridSource
        {
            get
            {
                Object obj = this.ViewState["_gds"];
                if (obj != null)
                {
                    return (DataTable)obj;
                }
                else
                {
                    DataTable table = new DataTable("Data");
                    DataColumn[] keys = new DataColumn[1];
                    DataColumn colPrimary = table.Columns.Add("ID", System.Type.GetType("System.Int32"));
                    colPrimary.AutoIncrement = true;
                    keys[0] = colPrimary;
                    table.Columns.Add("Description", System.Type.GetType("System.String"));
                    table.Columns.Add("Price", System.Type.GetType("System.Decimal"));
                    table.PrimaryKey = keys;
 
                    //CharityCheckEntities entities = new CharityCheckEntities();
                    //var data = (from r in entities.Prices
                    //            where r.Type == Type
                    //            select r);
 
                    //foreach (Price price in data)
                    //{
                    //    DataRow row = table.NewRow();
                    //    row["Description"] = price.Description;
                    //    row["Price"] = price.Amount;
                    //    table.Rows.Add(row);
                    //}
 
                    this.ViewState["_gds"] = table;
                    return table;
                }
            }
        }
        #endregion
 
        protected void Page_Load(object sender, EventArgs e)
        {
        }
 
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && (e.Item as GridEditableItem).IsInEditMode)
            {
                GridEditableItem editedItem = e.Item as GridEditableItem;
                GridEditManager editMan = editedItem.EditManager;
 
                GridDropDownListColumnEditor editor = editMan.GetColumnEditor("GridDropDownColumn") as GridDropDownListColumnEditor;
                //in case you have RadComboBox editor for the GridDropDownColumn (this is the default editor),  
                //you will need to use ComboBoxControl below instead of DropDownListControl
                //Then you can modify the list control as per your custom conventions
                List<Price> items = new List<Price>();
 
                CharityCheckEntities entities = new CharityCheckEntities();
                {
                    var data = (from r in entities.Prices
                                where r.Type == Type
                                select r);
 
                    foreach (Price price in data)
                    {
                        items.Add(price);
                    }
                }
                {
                    var data = (from r in entities.MembershipFees
                                where r.Type == Type
                                select r);
                    foreach (MembershipFee fee in data)
                    {
                        Price price = new Price();
                        price.Description = fee.Description;
                        price.Amount = fee.Amount;
                        items.Add(price);
                    }
                }
                editor.DataSource = items;
                editor.DataBind();
            }
        }
 
        protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
        {
            GridEditableItem editedItem = e.Item as GridEditableItem;
            GridEditManager editMan = editedItem.EditManager;
 
            DataTable table = this.GridSource;
 
            DataRow newRow = table.NewRow();
 
            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);
                        if (editor is GridDropDownColumnEditor)
                        {
                            newRow["Description"] = (editor as GridDropDownColumnEditor).SelectedText;
                            newRow["Price"] = (editor as GridDropDownColumnEditor).SelectedValue;
                        }
                    }
                }
            }
            table.Rows.Add(newRow);
        }
 
        protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
        {
            GridEditableItem editedItem = 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)
                    {
                        try
                        {
                            IGridColumnEditor editor = editMan.GetColumnEditor(editableCol);
                            if (editor is GridDropDownColumnEditor)
                            {
                                DataRow[] changedRows = this.GridSource.Select("ID = " + editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ID"].ToString());
                                changedRows[0]["Description"] = (editor as GridDropDownColumnEditor).SelectedText;
                                changedRows[0]["Price"] = (editor as GridDropDownColumnEditor).SelectedValue;
                                this.GridSource.AcceptChanges();
                            }
                        }
                        catch (Exception)
                        {
                            e.Canceled = true;
                            break;
                        }
                    }
                }
            }
        }
 
        protected void RadGrid1_DeleteCommand(object sender, GridCommandEventArgs e)
        {
            string ID = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString();
            DataTable table = this.GridSource;
            if (table.Rows.Find(ID) != null)
            {
                table.Rows.Find(ID).Delete();
                table.AcceptChanges();
            }
        }
 
        protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = this.GridSource;
        }
 
        protected void RadGrid1_ItemInserted(object sender, GridInsertedEventArgs e)
        {
            e.KeepInInsertMode = false;
        }
 
        protected void RadGrid1_ItemUpdated(object sender, GridUpdatedEventArgs e)
        {
            e.KeepInEditMode = false;
        }
 
        protected void RadGrid1_ItemDeleted(object sender, GridDeletedEventArgs e)
        {
 
        }
    }
}
0
Shinu
Top achievements
Rank 2
answered on 02 Mar 2012, 05:27 AM
Hello,

This issue is fixed in the latest version. Try upgrading to the latest version.

-Shinu.
0
David Simmonds
Top achievements
Rank 1
answered on 02 Mar 2012, 06:11 AM
Easy to say "Try upgrading to the latest version". The latest version costs $1000. Eventually we will have to do that but for now it not convenient. At least the error has been found and it is not within my code. That is a plus.
0
Tsvetina
Telerik team
answered on 06 Mar 2012, 12:37 PM
Hello David,

You could replace the GridDropDownColumn with a GridTemplateColumn having a RadComboBox in the EditItemTemplate. This way, with a few changes in your code you will get the same functionality without the problem the that exists for the dropdown column.

Regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Setiawan
Top achievements
Rank 1
answered on 09 Mar 2012, 12:51 AM
I had the same problem, but I added ListDataMember="ChartNumber", which is one of datasource's fields.

 
<telerik:GridDropDownColumn DataField="ChartNumber" HeaderText="Chart" UniqueName="ChartNumber"
                                ListDataMember="ChartNumber" ListValueField="ChartNumber" ListTextField="ChartNumber"
                                ColumnEditorID="gddlChartNumber">
                                <ItemStyle Width="30px" />
                            </telerik:GridDropDownColumn>


and for GridDropDownListColumnEditor:

<telerik:GridDropDownListColumnEditor ID="gddlChartNumber" runat="server"
                    DropDownStyle-Width="50px" /></div>
0
Mike
Top achievements
Rank 2
answered on 23 Mar 2012, 11:20 PM
What is your definition of the latest version? I'm running version Q1 2012 (2012.1 215) and I am still seeing the issue. Do I need to use the latest internal builds?
0
Tsvetina
Telerik team
answered on 26 Mar 2012, 01:33 PM
Hello Mike,

It is possible that your scenario is not identical. You could open a ticket and provide replication steps for the issue, so we can check what is going on and if there is still a problem on our side.

Regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Mike
Top achievements
Rank 2
answered on 26 Mar 2012, 04:33 PM
Tsvetina,
I tracked down the issue. In my situation the user can only add one record for each of the values in the dropdown. So I am trimming the recordset used to load the dropdown based on what the user has already defined. The RadGrid is using the data in the dropdown data source to load the value in the grid. In my case it does not find a match in the dropdown recordset and so it displays a blank field. If the grid were to use the data from the data source of the RadGrid instead of the dropdown data source it would work.

I was hoping to use the builtin record editing of the grid but I guess I will have to define my own and just use a GridBoundColumn.

-Mike
Tags
Grid
Asked by
Vijaianand
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Vijaianand
Top achievements
Rank 1
Iana Tsolova
Telerik team
paaland
Top achievements
Rank 2
Jayesh Goyani
Top achievements
Rank 2
Jay
Top achievements
Rank 1
Tim
Top achievements
Rank 2
Tsvetina
Telerik team
David Simmonds
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Setiawan
Top achievements
Rank 1
Mike
Top achievements
Rank 2
Share this question
or