-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: smart boy
Message 6 in Discussion

Hi
the problem with the solution is if you are adding a row to a table that is 
generated from an sql query joining more than one table, the process often 
fails because the dataset expects data in certain fields.

Eg. you May have a sales table linked with a product master table and the 
dataset table is generated joining the tables so that it shows product name 
along with code. when you insert a new row in the sales table, you will 
obviously not entre values of product name in the dataset table since it will 
pick it up automatically. However the insert will fail because the dataset 
expects data in those fields also.

Instead you should insert the new row directly in the database using 
executenonquery or create another table in the dataset which only has the table 
where you want the data inserted. Thus, you will use a different table for 
insert and a different for showing data in the grid.

Regards

saswata

"SPMurali" <[EMAIL PROTECTED]> wrote:
__________
>-----------------------------------------------------------
>
>New Message on MumbaiUserGroup
>
>-----------------------------------------------------------
>From: SPMurali
>Message 4 in Discussion
>
>
>Hi 
>Sachin,
> 
>Herewith, I am giving some steps for you to solve your 
>problem.
> 
>1. Get 
>data into dataset 
>2. 
>Bind dataset to the datagrid
>3. 
>OnClick of new button, add new row to data table in dataset.
>4. 
>Call AcceptChanges method on Dataset to accept the newly added 
>record
>5. 
>Rebind dataset to the grid and set EditItemIndex as the newly added record 
>index.
> 
>I 
>think it will solve your problem.
> 
>Thanks 
>& Regards,
>Murali 
>Poola
>
>  -----Original Message-----
>From: omsss 
>  [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 02, 2004 
>  3:02 PM
>To: MumbaiUserGroup
>Subject: 
>  datagrid
>
>
>  
>    
>      
>      New Message on MumbaiUserGroup
>    
>      
>
>  datagrid
>
>
>    
>      
>      
>        Reply
>
>        
>          
>            
>            
>               
>              Reply to Sender   Recommend 
>              Message 1 in 
>                Discussion 
>      
>        
>          
>            
>            
>              From: omsss 
>            
>              
>
>                Hi all, 
>                          I 
>                have problem with datagrid.
>                my datagrid is bound to query based on two-three 
>                tables.
>                I bound the datagrid with query result.
>                I want to add new row to datagrid for user to  enter 
>                additional data.
>                and bind it to datagrid again and display
>                 new row  also.
>                 
>                There is submit button on form when submit then data will 
>                be saved.
>                Before it not.
>                 
>                How i handle this siutaion?.
>                How i bind datagrid
>                 
>                 
>                Regards,
>                 
>                Sachin 
>                 
>                 
>                 
>                 
>                 
>                 
>View other groups in this 
>    category. 
>
>
>
>-----------------------------------------------------------
>
>To stop getting this e-mail, or change how often it arrives, go to your E-mail 
>Settings.
>http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
>
>Need help? If you've forgotten your password, please go to Passport Member 
>Services.
>http://groups.msn.com/_passportredir.msnw?ppmprop=help
>
>For other questions or feedback, go to our Contact Us page.
>http://groups.msn.com/contact
>
>If you do not want to receive future e-mail from this MSN group, or if you 
>received this message by mistake, please click the "Remove" link below. On the 
>pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
>address will be deleted from this group's mailing list.
>mailto:[EMAIL PROTECTED]
>



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to