---
title: "Set the text of RepositoryItemButtonEdit in layout view in grid"  
description: "Set the text of RepositoryItemButtonEdit in layout view in grid"  
author: "Anonymous User"  
published: 2014-11-19  
updated: 2014-11-20  
canonical: https://www.mindstick.com/forum/12644/set-the-text-of-repositoryitembuttonedit-in-layout-view-in-grid  
category: "asp.net"  
tags: ["devexpress", "devexpress windows ui", "devexpress mvc"]  
reading_time: 1 minute  

---

# Set the text of RepositoryItemButtonEdit in layout view in grid

I create a Grid [Control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) and set Main [View](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view) as [Layout](https://www.mindstick.com/articles/12853/android-layout-and-its-type) View and add [Repository](https://www.mindstick.com/articles/12232/repository-pattern-in-mvc) [Items](https://www.mindstick.com/forum/33812/getting-number-of-items-selected-in-uicollectionview-in-ios) is different Columns But When i add [Button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) Edit in [Target](https://yourviews.mindstick.com/view/81207/small-industries-should-be-the-target-of-economic-relief-package) Column. I want to bind the columns [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) with the [Text property](https://www.mindstick.com/forum/161/problem-in-getting-text-property-for-sender-object) of Button. Please am too worried about it. tell me any Solution about that How to set the Text of RepositoryItemButtonEdit in layout View in Grid

## Replies

### Reply by Anonymous User

You can handle the event that happens when an editor is about to be shown in a non-focused mode CustomRowCellEdit.

private

```
void gridView_CustomRowCellEdit(object sender,
CustomRowCellEditEventArgs e){    if (e.Column !=columnWithButtonEdits) {        BusinessObjectobj = (BusinessObject) gridView.GetRow(e.RowHandle);       
e.RepositoryItem.Buttons[0].Text = obj.SomeProperty;                    }}
```

Of course you have to cast RepositoryItem to your type and get the button that you need.


---

Original Source: https://www.mindstick.com/forum/12644/set-the-text-of-repositoryitembuttonedit-in-layout-view-in-grid

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
