Hi,
Could I add a new button for adding “New Line” function on SO?
I cannot find the relative Methods on Customer Object Explorer.
Thank you!
oTrans.GetNewOrderDtl();
2 Likes
Thx!
before see your reply, I used the below coding.
EpiUltraGrid OrderDtl_grid = (EpiUltraGrid)csm.GetNativeControlReference("bec51417-b286-4d61-a471-3912bc098905");
var row = OrderDtl_grid.DisplayLayout.Bands[0].AddNew();
OrderDtl_grid.Rows.Move(row, 0);
You shouldn’t add rows directly to the grid. Use the business object
thanks ! i’m Success with your code.
i’m improve code with added below or above the selected line.
private void epiButtonC1_Click(object sender, System.EventArgs args)
{
int selectedIndex;
if (epiUltraGridC1.ActiveRow != null)
{
selectedIndex = epiUltraGridC1.ActiveRow.Index;
}
else
{ return;
}
var newRow = epiUltraGridC1.DisplayLayout.Bands[0].AddNew();
//UltraGridRow row = epiUltraGridC1.DisplayLayout.Bands[0].GetRow(1);
epiUltraGridC1.Rows.Move(newRow, selectedIndex+1);
;
}