Click here to Skip to main content
15,886,067 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: plz help me in registering new user on Mail server Pin
Guffa12-Feb-07 19:33
Guffa12-Feb-07 19:33 
QuestionSorting in PivotTable Pin
perumalraji12-Feb-07 18:01
perumalraji12-Feb-07 18:01 
Questionneed help: Script to save image from URL to local directory Pin
ratiphi12-Feb-07 15:33
ratiphi12-Feb-07 15:33 
AnswerRe: need help: Script to save image from URL to local directory Pin
Guffa12-Feb-07 21:23
Guffa12-Feb-07 21:23 
Questionjavascript error in .net Pin
uowzd0112-Feb-07 14:40
uowzd0112-Feb-07 14:40 
AnswerRe: javascript error in .net Pin
enjoycrack12-Feb-07 15:24
enjoycrack12-Feb-07 15:24 
GeneralRe: javascript error in .net Pin
uowzd0112-Feb-07 16:12
uowzd0112-Feb-07 16:12 
QuestionAdd a Blank Row to Gridview? Pin
BORN...again!12-Feb-07 13:28
BORN...again!12-Feb-07 13:28 
Hello,

Does anyone have a code snippet for adding a blank row at the end or top of the gridview on a button click?The button is outside the GV and not in the footer.
I did it in datagrid and I guess it was easier.But for gridview it isn't working. I will post my little snippet but it is giving me error:

Protected Sub btnadddriver_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnadddriver.Click
DriverGV.DataBind()
Dim ds As DataSet = DriverGV.DataSource
Dim blank As System.Data.DataRow = ds.Tables(0).NewRow()

ds.Tables(0).Rows.InsertAt(blank, ds.Tables(0).Rows.Count)
DriverGV.EditIndex = ds.Tables(0).Rows.Count - 1
DriverGV.DataBind()
End Sub

The error I am getting is :
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object
Line 16: Dim blank As System.Data.DataRow = ds.Tables(0).NewRow()

If someone has a working snippet for adding a blank row to the gridview can you kindly help me?
I'm on Visual Studio2005,Asp.Net2.0,VB
Thanks.All help is much appreciated.

Aartee.
...HE is watching Us All!

AnswerRe: Add a Blank Row to Gridview? Pin
enjoycrack12-Feb-07 15:25
enjoycrack12-Feb-07 15:25 
QuestionNavigateUrl='<%=CodeBehindFunction %>' does not work Pin
-Dr_X-12-Feb-07 12:02
-Dr_X-12-Feb-07 12:02 
AnswerRe: NavigateUrl='<%=CodeBehindFunction %>' does not work Pin
andyharman14-Feb-07 8:20
professionalandyharman14-Feb-07 8:20 
Questioni need a code for user login time Pin
suresh_kumar_s12-Feb-07 9:16
suresh_kumar_s12-Feb-07 9:16 
AnswerRe: i need a code for user login time Pin
Rahithi12-Feb-07 10:31
Rahithi12-Feb-07 10:31 
AnswerRe: i need a code for user login time Pin
enjoycrack12-Feb-07 15:27
enjoycrack12-Feb-07 15:27 
QuestionDownloading file not working Pin
Program.X12-Feb-07 9:05
Program.X12-Feb-07 9:05 
AnswerRe: Downloading file not working Pin
Jon Sagara12-Feb-07 10:21
Jon Sagara12-Feb-07 10:21 
QuestionInstantiation Pin
Civic0612-Feb-07 8:19
Civic0612-Feb-07 8:19 
QuestionWhat does "Clean Solution" do? Pin
robert11012-Feb-07 6:05
robert11012-Feb-07 6:05 
AnswerRe: What does "Clean Solution" do? Pin
Ed.Poore12-Feb-07 8:42
Ed.Poore12-Feb-07 8:42 
QuestionMaximum Attachment Size Pin
happyheartcs12-Feb-07 5:39
happyheartcs12-Feb-07 5:39 
AnswerRe: Maximum Attachment Size Pin
robert11012-Feb-07 6:17
robert11012-Feb-07 6:17 
GeneralRe: Maximum Attachment Size Pin
happyheartcs12-Feb-07 8:27
happyheartcs12-Feb-07 8:27 
GeneralRe: Maximum Attachment Size Pin
robert11012-Feb-07 8:46
robert11012-Feb-07 8:46 
GeneralRe: Maximum Attachment Size Pin
happyheartcs12-Feb-07 22:30
happyheartcs12-Feb-07 22:30 
GeneralRe: Maximum Attachment Size Pin
robert11013-Feb-07 2:54
robert11013-Feb-07 2:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.