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

Accessing data from hidden column in event rowdrop

1 Answer 14 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Samuel
Top achievements
Rank 1
Samuel asked on 05 Sep 2013, 10:15 PM
Good afternoon stoy trying to access the data of a hidden column in the event rowdrop, but the value displayed is ""
<telerik:RadGrid ID="GrdDetalleHorario" runat="server" AllowMultiRowSelection="true"
                                AutoGenerateColumns="False" GridLines="None" Width="240px">
                                <AlternatingItemStyle />
                                <ItemStyle />
                                <MasterTableView>
                                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                    <RowIndicatorColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridBoundColumn Visible="false" DataField="HorarioDetalleID" HeaderText="Codigo"
                                            UniqueName="HorarioDetalleID" >
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn Visible="false" DataField="HorarioID" HeaderText="HorarioID"
                                            UniqueName="HorarioID" >
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn ItemStyle-Width="10px" DataField="HoraInicio" HeaderText="H. Ini."
                                            UniqueName="HoraInicio">
                                            <ItemStyle Width="10px"></ItemStyle>
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn ItemStyle-Width="10px" DataField="HoraFinal" HeaderText="H. Fin"
                                            UniqueName="HoraFinal">
                                            <ItemStyle Width="10px"></ItemStyle>
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn Visible="false" ItemStyle-Width="10px" DataField="Flag"
                                            HeaderText="Receso" UniqueName="Flag">
                                            <ItemStyle Width="10px"></ItemStyle>
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                    <EditFormSettings>
                                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                        </EditColumn>
                                    </EditFormSettings>
                                    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                </MasterTableView>
                                <FilterMenu EnableImageSprites="False">
                                </FilterMenu>
                                <HeaderStyle BackColor="#D7FFFA" HorizontalAlign="Center" />
                                <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                <ClientSettings AllowRowsDragDrop="True">
                                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
                                    <%--<ClientEvents OnRowDropping="onRowDropping" />--%>
                                </ClientSettings>
                            </telerik:RadGrid>
the code is as follows:
Protected Sub GrdDetalleHorario_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) Handles GrdDetalleHorario.RowDrop
        If String.IsNullOrEmpty(e.HtmlElement) Then
            Dim CursoSemestre As Curso_Presupuesto = oCurso_Presupuesto.ObtenerCursos_SemestreIDPrueba(Session("IDACA"))
            For Each oRowItem As GridDataItem In e.DraggedItems
                Dim ohorarioDetalleID As Integer = oRowItem.Item("HorarioDetalleID").Text  'Here the return value is " "
                Dim oHorarioID As Integer = oRowItem.Item("HorarioID").Text 'Here the return value is " "
                Dim oHoraInicio As String = oRowItem.Item("HoraInicio").Text

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 1
answered on 06 Sep 2013, 04:49 AM
Hi Samuel,

I see that you have set the column Visible="false" and trying to access it in the code behind.Please set Display="false" which will make the column accessible in the code behind.Please have a look at this forum for more details.

Thanks,
Princy
Tags
Grid
Asked by
Samuel
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or