homer.favenir
New member
- Joined
- Aug 17, 2009
- Messages
- 1
- Programming Experience
- Beginner
hi,
i have a datagridview control and with records in it.
and i want to write the selected row in an xml file
how can i achieve it
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Please kindly help
tia
	
		
			
		
		
	
				
			i have a datagridview control and with records in it.
and i want to write the selected row in an xml file
how can i achieve it
			
				VB.NET:
			
		
		
		Do While rowCount < DataGridView1.Rows.Count()
            gridItem = DataGridView1.Item(0, rowCount).Value
            Dim sp_getID As String
            sp_getID = "sp_EF_getEmpID"
            Dim cmd As New SqlCommand(sp_getID, SQLConn)
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Parameters.AddWithValue("@id", gridItem)
            result = cmd.ExecuteScalar().ToString()
            If result = "" Then
                empidList.ListBox1.Items.Add(gridItem) [COLOR="red"][B]'append/write this row in an xml file[/B][/COLOR]
                
            End If
            rowCount += 1
           LoopPlease kindly help
tia
 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		