Listbox in RadListView InsertItemTemplate

2 posts, 0 answers
  1. Alper Ozgur
    Alper Ozgur avatar
    8 posts
    Member since:
    Mar 2010

    Posted 25 May 2010 Link to this post

    Hi;
    When i put a listbox in to insertitemtemplate of listview the listbox doesn't render correctly. What i must check?
    Here is the code :
    ASPX Page:
                <telerik:RadListView ID="lViewOzur" runat="server" OnItemCommand="lViewOzur_ItemCommand"
                    DataKeyNames="KAYITNO" OnItemDataBound="lViewOzur_ItemDataBound" OnItemCreated="lViewOzur_ItemCreated"
                    ItemPlaceholderID="OzurContainer" OnNeedDataSource="lViewOzur_NeedDataSource">
                    <InsertItemTemplate>
                        <table>
                            <tr>
                                <td><asp:Label ID="lblHastane" runat="server" AssociatedControlID="txtHastane" Text="Hastane Adı"></asp:Label></td>
                                <td colspan="4">
                                    <telerik:RadTextBox ID="txtHastane" runat="server" EmptyMessage="Lütfen Özürlülük Belgesini Aldığınız Hastane Adını Giriniz"
                                        Width="400px" />
                                </td></tr>
                            <tr><td><asp:Label ID="lblRapor" runat="server" AssociatedControlID="dtRapor" Text="Rapor Tarihi"></asp:Label></td>
                                <td style="width: 200px">
                                    <telerik:RadDatePicker ID="dtRapor" runat="server"></telerik:RadDatePicker></td>
                                <td><asp:Label ID="lblGrubu" runat="server" AssociatedControlID="cmbGrubu" Text="Özür Grubu"></asp:Label></td>
                                <td><telerik:RadComboBox ID="cmbGrubu" runat="server" EmptyMessage="Özür Grubunuzu Seçiniz">
                                    </telerik:RadComboBox>
                                </td></tr>
                            <tr><td><asp:Label ID="lblRaporNo" runat="server" Text="Rapor No" AssociatedControlID="txtRaporNo"></asp:Label></td>
                                <td>
                                    <telerik:RadTextBox ID="txtRaporNo" runat="server" EmptyMessage="Rapor Numaranızı Giriniz"
                                        Width="150px">
                                    </telerik:RadTextBox>
                                </td>
                                <td><asp:Label ID="lblOran" runat="server" Text="Özür Oranı" AssociatedControlID="txtOran"></asp:Label></td>
                                <td>
                                    <telerik:RadNumericTextBox ID="txtOran" runat="server" DataType="System.Decimal"
                                        MaxValue="100" MinValue="0" Type="Percent" Width="60px">
                                        <NumberFormat KeepNotRoundedValue="True" />
                                    </telerik:RadNumericTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3"><asp:CheckBox ID="chkGecici" runat="server" Text="Geçici Özür" /></td>
                                <td><asp:Label ID="lblGecici" runat="server" AssociatedControlID="dtGecici" Text="Özürlülük Bitiş Tarihi"></asp:Label></td>
                                <td><telerik:RadDatePicker ID="dtGecici" runat="server">
                                    </telerik:RadDatePicker></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblKisit" runat="server" Text="Çalışma Kısıtı"></asp:Label>
                                </td>
                                <td>
                                    <telerik:RadListBox ID="lstKisitDB" runat="server" AllowTransfer="true" AllowTransferOnDoubleClick="true"
                                        EnableDragAndDrop="true" TransferMode="Move" TransferToID="lstKisit" Width="300px"
                                        Height="100px" ButtonSettings-ShowTransfer="true" ButtonSettings-TransferButtons="All"
                                        Skin="WebBlue">
                                    </telerik:RadListBox>
                                    <telerik:RadListBox ID="lstKisit" runat="server" Width="300px" Height="100px">
                                    </telerik:RadListBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <telerik:RadToolBar ID="tbOzurInsert" runat="server" Orientation="horizontal" Height="15px"
                                        OnButtonClick="tbOzurInsert_ButtonClick">
                                        <Items>
                                            <telerik:RadToolBarButton Text="Kaydet" Value="PerformInsert" Height="15px">
                                            </telerik:RadToolBarButton>
                                            <telerik:RadToolBarButton Text="Vazgeç" Value="Delete" Height="15px">
                                            </telerik:RadToolBarButton>
                                        </Items>
                                    </telerik:RadToolBar>
                                </td>
                            </tr>
                        </table>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td style="width: 150px">
                                    <asp:Label ID="lblEgitim" runat="server"></asp:Label>
                                </td>
                                <td>
                                    <telerik:RadToolBar ID="tbOzurEdit" runat="server" Orientation="horizontal" Height="15px">
                                        <Items>
                                            <telerik:RadToolBarButton Text="Sil" CommandName="Delete" Height="15px">
                                            </telerik:RadToolBarButton>
                                        </Items>
                                    </telerik:RadToolBar>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </telerik:RadListView>



    CS code :

        protected void Page_Load(object sender, EventArgs e)
        {
        }
        protected void lViewOzur_ItemCommand(object sender, RadListViewCommandEventArgs e)
        {
        }
        protected void lViewOzur_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e)
        {
        }
        protected void lViewOzur_ItemCreated(object sender, RadListViewItemEventArgs e)
        {
            RadListBox lst = (RadListBox)e.Item.FindControl("lstKisitDB");
            RadComboBox cmb = (RadComboBox)e.Item.FindControl("cmbGrubu");
            if (cmb != null)
            {
                fillOzurGrupList(cmb);
            }
            if (lst != null)
                fillOzurKisitList(lst);
        }
        protected void lViewOzur_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
        {
            RadProfile rp = new RadProfile();
            if (vwProfilData == null)
                vwProfilData = rp.ReadProfil(vwProfilData);
            lViewOzur.DataSource = vwProfilData.OzurBilgiBE;
        }
  2. Alper Ozgur
    Alper Ozgur avatar
    8 posts
    Member since:
    Mar 2010

    Posted 27 May 2010 Link to this post

    The problem occurs for the reason of Internet Explorer CSS limits.
    About the problem and solve methods
    http://blogs.telerik.com/kamenbundev/posts/10-05-03/internet_explorer_css_limits.aspx

    Thanks to Genady Sergeev from the Telerik Team.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top