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

Batch Update with inline editing

1 Answer 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sub
Top achievements
Rank 1
Sub asked on 05 Apr 2011, 10:41 PM
Hi,

I am using the RadGrid control with EditMode="InPlace". I have a dropdown and following the example as below:

http://www.telerik.com/help/aspnet/grid/grdoperationswithdropdownlistinedititemtemplate.html

Using the GridDropDownColumn did not work well with my custom datasource. Thats why I am using the above link as a sample

<

 

Columns>

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-CssClass="edit" ItemStyle-CssClass="edit" />

 

 

<telerik:GridBoundColumn DataField="Name"  ReadOnly="True"

 

 

 

HeaderText="Header1" />

 

 

 

 

 

<telerik:GridTemplateColumn DataField="Description" HeaderText="Header2" >

 

 

 

<ItemTemplate>

 

 

<asp:Label id="Label1" runat="server">

 

<%

# DataBinder.Eval(Container.DataItem, "Description")%>

 

 

 

</asp:Label>

 

 

</ItemTemplate>

 

 

 

<EditItemTemplate>

 

 

<asp:DropDownList id="drpDown" runat="server" />

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 


I am populating the dropdowon on edit mode as below:

 

if (e.Item is GridEditableItem && e.Item.IsInEditMode)

 

 

{

 

 

GridEditableItem item = e.Item as GridEditableItem;

 

 

 

// access/modify the edit item template settings here

 

 

DropDownList dropDownList = item.FindControl("drpDown") as DropDownList;

 

 

dropDownList.DataSource = reactions;

 

dropDownList.DataTextField =

"description";

 

 

dropDownList.DataValueField =

"id";

 

 

 

PatientAllergy paRowData = (e.Item.DataItem as PatientAllergy);

 

 

 

if (paRowData != null)

 

 

{

 

 

if ((paRowData.Description!= null))

 

 

dropDownList.SelectedValue = paRowData.Id;

 

}

 

dropDownList.DataBind();

 

 

}


fine. I have two outstanding questions:
I want to achive the the batch update with inline editing
1.  How do I collapse the editable row when I click outside of the row.
2. How do I keep track of edited rows. Does Telerik has a implematioan for this. the below example does it only with client side and ondoubleclick editing. But I want to achieve with EditMode="InPlace". I want to do inline editing when the Edit button is clicked for the particular row. Please point me the direction.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx

.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 11 Apr 2011, 01:59 PM
Hello Sub,

I created a simple demo project that could be used as a starting point. Please test it locally and let me know if you need further assistance.

Regards,
Daniel
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
Sub
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or