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

Problem with GridDropDownColumn in In-line Editing

3 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Harsh
Top achievements
Rank 1
Harsh asked on 19 May 2011, 08:49 AM
Hi
I need to use in-line editing for the RadGrid and there is a GridDropcolumn involved also.My Grid Data source has four columns
1.CompProductId
2.ProductName
3.CompProdKeywordId
4.CompProdKeywordName

            
<telerik:RadGrid ID="radGridCompProdKeywords" GridLines="None" runat="server"
AllowAutomaticDeletes=
"True"
AllowAutomaticInserts=
"True" PageSize="10" AllowAutomaticUpdates="True" AllowPaging="false"
AutoGenerateColumns=
"False" OnUpdateCommand="radGridCompProdKeywords_ItemUpdated"
OnNeedDataSource="radGridCompProdKeywords_NeedDataSource"           
OnDeleteCommand=
"radGridCompProdKeywords_ItemDeleted"
OnInsertCommand=
"radGridCompProdKeywords_ItemInserted" Width="650px"
OnItemDataBound=
"radGridCompProdKeywords_ItemDataBound">
<MasterTableView EditMode=
"InPlace" Width="100%" CommandItemDisplay="Top" DataKeyNames=""
HorizontalAlign="NotSet" AutoGenerateColumns="False">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType=
"ImageButton"
UniqueName=
"EditCommandColumn"> <ItemStyle CssClass="MyImageButton" />
</telerik:GridEditCommandColumn>
               <telerik:GridBoundColumn DataField=
"CompProdKeywordId"
HeaderText="CompProdKeywordId" SortExpression="CompProdKeywordId"
 UniqueName=
"columnCompProdKeywordId" ColumnEditorID="GridTextBoxCompProdKeywordId"
Visible="false">
</telerik:GridBoundColumn>
      <telerik:GridBoundColumn DataField=
"CompProductId" HeaderText="ProductId"
SortExpression=
"ProductId" UniqueName="CompProductId"
ColumnEditorID=
"GridTextBoxCompProductId" Visible="false">
                    </telerik:GridBoundColumn>
   <telerik:GridDropDownColumn DataField=
"ProductName" HeaderText="Company Product Name"
ListTextField=
"ProductName" ListValueField="CompProductId" UniqueName="columnCompProductName"
ColumnEditorID="GridDropDownColumnCompProdName" ListDataMember="ProductName">
                    </telerik:GridDropDownColumn>
                    <telerik:GridBoundColumn DataField=
"CompProdKeywordName"
HeaderText=
"Keyword" SortExpression="CompProdKeywordName"
 UniqueName=
"columnCompProdKeywordName" ColumnEditorID="GridTextBoxCompProdKeywordName">
                    </telerik:GridBoundColumn>
           <telerik:GridButtonColumn ConfirmText=
"Delete this product?"
ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton"
CommandName=
"Delete" Text="Delete" UniqueName="DeleteColumn">
<ItemStyle HorizontalAlign=
"Center" CssClass="MyImageButton" />
                    </telerik:GridButtonColumn>
               </Columns>
 </MasterTableView>
<ClientSettings>
 <ClientEvents OnRowDblClick=
"RowDblClick" />            </ClientSettings>     
 </telerik:RadGrid>

My issue is the Product Name column is not updated at all. Neither it is getting values in drop down also while doing in-line editing.
And also the Drop down is also not  showing even if I bring the data somehow in the Column.
Also if I am clicking on save, I can see that the Datasource of the Grid has value in ProductName column but while refreshing the data from the column goes away.

I have seen all the examplles of inline editing. But nothing is helping.
Could you please help me out.

Regards
Harsh


3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 May 2011, 11:15 AM
Hello Harsh,

I cannot recreate the exact issue you are facing. The following demo elaborates inline editing with DropDownColumn. Check your code with the demo. Please elaborate the scenario if it doesn't help.
Grid / Automatic Operations.

Thanks,
Princy.
0
Harsh
Top achievements
Rank 1
answered on 19 May 2011, 11:52 AM
I have 6 grids in the screen and the data from one of the column of the grid is mapped to the GridDrop column of second Grid.
I am using Static datasets for storing the Grid sources. And storing the Grids' data at one go.
So the static dataset of one grid will be used for mapping in second grid. Please find attached the files.
0
Hus Damen
Top achievements
Rank 1
answered on 24 May 2011, 12:43 PM
Hi,

Make sure CompProductId column in ProductName table contain same data as ProductName column in the table bount to grid. This link explain in more detail:

http://www.telerik.com/help/aspnet-ajax/grid-customize-configure-griddropdowncolumn.html

I hope helps,

Thanks
Hus
Tags
Grid
Asked by
Harsh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Harsh
Top achievements
Rank 1
Hus Damen
Top achievements
Rank 1
Share this question
or