<telerik:GridTemplateColumn HeaderText="Bal. Acc. Type" UniqueName="BalanceAccount" HeaderStyle-Width="150" > <ItemTemplate> <%# Guid.Parse(Eval("BalanceAccountTypeId").ToString()) != null? ERPHR.BusinessObjects.FinBalanceAccountTypeRepository.GetNameByLanguage(Guid.Parse(Eval("BalanceAccountTypeId").ToString()), PageLanguage):"" %> </ItemTemplate> <EditItemTemplate> <telerik:RadComboBox runat="server" ID="ddlBalanceAccountType" DataSourceID="edsBalanceAccounts" Width="140" AutoPostBack="true" DataValueField="Id" DataTextField='<%# PageLanguage == ERPHR.AppUtilities.Enums.LanguageEnum.Arabic? "NameArabic": "NameEnglish" %>'> </telerik:RadComboBox> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn UniqueName="BalanceAccountNumber" HeaderText="Bal. Acc. No" SortExpression="AccountNumber" ItemStyle-Width="150px"> <FooterTemplate>Template footer</FooterTemplate> <FooterStyle VerticalAlign="Middle" HorizontalAlign="Center" /> <ItemTemplate> <%# Guid.Parse(Eval("BalanceAccountId").ToString()) != null? ERPHR.BusinessObjects.FinAccountRepository.GetAccountById(Guid.Parse(Eval("BalanceAccountId").ToString())).AccountNumber:"" %> </ItemTemplate> <EditItemTemplate> <telerik:RadComboBox runat="server" ID="rcbBalanceAccountNumber" EnableLoadOnDemand="True" DataTextField="AccountNumber" DataValueField="Id" AutoPostBack="true" HighlightTemplatedItems="true" Height="140px" Width="140" DropDownWidth="420px" OnItemsRequested="rcbBalanceAccountNumber_ItemsRequested"> <HeaderTemplate> <ul> <li class="col1">Account No</li> <li class="col2">Account Name</li> </ul> </HeaderTemplate> <ItemTemplate> <ul> <li class="col1"> <%# DataBinder.Eval(Container, "Text")%> </li> <li class="col2"> <%# DataBinder.Eval(Container, "Attributes['AccountName']")%> </li> </ul> </ItemTemplate> </telerik:RadComboBox> </EditItemTemplate> </telerik:GridTemplateColumn>protected void rcbBalanceAccountNumber_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { RadComboBox comboBox = sender as RadComboBox; RadComboBox rcbBalance = (RadComboBox)AccountPostingGrid.MasterTableView.GetInsertItem().FindControl("ddlBalanceAccountType"); List<FinAccount> ListAccounts = BusinessObjects.FinAccountRepository.GetAccountByAccountNo(e.Text, Guid.Parse(rcbBalance.SelectedItem.Value)); // Clear the default Item that has been re-created from ViewState at this point. comboBox.Items.Clear(); foreach (FinAccount Account in ListAccounts) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = Account.AccountNumber; item.Value = Account.Id.ToString(); item.Attributes.Add("AccountName", PageLanguage == LanguageEnum.Arabic ? Account.NameArabic : Account.NameEnglish); comboBox.Items.Add(item); item.DataBind(); } }Hi there,
I have a databound (scrolling disabled) tilegrid and am trying to set the width of the grid through code-behind. Setting RadTileList.width works, but there is a "div class='rtlistWrapper'" that appears to default to a value much lower than the width I'm setting. This causes the grid to render as a 'narrow column', rather than taking up the whole defined width. I'm assuming this is some computed value (developer tools show the value coming from Telerik.Webresource.axd), so the question is, how can I access this value from code behind?
I guess I could override the css class client-side with js, but that seems kind of messy ...
Short explanation, just to show what I'm trying to achieve: I'm creating a (reusable) user control, where the user can set the grid width, tile width and row number to make the grid fit into different page layouts - makes sense?
Thx in advance for help and/or pointers!
M.