I ve the following code for displaying multi column combobox.
1) I want the table to get automatically resize instead of me setting the width. What should I do to make the table automatically resizable?
2) Also if I make the width to get the horizontal scrollbar appear, it just moves the data in the table and not the header. What should I do to have the header move?
<telerik:RadComboBox ID="rcbCategory" Runat="server" DataSourceID="dsCategories" DataTextField="Description" DataValueField="Code" AppendDataBoundItems="true" EmptyMessage="Select category..."Width="200px" DropDownWidth="500px" EnableVirtualScrolling="true" HighlightTemplatedItems="true" MarkFirstMatch="true">
<HeaderTemplate>
<table style="width: 480px" cellspacing="0" cellpadding="0">
<tr>
<th style="width: 100px;">Code</th>
<th style="width: 100px;">Description</th>
<th style="width: 100px;">Division</th>
<th style="width: 180px;">Department</th>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 480px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 100px;"> <%#DataBinder.Eval(Container.DataItem, "Code")%></td>
<td style="width: 100px;"> <%#DataBinder.Eval(Container.DataItem, "Description")%> </td>
<td style="width: 100px;"> <%#DataBinder.Eval(Container.DataItem, "Division")%> </td>
<td style="width: 180px;"> <%#DataBinder.Eval(Container.DataItem, "Dept")%> </td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
1) I want the table to get automatically resize instead of me setting the width. What should I do to make the table automatically resizable?
2) Also if I make the width to get the horizontal scrollbar appear, it just moves the data in the table and not the header. What should I do to have the header move?
<telerik:RadComboBox ID="rcbCategory" Runat="server" DataSourceID="dsCategories" DataTextField="Description" DataValueField="Code" AppendDataBoundItems="true" EmptyMessage="Select category..."Width="200px" DropDownWidth="500px" EnableVirtualScrolling="true" HighlightTemplatedItems="true" MarkFirstMatch="true">
<HeaderTemplate>
<table style="width: 480px" cellspacing="0" cellpadding="0">
<tr>
<th style="width: 100px;">Code</th>
<th style="width: 100px;">Description</th>
<th style="width: 100px;">Division</th>
<th style="width: 180px;">Department</th>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 480px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 100px;"> <%#DataBinder.Eval(Container.DataItem, "Code")%></td>
<td style="width: 100px;"> <%#DataBinder.Eval(Container.DataItem, "Description")%> </td>
<td style="width: 100px;"> <%#DataBinder.Eval(Container.DataItem, "Division")%> </td>
<td style="width: 180px;"> <%#DataBinder.Eval(Container.DataItem, "Dept")%> </td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>