@oliver-aldrian
@oliver-aldrian
Forum Replies Created
-
AuthorPosts
-
oliver.aldrianParticipant
so I added the icon here
CommandColumnEdit = new GridCommand() { Visible = true, Command=”customEditCommand”, Icon = “smart-icon-arrow-left”, Label=”Verlauf”, },
and in the css of my project
.smart-grid-icon.smart-icon-arrow-left::before {
content: var(-smart-icon-arrow-left);
}and I also tried
.smart-grid-icon.smart-icon-arrow-left::before {
content: var(–smart-icon-arrow-left);
}but the icon is still not showing
the class seems to be applied to the div
<div>
<div><span title=”Verlauf” class=”smart-grid-icon smart-icon-arrow-left”></span></div>
</div>oliver.aldrianParticipantto be curious: what is the Icon Property for, if it is not the right way to set an icon?
oliver.aldrianParticipantok that seems to work.
just weird that the handled parameter is specifically mentioned in the api docs.
copied from https://www.htmlelements.com/blazor/blazor-ui/demos/blazor-grid?id=features right upper hand “Quick Actions” – “API docs”
<table class=”table”>
<tbody>
<tr>
<td>OnCommand</td>
<td>Action<object></td>
<td>N/A</td>
<td>Callback function, which is called when a command is executed. The name argument is the command’s name. The command argument is the command’s function. details are built in command arguments passed by the Grid. The handled parameter allows you to cancel built-in command, because when you set it to true the Grid will not execute the default command’s behavior.</td>
</tr>
</tbody>
</table>
I assume the documentation is not correct then?
oliver.aldrianParticipanthi!
that almost solves it for me.
In the API docs is writing about being able to set handled to the event in order to not cause the default handler to run.
How would I do that? I don’t see a handled property in the object?
KR
oliver.aldrianParticipantThis is no solution for Blazor.
Calling a JS function is not useful if I want to actually do something in Blazor.
Can you provide an example how to use the CommandClicked of the Grid properly?
From the API docs I gathered that this event should give me the name, and a possiblity to cancel the default action? is this correct?
oliver.aldrianParticipantone additional question:
can I make the visibility of a command column icon (eg. trashbox for delete) dependent on the item that is displayed in the row?
September 14, 2023 at 10:31 am in reply to: Blazor Grid, How to hide columns in Column Chooser #108679oliver.aldrianParticipantGreat, Thanks!
oliver.aldrianParticipantHi!
Can you give an update on this issue?
KR
oliver.aldrianParticipantif you get to this issue, please update either the docs, or here with the event pattern that we can expect, and how to handle the edge cases described above,
thanks KR
oliver.aldrianParticipantAh I see… the DisplayField Property is not loaded to the grid correctly, and with having it a DataField somewhere the Property is forced to be loaded on the DataGrid.
If you would have said that that was the problem I would not have had complained.
Thanks
oliver.aldrianParticipantHow is the workaround viable If I want to use the DisplayField parameter do actually display something?
I dont need the column hidden, I need it displayed…
My DisplayName is an auto property that is filled from a complex datatype
I literally cannot Set anything to it.
I want to use the DisplayField and DataField together in one visible column, that uses an autocomplete editor, to use the value from the AutoComplete editor in the EndEdit Event to calculate the fitting ComplexObject and set it in my datamodel, which then fills the auto property which is displayed.
How would a hidden column with a displayField help in this case??
oliver.aldrianParticipantyou offered a workaround for a use case that does not exist… but ok….
do you have a timeframe for the fix, so I can communicate that to my customer?
KR
oliver.aldrianParticipantand yes I know I could go change my complete backend to have the ObjectLinkName “dereferenced” and saved alongside. but why would I… this is clearly a bug
oliver.aldrianParticipantthe reproduction of the problem is not my use case, so that workaround won’t work for me.
my displayed data in the grid contains an object of a complex type, which needs to be set in the grid.
So I have a autocomplete editor which displays the different options to select from, and when selected I handle the assignment in the CellEndEdit event
I have following properties set up
ComplexObject ObjectLink {get set} string ObjectLinkName => ObjectLink?.ToString() string ObjectLinkSetter {get set}
and my grid column
<div> <div><Column DataField="ObjectLinkSetter" DisplayField="ObjectLinkName" Label="blah" AllowEdit="true" Editor="@autocompleteEditor" /></div> </div>
I cannot use the ObjectLink directly, or at least the grid didn’t like it at all.
oliver.aldrianParticipantHello,
colleague of wolf.t here.
Please see https://github.com/DiawaKG/reproduction-smarthtml-grid-getvisiblerows-exception.
Running the Server project and clicking the Button “Click Me” on the index page reproduces the problem.
KR
-
AuthorPosts