Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:636002
More Search Options
RSS Available
Matching Posts
Gridview Iteration with checkboxes, Index out of range error message.
I am trying to iterate through a gridview and update a database when the checkbox is checked in a gridview, but I get an out of range error. I have the gridview in a updatepanel. Protected Sub UpdateGradeBut_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles UpdateGradeBut.Click Dim CurrentRow As String If Not GradeToDD.SelectedValue = "" Then Dim Grade As Integer = GradeToDD.SelectedValue For index As Integer = 0 To FileList.Rows.Count - 1 'Programmatically access
Posted to
Data Presentation Controls
(Forum)
by
jonesf222
on 10/18/2006
Re: retrieving an row item when interating a gridview with checkboxes.Problem?
There were a couple of things wrong with the code above. Here is the code that worked for me: Protected Sub ResetBut_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles ResetBut.Click For index As Integer = 0 To StudentInfoGv.Rows.Count - 1 'Programmatically access the CheckBox from the TemplateField Dim cb As CheckBox = CType (StudentInfoGv.Rows(index).FindControl( "RowLevelCheckBox" ), CheckBox) 'If it's checked, delete it... If cb.Checked Then Dim username
Posted to
Data Presentation Controls
(Forum)
by
jonesf222
on 9/30/2006
retrieving an row item when interating a gridview with checkboxes.Problem?
I have followed Scott Mitchell article for check all check boxes in a gridview, and want to know iterated through the checked rows in the gridview to update student profile information. I get an exception that the key is not in the correct format. Protected Sub ResetBut_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles ResetBut.Click For index As Integer = 0 To StudentInfoGv.Rows.Count - 1 'Programmatically access the CheckBox from the TemplateField Dim cb As CheckBox = CType
Posted to
Data Presentation Controls
(Forum)
by
jonesf222
on 9/30/2006
gridview checkbox row iteration error
Following Scott Mitchell's article about checking all checkboxes in a gridview on 4guys, I am trying to iterate through the rows to change students' grade levels but I get an error about index count must not be a negative number. Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the
Posted to
Data Presentation Controls
(Forum)
by
jonesf222
on 9/2/2006
Re: Rendering Gridview Error when using download to excel script, even with overriding verify render
Although I have not tried it yet, I found the solution on this blog after a day of searching. Protected Sub DownloadExcel_but_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles ExportToExcel_but1.Click, ExportToExcel_but2.Click If GridView1.Rows.Count.ToString + 1 < 65536 Then GridView1.AllowPaging = "False" GridView1.DataBind() Dim tw As New StringWriter() Dim hw As New System.Web.UI.HtmlTextWriter(tw) Dim frm As HtmlForm = New HtmlForm() Response.ContentType = "application
Posted to
Data Presentation Controls
(Forum)
by
jonesf222
on 8/28/2006
Rendering Gridview Error when using download to excel script, even with overriding verify render
I am still getting a server tag error on the gridview even when overriding the verify render method. Please check my code: Protected Sub DownloadExcel_but_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles ExportToExcel_but1.Click, ExportToExcel_but2.Click Response.ClearContent() Response.AddHeader( "content-disposition" , "attachment; filename=MyExcelFile.xls" ) Response.ContentType = "application/excel" Dim sw As StringWriter = New StringWriter()
Posted to
Data Presentation Controls
(Forum)
by
jonesf222
on 8/28/2006
Re: DataSet - DataTable iteration Question vb.net?
Here is what the whole loop looks like. I am trying to upload a excel sheet with student information, and create user accounts for them. If the students information exists create one table and If you does not exist create another table. The created users has a loop to check to see if the username exists and tries to increment by placing an integer at the end of the username. If you could check the loop for any obvious errors it would help. I have debugged to the point where it causes no exceptions
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
jonesf222
on 8/27/2006
Re: DataSet - DataTable iteration Question vb.net?
do you have to increment the count? for each x as row in ds.tables(0).rows next x
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
jonesf222
on 8/27/2006
DataSet - DataTable iteration Question vb.net?
I want to be able to iterate through a datasets rows until there are no more rows. I am not sure wether there are any special techniques in doing this but This does not seem to work. For i = 0 To DS.Tables(0).Rows.Count - 1 Step i + 1 Please help.
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
jonesf222
on 8/27/2006
Re: Manually Create a User and add profile values Problem
I used the profileBase class instead Dim p as ProfileBase = New ProfileBase(UserName.Text) p.FirstName = FirstName.Text ....
Posted to
Security
(Forum)
by
jonesf222
on 8/27/2006
Page 1 of 9 (83 items) 1
2
3
4
5
Next >
...
Last »
WindowsClient:
Developing an installer for your Surface application
ASP.NET:
Visual Studio 2010 and .NET 4 Update
WindowsClient:
Microsoft’s product placements in The Big Bang Theory
Channel 9:
Channel 9 Live at PDC09: Martin Cron
Channel 9:
Channel 9 Live at PDC09: Erik Meijer and Thomas Lewis
WindowsClient:
Download Data Services Update for .NET 3.5 SP1
Silverlight:
Extending the SMF for the HVP
Silverlight:
Extending the SMF for the HVP
Channel 9:
C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 12 of 13
Channel 10:
Bing Maps Update: Map Embeds and Draggable Routes
WindowsClient:
New WPF Showcase: WEB Touch
ASP.NET:
ASP.NET MVC 2 RC Released
WindowsClient:
Very exciting Microsoft Pivot from Live Labs
WindowsClient:
XAML for UI & .rc files
TechNet Edge:
DNS Security (DNSSec) Overview
Silverlight:
Silverlight 4 demos from my PDC Keynote now available
Channel 9:
Channel 9 Live at PDC09: Dave Campbell
Channel 9:
Channel 9 Live at PDC09: Yousef Khalidi
Channel 9:
Twitter App for Zune Launches
WindowsClient:
Incarnate
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online