Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 13-06-2009
Member
 
Join Date: May 2009
Posts: 55
neweditindex property in gridview

I want a general idea about the nneweditindex property and gridview class. What syntax should be used to edit a row in the index. Here I have a gridview template field in my project in which I want to get the value during the rowediting event. But I am not able to figure out how to do this. The thing which I am working works well if the cell is databount, but it fails in templates field. And second thing, is there a way by which I can change the control width in edit mode because the text boxes are quiet wide.
Reply With Quote
  #2  
Old 13-06-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: neweditindex property in gridview

neweditindex property helps you to set the index the index of row which is being edited. It is used to determing the index of row which is going to be edited. The rows index is also used to get a row from the rows collection of the grid vew control. This allows you to access the rows properties. You get some sample codes from the internet and work on the above issue.
Reply With Quote
  #3  
Old 13-06-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: neweditindex property in gridview

The TemplatesFields has controls which have value. As compare to boundfields which have their values in side them they are different. If you can reference the control tab then I think that can help you out. Like refer to the below example :
This one for the C#:

Code:
TextBox SampleTextBox =
(TextBox)gvBrazeLoad.Rows(e.NewEditIndex).Cells(6) .FindControl("TextBoxID");
The sample textbox contains the value.
Reply With Quote
  #4  
Old 13-06-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: neweditindex property in gridview

The gridview class denotes the values of date of a particular database in a table where every coloumn shows a field and each row is a record. By gridview you can select, sort and edit them. It is the control which is used to display the values of a data source. It supports binding of data source controls, sort capabilities which are built in, update and delete, paging options, row selection capacities, etc.

The syntax you can use to apply girdview is as follows.
If you are using Visual basic usage then - Dim instance As GridView
or
If you are using jscript then -
public class GridView extends CompositeDataBoundControl implements IPostBackContainer, IPostBackEventHandler, ICallbackContainer, ICallbackEventHandler
or
ASP.NET - <asp:GridView />

For you query to change an item to change a control widthe c hange the items to Templatefield. And then you will able to configure the width in the edit item template.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "neweditindex property in gridview"
Thread Thread Starter Forum Replies Last Post
Datagrid VS Gridview Techno Guru Software Development 5 16-01-2010 12:42 PM
How to use Gridview ImageField in DataImageUrlFormatString on ASP.net AK_Chopra Software Development 2 08-06-2009 09:54 PM
Add Columns to GridView Programmatically Firon Software Development 3 19-05-2009 06:44 PM
Nested DataTable for GridView Renderman21 Software Development 3 08-05-2009 02:08 PM
asp.net gridview to pdf Dietrich Software Development 1 05-02-2009 12:15 PM


All times are GMT +5.5. The time now is 02:24 PM.