Hello ,I am working on shifting my App from Xamarin to MAUI and In Xamarin i am using syncfusion Datagrid Which hav eSwipe Feature but in MAUI Swipe Feature is not yet added and when I go through Documentation i found out that Swiping Feature will be added in the future I want to Know the Exact Date of that Feature please let me Know
Hi Muhammad Usman,
As of now, DataGrid does not have support for Swiping. We have already considered your request as a feature. We will implement this feature in any of our upcoming releases. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We appreciate your patience and understanding until then. You can follow up with the below feedback for further details,
Feedback link: 49889
Regards,
Sethupathy D.
Can you Please Provide me any Expected Date so that I have any Idea when it was comming becuase i Have to dilever the project as well and if it is beyond my Deadline i will find any Alternative .
Hi Muhammad Usman,
We apologize for any inconvenience, but we are unable to commit a definite timeline for the implementation of the requested feature. The decision regarding this matter lies solely with the management, and it has already been outlined in our SLA. We request you to keep track of the feature status in the feedback link. As progress unfolds, any pertinent updates regarding the feature's implementation will be relayed to you via the feedback link.
FeedBack link: 49889
Regards,
Sethupathy D.
Hi,Is this Feature may come in your Major release ? or in weekly or Monthly Release
Hi Muhammad Usman,,
We are glad to announce that our Essential Studio® 2024 Volume 4 Main Release V28.1.33 is rolled out and is available for download under the following link.
Furthermore, we are pleased to inform you that support for the "Swiping" has been incorporated in our 2024 Volume 4 Main Release. To leverage this enhancement, please update the DataGrid package to version 28.1.33.
For detailed information and documentation on the "Swiping" support, you can refer to our User Guide documentation.
Ug documentation link : Swiping
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Sethupathy D.
Hi,Thanks for Letting me Know. The Issue i am facing in swipe View is if i add a command and pass a command parameter also then the SelectedItem will be null so that is why it Takes Parameter Complete ViewModel Instead of Item Source of DataGrid Can you please Provide me the Solution of that problem because if i add that particular command Outside the SwipeView and Inside any Datagrid Cell Template Column it Takes the Right Parameter and Selected Item Data also be there
Hi Muhammad Usman,
Thanks for contacting us,
To assist you
further and understand the issue better, we kindly request you to provide any
additional details or steps that may help us in reproducing the problem. Additionally, please provide a simple sample replicating the issue for better clarity.
This will help us identify the issue and provide an accurate
solution.
Regards,
Sethupathy D.
Hi,Sure I have attach the Screenshot of Code snipet .where you can see the I am trying to add RightSwipeTemplate in Data grid and Inside The RightSwipeTemplate I have a button with a Command and also pass a command parameter as well where I am getting exception which i add Below but when I add a same command Outside the SwipeView its works fine so i am having a Issue with Command parameter Inside SwipeTemplate.
Exception :
System.ArgumentException: Parameter "parameter" (object) cannot be of type TaskListViewModel, as the command type requires an argument of type Data.ModelsExtensions.Alert.Alert. (Parameter 'parameter')
Hi Muhammad
Usman,
The EmployeeViewModel acts as the binding context for both the DataGrid and the RightSwipeTemplate. The exception you are encountering is due to attempting to fetch a parameter as a model class. In the RightSwipeTemplate, you cannot fetch individual records directly. We believe you need to fetch the swiped record as a parameter.
You can achieve this with the following workaround:
Define the SwipeEnded event in the DataGrid. Then, declare a variable called swipeIndex in your view model. Assign the swiped RowIndex value to the swipeIndex, as shown below:
Code snippet:
|
private void sfGrid_SwipeEnded(object sender, Syncfusion.Maui.DataGrid.DataGridSwipeEndedEventArgs e) { viewModel.swipIndex = e.RowIndex; } |
In your view model, you can then fetch the record using this swipeIndex.
|
[RelayCommand] private void NavigateToDetails(object data) { var
employee = (data as EmployeeViewModel).Employees[swipIndex - 1]; if (employee != null) { // Example action with the employee data Application.Current.MainPage.DisplayAlert( "Employee Details", $"Name: {employee.Name}\nTitle: {employee.Title}\nSalary: {employee.Salary}", "OK"); } } |
We had shared the
simple sample and video demo for your
reference.
Regards,
Sethupathy D.
Hi,Thanks for the sample.I am also facing Issue related to Data grid which is not related to Data grid swipe feature but in the control of Data grid If i add a Button or Border Inside Cell template and when I clicked a single row Button its looks like all Button is clicked which is very annoying for user Point of View and if i add listView instead of Data grid its works fine i a sharing a sample Xaml code as well.
<datagrid:DataGridTemplateColumn
Width="40"
HeaderStyle="{StaticResource HeaderStylePadding}"
AllowSorting="False"
HeaderText="Placement"
MappingName="ID"
>
<datagrid:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid VerticalOptions="CenterAndExpand">
<ImageButton
Grid.Column="0"
CornerRadius="0"
Margin="0,0,4,0"
Command="{Binding Path=BindingContext.NavigateToTaskDetailCommand, Source={x:Reference this}}"
CommandParameter="{Binding .}"
HeightRequest="30"
WidthRequest="30"
HorizontalOptions="Start"
Source="ic_keyboard_arrow_right_w"
BackgroundColor="{StaticResource Primary}"
VerticalOptions="Center" />
Hi Muhammad,
Thank you for reaching out to us.
We understand that you are loading an image button inside the DataTemplate of a template column and have utilized a command for the image button. The issue you are experiencing is that when a user clicks a button in a single row, it appears as though all the buttons are being clicked.
To assist you more effectively and gain a clearer understanding of the issue, we kindly request the following information:
Additionally, please provide a simple sample that replicates the issue for better clarity.
This will help us identify the root cause and provide an accurate solution.
Regards,
Sethupathy D.
Hi,Thank You for our Corporation that Issue was on Our Side and Now Fixed . Now I have different Issue basically I want to give a Specific Row a Color based on Specific Condition Not on Selection Like when some variable becomes true I want the row to Change the Color of Entire row . I dont want to change the color of Row based on row Selection
Hi Muhammad
Usman,
You need to change the background color of a specific row based on a certain
condition. You can achieve this with conditional styling. We have shared a
simple sample addressing your query. Could you please review it and confirm
whether it meets your requirements?
Regards,
Sethupathy D.
Thanks Its Work. Also can you please provide any solution to Stop View from scroll Horizontally in Data grid I have also Facing this issue where my content is being scrolled Horizontally I want to disable that functionality
Hi Muhammad
Usman,
We are unclear about your query regarding a solution to prevent the view from
scrolling horizontally in the DataGrid. Please note that if the DataGrid
contains more columns than the available view size, it will become horizontally
scrollable. This is the intended functionality and cannot be
disabled.
If you have any misunderstandings or if your needs differ, please provide clear
details about your use case. You can include additional information regarding
the expected behavior. This extra detail will enable us to thoroughly address
your request and provide an appropriate solution.
Regards,
Sethupathy D.