Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .github/workflows/gitleaks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.2.2
- name: Install the gitleaks
run: wget https://github.com/zricethezav/gitleaks/releases/download/v8.15.2/gitleaks_8.15.2_linux_x64.tar.gz
shell: pwsh
Expand All @@ -21,18 +21,24 @@ jobs:
continue-on-error: true
- name: Setup NuGet.exe
if: steps.gitleaks.outcome != 'success'
uses: nuget/setup-nuget@v1
uses: nuget/setup-nuget@v2
with:
nuget-version: latest
- name: Install the dotnet
- name: Install Mono
if: steps.gitleaks.outcome != 'success'
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
run: |
sudo apt update
sudo apt install -y mono-complete
- name: Install the dotnet SDK to a custom directory
if: steps.gitleaks.outcome != 'success'
run: |
mkdir -p $GITHUB_WORKSPACE/dotnet
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --install-dir $GITHUB_WORKSPACE/dotnet --channel 6.0
- name: Install the report tool packages
if: steps.gitleaks.outcome != 'success'
run: |
export PATH=$GITHUB_WORKSPACE/dotnet:$PATH
nuget install "Syncfusion.Email" -source ${{ secrets.NexusFeedLink }} -ExcludeVersion
dir $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1
dotnet $GITHUB_WORKSPACE/Syncfusion.Email/lib/netcoreapp3.1/GitleaksReportMail.dll ${{ secrets.CITEAMCREDENTIALS }} "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" ${{ secrets.ORGANIZATIONNAME }}
exit 1
dir $GITHUB_WORKSPACE/Syncfusion.Email/lib/net6.0
dotnet $GITHUB_WORKSPACE/Syncfusion.Email/lib/net6.0/GitleaksReportMail.dll ${{ secrets.CITEAMCREDENTIALS }} "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" ${{ secrets.ORGANIZATIONNAME }}
exit 1
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# How to scroll and select the record programmatically in wpf and uwp treegrid?
This example illustrates how to scroll and select the record programmatically in wpf and uwp treegrid
# How to Scroll and Select the Record Programmatically in WPF / UWP TreeGrid?

This example illustrates how to scroll and select the record programmatically in [WPF TreeGrid](https://www.syncfusion.com/wpf-controls/treegrid) and [UWP TreeGrid](https://www.syncfusion.com/uwp-ui-controls/treegrid) (SfTreeGrid).

You can scroll to the record programmatically using the [ScrollInView](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.TreeGrid.SfTreeGrid.html#Syncfusion_UI_Xaml_TreeGrid_SfTreeGrid_ScrollInView_Syncfusion_UI_Xaml_ScrollAxis_RowColumnIndex_) method by passing the row index of the record. You can get the row index of the record using the [ResolveToRowIndex](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.TreeGrid.TreeGridIndexResolver.html#Syncfusion_UI_Xaml_TreeGrid_TreeGridIndexResolver_ResolveToRowIndex_Syncfusion_UI_Xaml_TreeGrid_SfTreeGrid_Syncfusion_UI_Xaml_TreeGrid_TreeNode_) extension method present in **Syncfusion.UI.Xaml.TreeGrid.Helpers**.

You can select the record programmatically by setting the [SelectedItem](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Grid.SfGridBase.html#Syncfusion_UI_Xaml_Grid_SfGridBase_SelectedItem) property in TreeGrid.

``` c#
private void Treegrid_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
var selectedItem = (this.treegrid.DataContext as ViewModel).SelectedItem;
var rowindex = this.treegrid.ResolveToRowIndex(selectedItem);
var columnindex = this.treegrid.ResolveToStartColumnIndex();
//Make the row in to available on the view.
this.treegrid.ScrollInView(new RowColumnIndex(rowindex, columnindex));
//Set the SelectedItem in SfTreeGrid.
this.treegrid.SelectedItem = selectedItem;
}
```
Loading