SET THE TEXT OF REPOSITORYITEMBUTTONEDIT IN LAYOUT VIEW IN GRID

Goti Bandu

Total Post:119

Points:835
Posted by  Goti Bandu
 2961  View(s)
Ratings:
Rate this:
I create a Grid Control and set Main View as Layout View and add Repository Items is different Columns But When i add Button Edit in Target Column. I want to bind the columns data with the Text property 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
  1. Jeet Verma

    Post:110

    Points:776
    Re: Set the text of RepositoryItemButtonEdit in layout view in grid

    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) {

            BusinessObject obj = (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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!