Hi,
is it possible to have new row added on the bottom of the grid? When I click to add a new row it is added as the first row of the grid.
Hi,
is it possible to have new row added on the bottom of the grid? When I click to add a new row it is added as the first row of the grid.
You can insert an item in a list at a specific position..
var fruits = List<Fruit>();
// Insert fruits at the bottom of the list
fruits.Add(new Fruit { Name = "Apple" }); // first
fruits.Add(new Fruit { Name = "Orange" }); // second
// Insert a new fruit top of the list (position 0)
fruits.Insert(0, new Fruit { Name = "Banana" });
/**
Now the order is:
* Banana
* Apple
* Orange
**/
Hi,
thank you for your response. I know that. I implemented Radzen Datagrid and when I click a button to add new row, it adds it as the first row but I would like to have it as last row.
Ah, you're talking about the inline editing position of new row..
async Task InsertRow()
{
itemToInsert = new Directorship();
//await grid.InsertRow(orderToInsert); //how bout no, because this only inserts at the top yo
try
{
User.Directorships.Add(itemToInsert); //insert new director at bottom
User.Directorships = new List<Directorship>(User.Directorships); //recast the entire collection to a new list
//activate editing on the row as if it was inserted at the top, dance dance too much booty in the pants
await grid.EditRow(itemToInsert);
}
catch (Exception ex)
{
Console.WriteLine("f");
}
Reset();
}
Had the same issue and for a small collection like i was working with this worked out great, hope this helps someone else someday