This is a migrated thread and some comments may be shown as answers.

[Solved] RAD Grid - GridTHead & GridTFoot - Issue

1 Answer 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bose
Top achievements
Rank 1
Bose asked on 30 Sep 2009, 01:29 PM
Hi 

We are using Rad Grid in our application to perform inline Edit.
The issue we have with inline edit is that When I double click the row to perform edit the first and the second row does not return GridDataItem instead it returns GridTHead and GridTFoot.
To be clear we are not using any CommandItemTemplate and the mastertableview commandItemDisplay property is set to None.

Explanation:
After double clicking the first row the RaisepostBack event is invoked from the code Behind based on the eventtarget and eventargument we are passing the index of the row to fetch the GridDataItem

GridItem

 

item = ((rdGrid.MasterTableView.Controls[0] as Table).Rows[int.Parse(postBackEventArgumentData[1])] as GridItem);

 


The above code always return GridTHead and GridTFoot for the first and second row by default.
Below is the code which for rad grid in the aspx page.

<telerik:RadGrid ID="rdGrid"  runat="server" Width="100%" Height="100%" OnItemUpdated="rdGrid_ItemUpdated"  
OnSortCommand="rdGrid_SortCommand" OnColumnCreated="rdGrid_ColumnCreated"
 OnNeedDataSource="rdGrid_NeedDataSource" OnItemCommand="rdGrid_ItemCommand" 
 OnItemCreated="rdGrid_ItemCreated" OnItemDataBound="rdGrid_ItemDataBound" CommandItemDisplay="None" AllowAutomaticUpdates="true">
   <PagerStyle Mode="NextPrevNumericAndAdvanced" ></PagerStyle>
    <MasterTableView Width="100%" DataMember="col1" DataKeyNames="col2" CommandItemDisplay="None">
    <Columns>
                Controls  
    </columns>
    </MasterTableView>
    <ClientSettings>
         <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated" />
    </ClientSettings>
</telerik:RadGrid> 

It would be helpful if you can give me some suggestion or with sample code to perform the double click inline edit from the RaisePostBack event.
Whatever sample provided in the Telerik URL for the help does not perform edit based on the RaisePostBack event.
I have already gone through the Telerik help for the Grid Inline edit with Rowdblclick and RowClick.

Your earliest help is appreciated

Regards
Bose Thirumalai



     

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 05 Oct 2009, 07:07 AM
Hello Bose,

I suggest that you handle the items update in the grid ItemCommand event handler. For more information and samples on RadGrid editing you can review the below online resources:

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/grdeditmodeinplace.html
http://www.telerik.com/help/aspnet-ajax/grdupdatinginplaceandeditforms.html

Check it out and let me know if further questions arise.

All the best,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Bose
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or