Click here to Skip to main content
16,007,072 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: access to another forms objects Pin
prathiba_naresh29-Aug-05 22:50
prathiba_naresh29-Aug-05 22:50 
QuestionRe: access to another forms objects Pin
hakanaktan29-Aug-05 23:19
hakanaktan29-Aug-05 23:19 
AnswerRe: access to another forms objects Pin
prathiba_naresh30-Aug-05 0:05
prathiba_naresh30-Aug-05 0:05 
GeneralRe: access to another forms objects Pin
hakanaktan30-Aug-05 4:06
hakanaktan30-Aug-05 4:06 
QuestionAdding items to DataGrid in runtime Pin
Member 223436029-Aug-05 20:22
Member 223436029-Aug-05 20:22 
AnswerRe: Adding items to DataGrid in runtime Pin
BORN...again!29-Aug-05 21:01
BORN...again!29-Aug-05 21:01 
GeneralRe: Adding items to DataGrid in runtime Pin
Member 223436029-Aug-05 23:16
Member 223436029-Aug-05 23:16 
GeneralRe: Adding items to DataGrid in runtime Pin
BORN...again!30-Aug-05 17:01
BORN...again!30-Aug-05 17:01 
Hi ArulJothi,

---my requirement is i should be able to view the data in the datagrid from the database as well i want to enter new data in the same data grid to update my database.is this possible in vbdotnet ---

Yes it is possible to view the data as well as to update it. There are a couple of ways to do it,
1.In your SQL statement write a select stt to display the fields you need in the datagrid, do the rest of databse-connectivity,bindgrid() etc..coding. In your datagrid include a 'Hyperlink' column for 'change/Update Form' and redirect the link to your actual form by providing a 'URL' in the url field of the Property Builder i.e. Propertybuilder-->columns-->hyperlink column-->
HeaderText:Change/Update-->text:Update-->URLField:[your primary key of the form/table]eg:formNo-->URLFormat string:[your original form name not the datagrid one]eg: formname.aspx?formno={0}

this way your datagrid will bring you straight back to the form, you can make changes and save and the changes will be reflected in the datagrid.

2. Add the 'Edit,Update,Cancel' button and write the sub say, updatetable for update and edittabel for edit on the datagrid code behind page, include OnUpdatecommand="updatetable" and Oneditcommand="edittable" in the HTML page. so this will edit the columns and you can make changes to the fields you included in your datagrid(not form) and update it.

I hope this helps .let me know if you need more clarifications on any of the above.

good luck.


Aartee.
...HE is watching Us All!
GeneralRe: Adding items to DataGrid in runtime Pin
kpsetty2-Sep-05 5:50
kpsetty2-Sep-05 5:50 
QuestionWindows Forms Message Box Pin
JayaDurai29-Aug-05 19:05
JayaDurai29-Aug-05 19:05 
AnswerRe: Windows Forms Message Box Pin
Christian Graus29-Aug-05 19:21
protectorChristian Graus29-Aug-05 19:21 
GeneralRe: Windows Forms Message Box Pin
JayaDurai30-Aug-05 20:06
JayaDurai30-Aug-05 20:06 
GeneralRe: Windows Forms Message Box Pin
Christian Graus1-Sep-05 12:27
protectorChristian Graus1-Sep-05 12:27 
QuestionDelete Record in datagrid not working Pin
BORN...again!29-Aug-05 17:49
BORN...again!29-Aug-05 17:49 
Questiondail a telephone number ,and when the person lifts up the telephone ... Pin
sunnf29-Aug-05 15:53
sunnf29-Aug-05 15:53 
QuestionGet hotfixes type and DLL language Pin
highdoe29-Aug-05 12:25
highdoe29-Aug-05 12:25 
AnswerRe: Get hotfixes type and DLL language Pin
Dave Kreskowiak29-Aug-05 13:13
mveDave Kreskowiak29-Aug-05 13:13 
GeneralRe: Get hotfixes type and DLL language Pin
highdoe29-Aug-05 20:41
highdoe29-Aug-05 20:41 
GeneralRe: Get hotfixes type and DLL language Pin
Dave Kreskowiak30-Aug-05 2:32
mveDave Kreskowiak30-Aug-05 2:32 
Questiongetting ids Pin
Secrets29-Aug-05 11:17
Secrets29-Aug-05 11:17 
QuestionGarabage Collection Question Pin
|Spud|29-Aug-05 11:07
|Spud|29-Aug-05 11:07 
AnswerRe: Garabage Collection Question Pin
Secrets29-Aug-05 11:30
Secrets29-Aug-05 11:30 
GeneralRe: Garabage Collection Question Pin
|Spud|29-Aug-05 20:43
|Spud|29-Aug-05 20:43 
QuestionApplication to "see" over windows sessions Pin
°[Halo]°29-Aug-05 10:40
°[Halo]°29-Aug-05 10:40 
AnswerRe: Application to "see" over windows sessions Pin
Dave Kreskowiak29-Aug-05 10:47
mveDave Kreskowiak29-Aug-05 10:47 

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.