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

Problem with Setup Input Manager Scenario

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 01 Jul 2014, 05:23 PM
I'm having a bit of trouble with the SetupInputManager scenario, as described in your documentation:  
http://www.telerik.com/help/aspnet-ajax/grid-linq-to-sql-manual-crud-operations.html.

I've used this quite a number of times but this is a little different.

I have a grid with a conventional header/detail setup.  

What I would like to do, when a detail record goes into Edit mode, is to customize the label of a specific editing textbox within the detail record, based on the header's ID.

Is this possible?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Jul 2014, 08:16 AM
Hi Boris,

I guess you want to access the label which displays column name in edit of a detail table. Please try the following code snippet:

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
 if (e.Item is GridEditableItem && e.Item.IsInEditMode && e.Item.OwnerTableView.Name == "DetailTableName")
 {
  GridEditableItem editItem = (GridEditableItem)e.Item;      
  TableCell cell = (TableCell)editItem["ColumnUniqueName"].Parent.Controls[0];
  cell.Text = "Your Custom Text:";         
 }
}

Thanks,
Princy
Tags
Grid
Asked by
Boris
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or