Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 1st, 2007, 04:21 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default grid view

hello to all
i have a grid view and i take link button in grid view in item template. i need when user click on this somedatabase values need to changed.please guide.




thanks......
__________________
thanks......
 
Old June 1st, 2007, 06:01 AM
Authorized User
 
Join Date: May 2007
Location: pune, maharashtra, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi munish

Actually you haven't explained your problem properly but what i got is You have one DataGrid or Gridview in which u created on linkButton for ur information i would like to tell u that, Link Button and Push Button works with similar way. I have written one code bellow for Edit Button you can refer it

'1) EDIT OPERATION
Private Sub DataGrid1_EditCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles Datagrid1.EditCommand

            Datagrid1.EditItemIndex = e.Item.ItemIndex

            TextBox3.Text = e.Item.Cells(0).Text
            Dim cn1 As New OleDb.OleDbConnection()
cn1.ConnectionString= "Provider=SQLOLEDB.1;Password=whiteeagle;Persi st Security Info=True;User ID=sa;Initial Catalog=gtport;Data Source=GIS1;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GIS3;Use Encryption for Data=False;Tag with column collation when possible=False"

            Dim sql1 As String
            sql1 = "select id,materialtype_desc,packingtype_desc,item_descrip tion,actual_wt,quantity,rate,amount,declared_value ,declared_wt from tmp_mtran_b where sess_id ='" & Session.SessionID & "'"

            Dim cmd1 As New OleDb.OleDbCommand(sql1, cn1)
            Dim adpt1 As New OleDb.OleDbDataAdapter(cmd1)
            Dim ds1 As New DataSet()
            adpt1.Fill(ds1, "tmp_mtran_b")
            Datagrid1.DataSource = ds1.Tables("tmp_mtran_b")
            Datagrid1.DataBind()
            cn1.Open()
            cmd1.ExecuteNonQuery()
            cn1.Close()
            Datagrid1.Focus()
        End Sub

##########Use this code with proper datagrid name .... i know this will surly help u out..

Good Luck

Regards
AMOL

Amol Chikurte
 
Old June 5th, 2007, 12:15 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default

thanks i am near to solution.



thanks......




Similar Threads
Thread Thread Starter Forum Replies Last Post
Grid view roopeshmkatlive.in ASP.NET 1.0 and 1.1 Professional 1 August 1st, 2008 01:03 PM
Help Grid View Drop Down List, view all jskinner123 ASP.NET 2.0 Basics 0 November 25th, 2007 06:25 PM
grid view komalpriya .NET Framework 2.0 3 November 7th, 2007 10:34 AM
grid view MunishBhatia ASP.NET 2.0 Professional 1 May 25th, 2007 07:26 AM
calender with grid view chandrasekhar ASP.NET 2.0 Professional 1 April 13th, 2006 01:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.