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

radgrid view edit row columns

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
xis xix
Top achievements
Rank 1
xis xix asked on 26 Oct 2011, 07:02 PM
Hi. 
I had this radgrid: 

 <telerik:RadGrid ID="radGrdView" runat="server" AutoGenerateColumns="false" 
                        AllowPaging="true" OnEditCommand="Edit_Click" OnCancelCommand="Cancel_Click" OnUpdateCommand="Update_Click">
                        <PagerStyle Mode="NextPrevAndNumeric" />
                        <GroupingSettings CaseSensitive="false" />
                        <MasterTableView TableLayout="Fixed">
                            <Columns>
                                <telerik:GridEditCommandColumn EditText="Editar" CancelText="Cancelar" UniqueName="grdEdtColumn" />

                                <telerik:GridBoundColumn DataField="idUser" DataType="System.Int32" HeaderText="Nº Colaborador"
                                    Visible="true"  UniqueName="idUser" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="organizationID_FK" DataType="System.Int32" HeaderText=""
                                    Display="false" UniqueName="idEmpresa" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="UserName" DataType="System.String" HeaderText="Colaborador"
                                    Visible="true"  UniqueName="User" ReadOnly="true">
                                </telerik:GridBoundColumn>
                                                  
...
                                 <telerik:GridBoundColumn DataField="totalDias" DataType="System.DateTime"  HeaderText="Dias de Férias"
                                    Visible="true"  UniqueName="Data" ReadOnly="false">
                                </telerik:GridBoundColumn>


                                <telerik:GridBoundColumn DataField="diasPorGozar" DataType="System.Int32" HeaderText="N.º Dias Férias Gozados"
                                    Visible="true"  UniqueName="NFerias" ReadOnly="false"> 
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>

As it's possible to note i add a GridEditCommandColumn. This edit button should allow me to edit my last two columns.
When i click on "Update", Cancel or "Edit" my radgrid disapears, only apearing on a new databind to it.  On the new bind then a template for editing the last columns appears. 
 1st problem:  what can i do in order that radgrid doesn't disapear, since it doesn't make sense that i had to rebind the grid to see it with the template. 

My ideia was that when i click on edit, the last two columns would be enable for edit  an i could do it directly on it.  is this possible? 






1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Oct 2011, 04:53 AM
Hello,

I suppose this issue arises because you are using Simple data binding. In order to implement advanced features in grid like Editing, paging, grouping etc make sure that you use Advanced data binding with NeedDataSource event.
Advanced Data-binding (using NeedDataSource event).

Thanks,
Shinu.
Tags
Grid
Asked by
xis xix
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or