Skip to content
Open
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
21 changes: 7 additions & 14 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ node('content')
{
timestamps
{

def Content="";
env.PATH = "${ProgramFiles}"+"\\Git\\mingw64\\bin;${env.PATH}"

timeout(time: 7200000, unit: 'MILLISECONDS') {
String platform='grid-sdk';
String platform='file-formats';
try
{

def Content="";
env.PATH = "${ProgramFiles}"+"\\Git\\mingw64\\bin;${env.PATH}"

//Clone scm repository in Workspace source directory
stage ('Checkout')
{
dir('Spell-Checker')
{
checkout scm


def page = 1
while(true)
{
def branchCommit = 'https://api.github.com/repos/syncfusion-content/'+env.githubSourceRepoHttpUrl.split('/')[env.githubSourceRepoHttpUrl.split('/').size() - 1]+'/pulls/' + env.pullRequestId + '/files?per_page=100^&page='+ page

String branchCommitDetails = bat returnStdout: true, script: 'curl -H "Accept: application/vnd.github.v3+json" -u SyncfusionBuild:' + env.GithubBuildAutomation_PrivateToken + " " + branchCommit

def ChangeFiles= branchCommitDetails.split('"filename": ');
Expand Down Expand Up @@ -53,7 +53,6 @@ String platform='grid-sdk';
checkout([$class: 'GitSCM', branches: [[name: '*/development']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ug_spellchecker']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: env.githubCredentialId, url: 'https://github.com/syncfusion-content/ug_spellchecker.git']]])

}

}

catch(Exception e)
Expand All @@ -71,12 +70,6 @@ if(currentBuild.result != 'FAILURE')
bat 'powershell.exe -ExecutionPolicy ByPass -File '+env.WORKSPACE+"/ug_spellchecker/build.ps1 -Script "+env.WORKSPACE+"/ug_spellchecker/build.cake -Target build -Platform \""+platform+"\" -Targetbranch "+env.githubTargetBranch+" -Branch "+'"'+env.githubSourceBranch+'"'
}

def files = findFiles(glob: '**/cireports/errorlogs/*.txt')

if(files.size() > 0)
{
currentBuild.result = 'FAILURE'
}

}
catch(Exception e)
Expand All @@ -95,4 +88,4 @@ if(currentBuild.result != 'FAILURE')
}
step([$class: 'WsCleanup']) }
}
}
}
90 changes: 90 additions & 0 deletions grid-sdk/blazor/tree-grid/how-to/row-cell-index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
layout: post
title: Blazor TreeGrid Get Selected Row Cell Index Value | Syncfusion
description: Learn how to get the index value of a selected row cell in Blazor TreeGrid and use row and cell indexes for programmatic operations.
platform: Blazor
control: Tree Grid
documentation: ug
---

# Get Selected Row Cell Index Value in Blazor TreeGrid

The index value of a selected row or cell in the Blazor TreeGrid component can be retrieved using the [GetSelectedRowCellIndexesAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_GetSelectedRowCellIndexesAsync) method of the TreeGrid component.

The following example demonstrates how to use the [GetSelectedRowCellIndexesAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_GetSelectedRowCellIndexesAsync) method on a button click to return the selected row cell indexes.

{% tabs %}

{% highlight razor %}

@using TreeGridComponent.Data;
@using Syncfusion.Blazor.Buttons;
@using Syncfusion.Blazor.Grids;
@using Syncfusion.Blazor.TreeGrid;

<SfButton OnClick="SelectedRowCellIndex" CssClass="e-primary" IsPrimary="true" Content="Get selected rowcell index"></SfButton>

<SfTreeGrid @ref="TreeGrid" DataSource="@TreeGridData" IdMapping="TaskId" ParentIdMapping="ParentId" TreeColumnIndex="1">
<TreeGridSelectionSettings Mode=SelectionMode.Cell></TreeGridSelectionSettings>
<TreeGridColumns>
<TreeGridColumn Field="TaskId" HeaderText="Task ID" Width="80" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="TaskName" HeaderText="Task Name" Width="160"></TreeGridColumn>
<TreeGridColumn Field="Duration" HeaderText="Duration" Width="100" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="Progress" HeaderText="Progress" Width="100" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Right"></TreeGridColumn>
<TreeGridColumn Field="Priority" HeaderText="Priority" Width="80"></TreeGridColumn>
</TreeGridColumns>
</SfTreeGrid>

@code{
SfTreeGrid<TreeData> TreeGrid;

public List<TreeData> TreeGridData { get; set; }

protected override void OnInitialized()
{
this.TreeGridData = TreeData.GetSelfDataSource().ToList();
}

public async Task SelectedRowCellIndex()
{
var value = await this.TreeGrid.GetSelectedRowCellIndexesAsync();
}
}

{% endhighlight %}

{% highlight c# %}

namespace TreeGridComponent.Data {

public class TreeData
{
public int TaskId { get; set; }
public string TaskName { get; set; }
public int? Duration { get; set; }
public int? Progress { get; set; }
public string Priority { get; set; }
public int? ParentId { get; set; }

public static List<TreeData> GetSelfDataSource()
{
List<TreeData> TreeDataCollection = new List<TreeData>();
TreeDataCollection.Add(new TreeData() { TaskId = 1, TaskName = "Parent Task 1", Duration = 10, Progress = 70, Priority = "Critical", ParentId = null });
TreeDataCollection.Add(new TreeData() { TaskId = 2, TaskName = "Child task 1", Progress = 80, Priority = "Low", Duration = 50, ParentId = 1 });
TreeDataCollection.Add(new TreeData() { TaskId = 3, TaskName = "Child Task 2", Duration = 5, Progress = 65, Priority = "Critical", ParentId = 2 });
TreeDataCollection.Add(new TreeData() { TaskId = 4, TaskName = "Child task 3", Duration = 6, Priority = "High", Progress = 77, ParentId = 3 });
TreeDataCollection.Add(new TreeData() { TaskId = 5, TaskName = "Parent Task 2", Duration = 10, Progress = 70, Priority = "Critical", ParentId = null });
TreeDataCollection.Add(new TreeData() { TaskId = 6, TaskName = "Child task 1", Duration = 4, Progress = 80, Priority = "Critical", ParentId = 5 });
TreeDataCollection.Add(new TreeData() { TaskId = 7, TaskName = "Child Task 2", Duration = 5, Progress = 65, Priority = "Low", ParentId = 5 });
TreeDataCollection.Add(new TreeData() { TaskId = 8, TaskName = "Child task 3", Duration = 6, Progress = 77, Priority = "High", ParentId = 5 });
TreeDataCollection.Add(new TreeData() { TaskId = 9, TaskName = "Child task 4", Duration = 6, Progress = 77, Priority = "Low", ParentId = 5 });
return TreeDataCollection;
}
}
}

{% endhighlight %}

{% endtabs %}

> Note: To retrieve the row cell index value, the [Mode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridSelectionSettings.html#Syncfusion_Blazor_TreeGrid_TreeGridSelectionSettings_Mode) property of the [TreeGridSelectionSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridSelectionSettings.html) component must be set to **Cell**.
1 change: 0 additions & 1 deletion grid-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,6 @@
<li><a href="/grid-sdk/blazor/tree-grid/editing/command-column-editing">Command Column Editing</a></li>
<li><a href="/grid-sdk/blazor/tree-grid/editing/column-validation">Column Validation</a></li>
<li><a href="/grid-sdk/blazor/tree-grid/editing/entity-frame-work">Entity Framework</a></li>
<li><a href="/grid-sdk/blazor/tree-grid/editing/auto-fill-like-excel">Auto Fill like Excel</a></li>
</ul>
</li>
<li>
Expand Down