Hi Everyone,
I am using VB in my code behind. I have a webgrid and I'm using a SqlDataSource bound to the WebGrid
And I need to add new records but I don't know how.
Can I use datarows ? How can I implement it ?
Thanks !!
i have ultrawebgrid with three columns
on tabout from lastcell of first row
1) it should create new row below
2) with focus pointing at first cell of newly added row
i try'd using javascript keydownhandler.
1) i am able to add new row,
2) but as soon as the row is added focus is lost and page is refreshed
3) one again i have to click on newly added row first cell to activate it
Question 2
and also how to get the row index of the newly added row using ultrawebgrid addnewrow property
1)i try'd very hard but i am getting only current row index
2) when i try to access current row index+1 its showing nullreference or out of bound index reference(the reason i think the row is not added yet)
looking at your first site i got to ask..
what the heck is this stuff?
Imports DataSet1TableAdaptersDim ta As New CustomersTableAdapter()
Imports DataSet1TableAdapters
Imports
Dim ta As New CustomersTableAdapter()
Dim
As
New
Hello,
Thank you for posting your request on the Infragistics WebGrid Forums. A good place of refernece for information on adding new rows to the WebGrid is to look at the databinding topics available for the WebGrid which may be found here: <http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.1/CLR3.5/html/WebGrid_Data_Updating.html>
When using a SqlDataSource control, the CRUD Insert/Update/Delete commands may be enabled through the wizard when binding it to the grid. The WebGrid DataKeyField will need to be set to match the primary key in your column.
The grid is not editable by default, so you'll want to enable editing, or at least enable add new. There is an AddNewBox and a AddNewRow that can be used to add new rows of data. Once the grid is connected to the SqlDataSource, the addnew operations will be connected to the database.
The following URL is a link to the Infragistics WebClient Online Help where information on adding new rows to the WebGrid may be found:
<http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.1/CLR3.5/html/WebGrid_Adding_Rows.html>
Please take a look at this information and let me know if you have any questions.Sincerely,Mike D.Developer Support EngineerInfragistics, Inc.