BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Narry,
Thanks for using Syncfusion products.
We have analyzed the query and your requirement could be
achieved by two ways either by using a button click or by using the SelectedRecordsChanged event.
*Query: I want to find rowindex of the grid grouping
control in asp.net c#.
[using ButtonClick]
We can get the row index of selectedrecord from Grid Table
CurrentRecord. Please refer to the following code snippets:
protected void Button_Click1(object sender, EventArgs e)
{
this.GridgroupingControl1.Table.CurrentRecord.GetRowIndex();
}
[using SelectedRecordsChanged]
Bind the selected records changed event to grid grouping
control, and get the row index of selected record. Please refer to the
following code snippets:
void
GridgroupingControl1_SelectedRecordsChanged(object sender, Syncfusion.Grouping.SelectedRecordsChangedEventArgs e)
{
if (e.SelectedRecord !=null && e.Action !=
Syncfusion.Grouping.SelectedRecordsChangedType.Reset)
{
int rowindex =
e.SelectedRecord.Record.GetRowIndex();
}
}
For your convenience we
created a simple sample and same can be download from the following
link:
Sample: http://www.syncfusion.com/downloads/support/directtrac/123628/WebApplication1-1072232008.zip
Please let us know if you have any further assistance.
Regards,
Shalini AT
void GridgroupingControl1_SelectedRecordsChanged(object sender, Syncfusion.Grouping.SelectedRecordsChangedEventArgs e)
{
if (e.SelectedRecord !=null && e.Action != Syncfusion.Grouping.SelectedRecordsChangedType.Reset)
{
int rowindex = e.SelectedRecord.Record.GetRowIndex();
}
}
by using above code i am getting wrong index
Hi mohsin/venkatesh,
Thanks for using Syncfusion product.
*Query: i using same code but getting wrong index, please
check and let me quickly.
We are unable to reproduce the
issue “Grid Grouping control Row index” .The RowIndex of grid rows are starting
from 0,1,2,… so on. We have prepared a video demonstration of a working sample
and the same can be downloaded from the following link.
Video: http://www.syncfusion.com/downloads/support/directtrac/128779/Video_(2)1592037951.zip
Could
you please replicate your issue in the given sample and send back to us with
more information so that we could able to sort out the cause of this issue or
If we misunderstood your requirement please get back to us with more
information so that we can analyze based on your scenario and provide you a
better solution quickly?
The
information provided would be of great help in resolving the issue.
Let us know if you need further
assistance.
Regards,
Shalini AT.
void GridgroupingControl1_SelectedRecordsChanged(object sender, Syncfusion.Grouping.SelectedRecordsChangedEventArgs e)
{
if (e.SelectedRecord !=null && e.Action != Syncfusion.Grouping.SelectedRecordsChangedType.Reset)
{
int rowindex = e.SelectedRecord.Record.GetRowIndex();
}
}
by above code i am getting wrong index because it is couting Header Row as index but i don't want to read header as index to overcome this what can i do
Hi Mohsin,
Thanks for your update.
Query #1 “how to find label in grid grouping control in item template”
We have already provided the solution for this query in the forum – 117173. So we would like to suggest you to refer the below link,
Query #2: “I am getting wrong index because it is counting Header Row as index but I don't want to read header as index to overcome this what can I do”
As per our current implementation, Header rows are also included to count the index value and it is not feasible so we need to customize this based on requirements. And we suggest you to get the appropriate index value by decreasing its count as “1” for each enabled properties like ShowGroupDropArea, ShowCaption and ShowColumnHeaders. Please refer the below sample link.
Link: SampleProject.zip
By using this customized row index value, we couldn’t able to get the correct records based on this value in server side. So, could you please provide us more information regarding this scenario for getting row index value so that we can analyse based on that and provide you better solution?
The information provided would be a great help for us to resolve this issue.
Please let us know if you need any further assistance.
Regards,
Silambarasan I