Is there an event for clicking a chart label Item
I have a WinUI RadGridView that is completely blank - the columns are built dynamically. I have the editing of those columns completed and working but now I have one final piece of this puzzle I cannot figure out:
With a blank grid (grid without columns) even when you set "mygrid.AllowAddNewRow = True" you don't get the "Click here to add new row" row - which makes perfect sense...no columns, there's nothing that can be added.
But once the dynamic columns have all been added, their props set - then I do the mygrid.AllowAddNewRow = True and...I still don't get the "Click here to add..."
Per usual I've spent a ton of time trying to read what I can - lots of threads posted that get close to what I'm doing but nothing like the above and I'm at my Witts End.
I'm guessing it has something to do with the MasterTemplate - something I'm not adding when I create the dynamic columns that is preventing this? For this specific grid, existing data is 'read only' so as those cells are added, readonly = True but that shouldn't have anything to do with adding a new row should it?
Anyway, please advise! I'm seriously stuck on this one.
-Curtis
Hello *,
1. looking for a possibility to make ctrl+a / ctrl+x, etc. for browseeditor control. Is this possible?
2. Is this possible to add an additional button to the browseeditor (next to ... button) - e.g. one for delete the whole content? Or perhaps there is some other elegant way how I can delete the content of the editor field?
3. I display a path string in the editor control and sometimes the path may be very long. Is there some user-friendly way to display the long path in the edit box with the size significantly smaller as the length of the path string? (e.g. display only the last part of the text or cut something in the middle, or...)
Thanks for the support
Rostislaw
How can I use a key combination of ALT + the grid's row id to capture the content of either the row or a specific cell within the row.
Thanks,
/dz
Right now, if the 'next row' if off screen, the user has to manualy change the scroll bar to view it.
private void SqlAdd()
{
var commandServer = new CommandServer();
foreach(GridViewRowInfo row in radGridView1.Rows)
{
Thread.Sleep(100);
row.IsSelected = true;
}
//var returnSqlServer = commandServer.GetServerCommandExecReturnServer("dead_add", parameters);
}
Hello,
I'm building an application that allows the user to select a series of text items from a grid, and add them to a list. The list is unbound with the horizontal and vertical scroll bars off, and set to:
((IconListViewElement)this.Selected_Text_Listview.ListViewElement.ViewElement).Orientation = Orientation.Horizontal
Selected_Text_Listview.AllowArbitraryItemWidth = true;
Selected_Text_Listview.AllowArbitraryItemHeight = true;
If the width of the items exceeds the total width of the Listview, items are dropped from the front of the list until they fit. I am doing this by determining the "Actual Size" of the items and making sure they fit within the width of the Listview (taking margins into consideration) and continuing to drop until the remaining items fit.
This works well, however the problem I am encountering is when the text that is selected is itself too large to fit within the given Listview region. When a single item is too large to fit, I would like to add "...", and truncate the text from the beginning until it fits. For example:
"Text that is too large to fit" => "...t that is too large to fit"
When I reach this condition, I am recursively removing portions of the item text hoping to find the point when the text will fit and stop, but this does not seem to be changing affecting the item's size and the recursion continues until the string is empty.
Below is a portion of the code:
private bool Adjust_Text_List_Items()
{
int total_item_width = 0;
//Compute Total Width of Items
foreach (ListViewDataItem Text_Item in this.Selected_Text_Listview.Items)
total_item_width += Text_Item.ActualSize.Width + this.Selected_Text_Listview.ItemSpacing;
//Determine if items are too large to fit
if (total_item_width >= this.Selected_Text_Listview.Width - this.Selected_Text_Listview.Margin.Left - this.Selected_Text_Listview.Margin.Right)
{
//Sanity Check
if (this.Selected_Text_Listview.Items.Count() > 0)
{
//Name of single node too long, must truncate
if(this.Selected_Text_Listview.Items.Count() == 1)
{
ListViewDataItem first_node = this.Selected_Text_Listview.Items.First();
if (!string.IsNullOrEmpty(first_node.Text))
{
first_node.Text = first_node.Text.Substring(1);
this.Selected_Text_Listview.ListViewElement.SynchronizeVisualItems(); //This is not updating the actual size of the item!
//Continue Looping Until the string fits
Adjust_Text_List_Items();
}
else
{
first_node.Text = "EMPTY STRING!!!";
return false;
}
}
}
...
}
Is there a way to update the actual size of the item after changing the text, or is there perhaps an alternative approach that I could use?