Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
John Pag
|
Jul 3, 2011 - 9:49 AM
|
Hi. How i can change cell button text programmatically after init grid cell styles and columns? The text property for cell button it is read only (((.
|
|
John Pag
|
Jul 4, 2011 - 12:49 PM
|
I found the way to do it...thanks ))) ((Elegant.Ui.Grid.DataRow)Grid.Rows[RowIndex]).Cells[Grid.Columns[2]].Style.LeftButtonText = "some text"
|
|
John Pag
|
Jul 4, 2011 - 12:38 PM
|
CellStyle.LeftButtonText and CellStyle.RightButtonText properties it is read only properties. I cannot change this properties. I need change button text after input some text in this row but other cell. This is my code to create grid column:
TextCellStyle btnColumnStyle = new TextCellStyle(); btnColumnStyle.AllowEdit = false;
btnColumnStyle.AlwaysShowLeftButton = true;
btnColumnStyle.LeftButtonText = "text";
btnColumnStyle.LeftButtonType = typeof(Elegant.Ui.Grid.TextCellButton);//.EllipsisCellButton);
btnColumnStyle.LeftButtonVerticalAlignment = VerticalAlignment.Top;
Column column2 = new Column();
column2.CellStyles.AddRange(new Elegant.Ui.Grid.CellStyle[] { btnColumnStyle });
column2.DataPropertyName = "Btn";
column2.HeaderText = " ";
column2.Visible = true;
column2.AllowResizing = false;
column2.Width = _BtnColumnWidth;
column2.FillWeight = 26F;
Grid.Columns.Add(column2); and after i try change text only for selected row and selected cell this way
((Elegant.Ui.Grid.DataRow)Grid.Rows[_SelectedRowIndex]).Cells[Grid.Columns[2]].LeftButton.Text = "some ..." is there any other way to make it?
|
|
John Pag
|
Jul 3, 2011 - 9:50 AM
|
in unbound grid control...
|
|
Technical Support
|
Jul 4, 2011 - 6:45 AM
|
Please use the CellStyle.LeftButtonText and CellStyle.RightButtonText properties. You can modify them using the VS Forms Designer or by handling the UnboundGridControl.ModifyCellStyle event.
|
|