The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hello,
I do have the following code in ListView_ON Click even which is working just fine.
glbRelationID = ListView2.SelectedItems.Item(0).SubItems(1).Text
When I try to place the same code in ListView_On_Selected_Index_Changed event I receive an error. Does anyone know what I should change. Thank you.
Peter
> Hello,
> I do have the following code in ListView_ON Click even which is working just fine.
>
> glbRelationID = ListView2.SelectedItems.Item(0).SubItems(1).Text
>
> When I try to place the same code in ListView_On_Selected_Index_Changed event I receive an error. Does anyone know what I should change. Thank you.
> Peter
>
>
Hi peter
add this line before
if selectedindex = -1 exit sub
It will solve your problem
ADAdministrator Syncfusion Team November 22, 2003 03:38 PM
Hi Suda.
Thank you for the responce. Actually I'm not trying to avoid the error. I would like to select the item when the index Changes.
Please advise. Thank you.
SUsudaNovember 24, 2003 01:37 PM
Hi peter,
When Selected Index = -1 then SelectedItems Property will Return an Exception, I am also working around that if you don't select any value also it is throws an Exception error,Other than that it is working for me any other alternative please post it I will have a look.
Thank you Peter
Hello,
> I do have the following code in ListView_ON Click even which is working just fine.
>
> glbRelationID = ListView2.SelectedItems.Item(0).SubItems(1).Text
>
> When I try to place the same code in ListView_On_Selected_Index_Changed event I receive an error. Does anyone know what I should change. Thank you.
> Peter
>
>
Hi peter
add this line before
if selectedindex = -1 exit sub
It will solve your problem
ADAdministrator Syncfusion Team December 10, 2003 08:55 PM
I understand that but how do you know which item is bein selected?