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

Problem using RadPanelBar inside RadGrid Popup

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
shootermv
Top achievements
Rank 1
shootermv asked on 08 Jul 2010, 11:15 AM
Hello. I want to place RadPanelBar in the popup of RadGrid Item.
Until i use simple tables i can get the RadGrid Item Values by

<%# DataBinder.Eval( Container, "DataItem.MyFieldName" ) %>


But once i try to access fields values from inside the RadPanelBar - i cant get them no more

Relevant code:
1. RadGrid markup:
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" 
            AllowPaging="True" CssClass="RadGrid"
            AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True" OnPreRender="RadGrid1_PreRender"
            OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
            OnInsertCommand="RadGrid1_InsertCommand" 
            OnDeleteCommand="RadGrid1_DeleteCommand" 
           AllowFilteringByColumn="True" Skin="WebBlue" 
           ondatabound="RadGrid1_DataBound" onitemdatabound="RadGrid1_ItemDataBound" 
           DataSourceID="odsQuestions" 
           ondetailtabledatabind="RadGrid1_DetailTableDataBind" 
           oneditcommand="RadGrid1_EditCommand" onitemcommand="RadGrid1_ItemCommand" onitemevent="RadGrid1_ItemEvent" 
            >
            <HeaderContextMenu EnableRoundedCorners="True">
            </HeaderContextMenu>
            <PagerStyle AlwaysVisible="True" ShowPagerText="False" />
            <MasterTableView EditMode="PopUp" Width="100%" CommandItemDisplay="Top" 
                DataKeyNames="QuestionIDunique" DataSourceID="odsQuestions" ShowHeadersWhenNoRecords="false">
                <CommandItemSettings AddNewRecordText="הוסף חדש" RefreshText="רענן" />
                <NoRecordsTemplate>אין נתונים להצגה</NoRecordsTemplate
                <Columns>
                    <telerik:GridBoundColumn UniqueName="QuestionIDunique" 
                        HeaderText="מס יחודי" DataField="QuestionIDunique" 
                        DataType="System.Int32" ReadOnly="True" SortExpression="QuestionIDunique">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="SerialQuestion" HeaderText="מס סידורי" 
                        DataField="SerialQuestion" DataType="System.Decimal" 
                        SortExpression="SerialQuestion">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="QuestionOfQuestionnaire" 
                        HeaderText="נוסח השאלה בשאלון" DataField="QuestionOfQuestionnaire" 
                        SortExpression="QuestionOfQuestionnaire">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="QuestionID" HeaderText="מס שאלה" 
                        DataField="QuestionID" SortExpression="QuestionID">
                    </telerik:GridBoundColumn>
                    <telerik:GridEditCommandColumn CancelText="בטל" EditText="ערוך" 
                        InsertText="הוסף" UpdateText="עדכן">
                    </telerik:GridEditCommandColumn>
                </Columns>
                <EditFormSettings CaptionDataField="QuestionIDunique" CaptionFormatString="edit: {0} " UserControlName="UC/UCQuestionsDetails.ascx" EditFormType="WebUserControl" PopUpSettings-Width="900px" PopUpSettings-Height="300px">
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                    <PopUpSettings Height="300px" Width="900px" modal="True"></PopUpSettings>
                </EditFormSettings>
                <PagerStyle AlwaysVisible="True" ShowPagerText="false"></PagerStyle>
            </MasterTableView>
        </telerik:RadGrid>




2. PopUp user control:
<telerik:RadPanelBar ExpandMode="SingleExpandedItem" runat="server" id="RadPanelBar1" dir="rtl" style="float: right;" Height="300px" Width="900px">
    <Items>
        <telerik:RadPanelItem Text="header1" Expanded="True" PreventCollapse="True" 
            Selected="True">
            <Items>
                <telerik:RadPanelItem >
                    <ItemTemplate>
                        <div id="divQuestionDetails">
           <asp:FormView ID="fvQuestionDetails" runat="server" DataSourceID="odsQuestionDetails" 
            DefaultMode="Edit">
            <EditItemTemplate>
    <table dir="rtl">
        <tr>
            <td>
                <table><tr>
                    <td> QuestionnaireId</td>
                    <td><asp:TextBox ID="txtQuestionnaireId" runat="server" Enabled="false" Text='<%# Bind("QuestionnaireID" ) %>'></asp:TextBox></td>
                </tr></table>
            </td>
            <td>

QuestionnaireID does not get value from grid.


Please Help
Thanks
Alon

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 13 Jul 2010, 10:31 AM
Hi,

Please refer to the following help topic, which provides a code snippet for achieving the required functionality.

All the best,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
shootermv
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or