Results 1 to 4 of 4

Thread: neweditindex property in gridview

  1. #1
    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.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    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.

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    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.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    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.

Similar Threads

  1. Datagrid VS Gridview
    By Techno Guru in forum Software Development
    Replies: 5
    Last Post: 16-01-2010, 12:42 PM
  2. Replies: 2
    Last Post: 08-06-2009, 09:54 PM
  3. Add Columns to GridView Programmatically
    By Firon in forum Software Development
    Replies: 3
    Last Post: 19-05-2009, 06:44 PM
  4. Nested DataTable for GridView
    By Renderman21 in forum Software Development
    Replies: 3
    Last Post: 08-05-2009, 02:08 PM
  5. asp.net gridview to pdf
    By Dietrich in forum Software Development
    Replies: 1
    Last Post: 05-02-2009, 12:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,433,366.92042 seconds with 17 queries