שאלה לגבי PageIndexChanged
בניתי טבלה באמצעות DATAGRID ואני רוצה ליצור אפשרות שבכל פעם יראו רק משהו כ -10 שורות בטבלה והמשתמש יוכל לדפדף קדימה ואחורה וכך כל פם לראות את המידע בו הוא מעוניין. אני יודעת שלשם כך קיים ה - PageIndexChanged להלן הקוד שרשמתי בנושא זה:
בניתי טבלה באמצעות DATAGRID ואני רוצה ליצור אפשרות שבכל פעם יראו רק משהו כ -10 שורות בטבלה והמשתמש יוכל לדפדף קדימה ואחורה וכך כל פם לראות את המידע בו הוא מעוניין. אני יודעת שלשם כך קיים ה - PageIndexChanged להלן הקוד שרשמתי בנושא זה:
sub DataGrid2_PageIndexChanged(sender As Object, e As DataGridPageChangedEventArgs) DataGrid2.CurrentPageIndex=e.NewPageIndex Grid() end sub לצערי כאשר אני מריצה את הדף ובאה ללחוץ על הסמן שאמור להראות לי את 10 השורות בהאות בטבלה אני מקבלת את הערה הבאה:
Exception Details: System.FormatException: Input string was not in a correct format. Source Error: Line 86: sub datagrid1_commant(sender As Object, e As DataGridCommandEventArgs) Line 87: Dim ID as integer Line 88: ID = Cint(e.item.cells("0").text) Line 89: Line 90: Dim IDemmloyee As System.Data.DataSet = New System.Data.DataSet
השאלה שלי היא למה הוא בכלל מגיע ל:datagrid1_commant? מצרפת קובץ קוד הדף המלא. אודה על העזרהException Details: System.FormatException: Input string was not in a correct format. Source Error: Line 86: sub datagrid1_commant(sender As Object, e As DataGridCommandEventArgs) Line 87: Dim ID as integer Line 88: ID = Cint(e.item.cells("0").text) Line 89: Line 90: Dim IDemmloyee As System.Data.DataSet = New System.Data.DataSet