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

Listbox in RadListView InsertItemTemplate

1 Answer 92 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Alper Ozgur
Top achievements
Rank 1
Alper Ozgur asked on 25 May 2010, 07:38 AM
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;
    }

1 Answer, 1 is accepted

Sort by
0
Alper Ozgur
Top achievements
Rank 1
answered on 27 May 2010, 10:19 AM
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.
Tags
ListBox
Asked by
Alper Ozgur
Top achievements
Rank 1
Answers by
Alper Ozgur
Top achievements
Rank 1
Share this question
or