I have an syncfusion grid control with 15 columns.I would like to show first five column in grid on initial load.When I click on grid row then I would like to display remaining 10 columns as in accordion format.
Please help
Please help and take a look in below link for "responsive mode"
Thanks for quick support...
I need to show remaining column in accordion type or popup when I click on grid row.
Please check attached file and below example which is my exact requirement.
For example :-
I have below 14 columns in Data source
1.SRFNo
2.Product
3.Buyer
4.Gender
5.StyleNo
6.Season
7.RefNo
8.SizeClass
9.Collection
10.RequestedBy
11.Descriptions
12.WidthClass
13.Last
14.LastNo
I need to show serial No 1 to 9 in main grid
and serial 10 to 14 should be display in accordion or popup windows when I click on grid row.
Hope its clear......
noted with thanks
I can manage below link till then further update,
but I would like to know below points to use this feature.
1.I need to show "details grid template" for current selected row only (other detail grid template should be collapse automatically)
2.How to hide arrow icon
for your reference. Please check attached file for better understanding
noted with thanks
I can manage below link till then further update,
but I would like to know below points to use this feature.
1.I need to show "details grid template" for current selected row only (other detail grid template should be collapse automatically)
2.How to hide arrow icon.
3.Detail background color and main selected row should be same (light grey).
4.the left padding of detail grid and main grid row should be same
for your reference. Please check attached file for better understanding
Attachment: detailgrid_83c3d85.zip
Please help because tomorrow support team will not available
|
public async Task RecordClickHandler(RecordClickEventArgs<EmployeeData> args)
{
await Grid.ExpandCollapseDetailRowAsync(args.RowData);
}
[detailexpand.js]
var dotnetInstance;
function detail(dotnet) {
dotnetInstance = dotnet; // dotnet instance to invoke C# method from JS
}
document.addEventListener('click', function (args) {
if (args.target.classList.contains("e-dtdiagonaldown") || args.target.classList.contains("e-detailrowexpand")) {
dotnetInstance.invokeMethodAsync('DetailCollapse'); // call C# method from javascript function
}
})
|
|
<style>
.e-grid .e-detailrowcollapse .e-icons.e-dtdiagonalright.e-icon-grightarrow {
display: none;
}
.e-grid .e-detailrowexpand .e-icons.e-dtdiagonaldown.e-icon-gdownarrow{
display: none;
}
...
</style>
|
|
<style>
...
.e-grid .e-detailcell,
.e-grid .e-detailindentcell,
.e-detailcell .e-grid .e-headercontent .e-headercell,
.e-detailcell .e-grid .e-gridcontent .e-rowcell{
background: #e6e6e6;
}
...
</style>
|
|
<style>
...
.e-grid .e-detail-intent{
width:0 !important;
}
</style>
|
I have issue on point no 1 ( 1.I need to show "details grid template" for current selected row only (other detail grid template should be collapse automatically) )
Please check my comments in below screencast
https://www.screencast.com/t/wCoFEhuyzoA.
|
<SfGrid @ref="Grid" DataSource="@Employees" Height="315px">
<GridEvents RowSelected="RowSelectHandler" RowDeselected="RowDeselecthandler" OnRecordClick="RecordClickHandler" DetailDataBound="DetailDataBound" DataBound="DataBound" TValue="EmployeeData"></GridEvents>
..
</SfGrid>
@code{
bool IsRowClickedTwice { get; set; }
public async Task DetailDataBound(DetailDataBoundEventArgs<EmployeeData> args)
{
if (target != null)
{
if (target == args.Data || IsRowClickedTwice) // return when target is equal to args.data
{
IsRowClickedTwice = false;
return;
}
await Grid.ExpandCollapseDetailRowAsync(target);
}
target = args.Data;
}
public void RowDeselecthandler(RowDeselectEventArgs<EmployeeData> args)
{
if (target == args.Data)
{
IsRowClickedTwice = true; //To ix issue When the same row is expanded, collapsed and then opening another row
}
}
public void RowSelectHandler(RowSelectEventArgs<EmployeeData> args)
{
//To ix issue When the same row is expanded, collapsed and then opening another row
target = args.Data;
}
} |