Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
82 views
I am using a radEditor and it does work as intended.  But I would like to change the size of the content box.  Seems like this would be a property but I don't see it.  Can anyone help?
Bob
Top achievements
Rank 1
 asked on 13 Oct 2017
0 answers
86 views

Hii Admin,

My Telerik Basic(RadTextbox, RadComboBox) Works properly in All Browser except Safari Mobile Browser(Iphone, Ipad), So What should i Do.

Please Suggest Solution ..

My Telerik Version 2013.1.417.35

Thanks in advance.

Brijkumar
Top achievements
Rank 1
 asked on 13 Oct 2017
0 answers
143 views

Hi,

Buttons associated with the listbox are disabled. Attached a screen shot. Am i missing any setting here?

<telerik:RadListBox runat="server" ID="rlbItemSource" AllowTransfer="true"  AllowTransferOnDoubleClick="true"
           TransferToID="rlbItemTarget" height="150px" Width="200px" TransferMode="Move" SelectionMode="Multiple"  >
    <ButtonSettings ShowTransferAll="true" ShowTransfer="true" ShowReorder="false" />
</telerik:RadListBox>
 
<telerik:RadListBox runat="server" ID="rlbItemTarget" height="150px" Width="200px"  
 TransferToID="rlbItemSource" >
<ButtonSettings ShowReorder="false"   /> 
</telerik:RadListBox>

 

Thanks in Advance

Jagat
Top achievements
Rank 1
 asked on 12 Oct 2017
0 answers
159 views

So, I was implementing this:

https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/how-to/Filtering/filter-by-listtextfield-for-griddropdowncolumn

But then as I was implementing it, I realized that this was overly complicating the issue.

It has you add a hidden gridboundcolumn and then pass the values between the hidden column and the drop down in events and re-fire the filter.

Instead, you can just add the extra gridboundcolumn, but do not hide it - let it be the display column in the grid.  But set readonly=true so it does not display in the edit form.

Then simply set display=false for your griddropdowncolumn.   It will not display in the grid, but will still show in the edit/insert forms.

This removes the need for any event wiring between the two controls.  It simply "works".

It also lets the filter control display the correct types of filters (IE text filters options vs. numeric filter options) without further hacking.

Simpler is better right?

Dave
Top achievements
Rank 2
 asked on 12 Oct 2017
0 answers
92 views
protected override void OnInit(EventArgs e)
        {          
            rcbCustomer.HeaderTemplate = new HeaderTemplate();
            rcbCustomer.ItemTemplate = new HeaderItemTemplate();           
            base.OnInit(e);
        }
 
 public class HeaderTemplate : ITemplate
    {
 
        public void InstantiateIn(Control container)
        {
 
            HtmlTable table = new HtmlTable();
 
            HtmlTableRow row = new HtmlTableRow();
 
            HtmlTableCell cell = new HtmlTableCell();
 
            cell.InnerText = "客户编号";
            cell.Width = Unit.Pixel(100).ToString();
            row.Controls.Add(cell);
 
            HtmlTableCell cell1 = new HtmlTableCell();
 
            cell1.InnerText = "客户名称";
            cell1.Width = Unit.Pixel(160).ToString();
            row.Controls.Add(cell1);
 
            HtmlTableCell cell2 = new HtmlTableCell();
 
            cell2.InnerText = "主联系人";
            cell2.Width = Unit.Pixel(100).ToString();
            row.Controls.Add(cell2);
 
            HtmlTableCell cell3 = new HtmlTableCell();
 
            cell3.InnerText = "类型";
            cell3.Width = Unit.Pixel(100).ToString();
            row.Controls.Add(cell3);
 
            HtmlTableCell cell4 = new HtmlTableCell();
 
            cell4.InnerText = "商务人员";
            cell3.Width = Unit.Pixel(90).ToString();
            row.Controls.Add(cell4);
 
            table.Controls.Add(row);
 
            container.Controls.Add(table);
 
 
        }
 
    }
 
public class HeaderTemplate : ITemplate
    {
 
        public void InstantiateIn(Control container)
        {
 
            HtmlTable table = new HtmlTable();
 
            HtmlTableRow row = new HtmlTableRow();
 
            HtmlTableCell cell = new HtmlTableCell();
 
            cell.InnerText = "客户编号";
            cell.Width = Unit.Pixel(100).ToString();
            row.Controls.Add(cell);
 
            HtmlTableCell cell1 = new HtmlTableCell();
 
            cell1.InnerText = "客户名称";
            cell1.Width = Unit.Pixel(160).ToString();
            row.Controls.Add(cell1);
 
            HtmlTableCell cell2 = new HtmlTableCell();
 
            cell2.InnerText = "主联系人";
            cell2.Width = Unit.Pixel(100).ToString();
            row.Controls.Add(cell2);
 
            HtmlTableCell cell3 = new HtmlTableCell();
 
            cell3.InnerText = "类型";
            cell3.Width = Unit.Pixel(100).ToString();
            row.Controls.Add(cell3);
 
            HtmlTableCell cell4 = new HtmlTableCell();
 
            cell4.InnerText = "商务人员";
            cell3.Width = Unit.Pixel(90).ToString();
            row.Controls.Add(cell4);
 
            table.Controls.Add(row);
 
            container.Controls.Add(table);
 
 
        }
 
    }
 
 
<telerik:RadComboBox ID="rcbCustomer" runat="server" Width="100%" AllowCustomText="true"
                            Text="" OnClientItemsRequesting="ClientCustomerItemRequesting" HighlightTemplatedItems="true"
                            DropDownWidth="550px" ExpandAnimation-Duration="100" CollapseAnimation-Duration="100"
                            OnClientSelectedIndexChanged="OnClientSelectedIndexChangedCustomer" EnableLoadOnDemand="true"
                            AutoPostBack="true" OnItemsRequested="rcbCustomer_ItemsRequested" Height="200px">
                            <HeaderTemplate>
                                <ul class="Item">
                                    <li class="col2">客户名称</li>
                                    <li class="col3">主联系人</li>
                                    <li class="col4">客户类型</li>
                                </ul>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <ul class="Item">
                                    <li class="col2">
                                        <%# Healthway.Framework.Utilities.String.StringHelper.InternalHtmlEncode(DataBinder.Eval(Container, "Attributes[\"CusName\"]").ToString())%>
                                    </li>
                                    <li class="col3">
                                        <%# Healthway.Framework.Utilities.String.StringHelper.InternalHtmlEncode(DataBinder.Eval(Container, "Attributes[\"LinkmanName\"]").ToString())%>
                                    </li>
                                    <li class="col4">
                                        <%# Healthway.Framework.Utilities.String.StringHelper.InternalHtmlEncode(DataBinder.Eval(Container, "Attributes[\"CusTypeName\"]").ToString())%>
                                    </li>
                                </ul>
                            </ItemTemplate>
                            <FooterTemplate>
                                <div>
                                    <b>更多请输入助记码查询.</b>
                                </div>
                            </FooterTemplate>
                        </telerik:RadComboBox>
 
    Customer cus = new Customer();
                cus.CusName = "全部";
                cus.CustomerID = -1;
                cus.LinkmanName = string.Empty;
                cus.CusCode = string.Empty;
                cus.CusTypeName = string.Empty;
                cus.SaleManName = string.Empty;
                list.Insert(0, cus);
                foreach (Customer customer in list)
                {
                    RadComboBoxItem item = new RadComboBoxItem();
                    item.Value = customer.CustomerID.ToString();
                    if (isSupplier == 1)
                    {
                        item.Text = customer.CusName;
                    }
                    else
                    {
                        item.Text = customer.LinkmanName;
                    }
                    item.Attributes.Add("CusCode", customer.CusCode);
                    if (isSupplier == 1)
                    {
 
                        item.Attributes.Add("CusName", customer.CusName);
                    }
                    else
                    {
 
                        item.Attributes.Add("CusName", customer.LinkmanName);
                    }
                    item.Attributes.Add("LinkmanName", customer.LinkmanName);
                    item.Attributes.Add("CusTypeName", customer.CusTypeName);
                    item.Attributes.Add("LinkmanMobile", customer.LinkmanMobile);
                    if (customer.SaleManName == null)
                    {
                        item.Attributes.Add("SaleManName", "");
                    }
                    else
                    {
                        item.Attributes.Add("SaleManName", customer.SaleManName);
                    }
                    comboBox.Items.Add(item);
                }
                comboBox.DataBind();
ghd258 ghd258
Top achievements
Rank 1
 asked on 12 Oct 2017
1 answer
269 views

I have selected the 'Show Add New Record Button' in the command item setting options. Can the button be formatted? ie change size, color. Or can the font size of the text be bigger?

Thank you in advance,

Jim

Vessy
Telerik team
 answered on 11 Oct 2017
2 answers
431 views
I am trying to bind a radgrid after a button click event using Javacript ...here the code below ... 


aspx page: on page load this is empty

 

<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" >

 

 

<MasterTableView>

 

 

<Columns>

 

 

 

<

 

telerik:GridTemplateColumn >

 

 

 

 

 

<HeaderStyle CssClass="header" Width="5%" Height="7%" />

 

 

 

 

 

<HeaderTemplate>

 

 

 

 

 

<asp:CheckBox ID="cbSelectAll" runat="server" onClick="checkedAll(this);"></asp:CheckBox>

 

 

 

 

 

</HeaderTemplate>

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

<asp:CheckBox ID="chkBox" AutoPostBack="false" runat="server" ></asp:CheckBox>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<

 

telerik:GridBoundColumn UniqueName="SalesNo" DataField="SalesNo" HeaderText=" Sales Number" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" >

 

 

<HeaderStyle CssClass="header" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

javacript:

//results is data returned from a web service call using ajax

 

function

 

PopulateSalesGrid(results) {

 

 

 

 

 

var rgGrid  = $find("<%= RadGrid1.ClientID %>").get_masterTableView();

 

rgGrid.set_dataSource(results); // here i get error value cannot be null

rgGrid.dataBind();

 

 

}

** I would perfer not to have the grid populated on page load.

I also tried binding the radgrid on page load (code behind) and hiding it before button clicking event .... and showing if after the click event. But the issue here is ... when you cllick on the 'checked All' checkbox it gets all the values from the previous (page load) databind and not the values from the PopulateSalesGrid function.

Any ideas how to fix this?

thanks!!

Anders
Top achievements
Rank 1
 answered on 11 Oct 2017
3 answers
112 views

For some reason my grid exhibits strange behavior. On first sort grid sorts as expected, but on second it just shows busy sign.

My source is following:

On Load:

    Session("grdPorts") = dtAlternatePorts

OnNeedDataSource

    grdPorts.DataSource = Session("grdPorts")

And html:

 <telerik:RadGrid ID="grdPorts" runat="server" style="margin-top:23px; margin-left:10px;margin-right:5px;"
                                        Width="440px" skin="WebBlue"
                                        ShowFooter="false"
                                        AllowSorting="true"
                                        OnNeedDataSource="OnNeedDataSource">      
                                <ClientSettings Scrolling-AllowScroll ="true" Scrolling-ScrollHeight="705px" />                    
                                <MasterTableView GroupLoadMode="Client" AutoGenerateColumns="False" HeaderStyle-Font-Bold="true">
                                    <HeaderStyle BackColor="#6D8DAD" ForeColor="White"/>
                                    <ItemStyle CssClass="InnerItemStyle"/>
                                    <AlternatingItemStyle CssClass="InnerAlernatingItemStyle" BackColor="#E3E1E1"/>                                  

                                    <Columns>

                                    <telerik:GridBoundColumn DataField="WiserPortDesc" HeaderText="Port" HeaderStyle-HorizontalAlign="Center"  
                                                                ItemStyle-Width="280px" ItemStyle-HorizontalAlign="left"/>

                                    <telerik:GridBoundColumn DataField="curval" HeaderText="Value<br/>($M)" HeaderStyle-HorizontalAlign="Center"
                                                             SortExpression="curval"
                                                             ItemStyle-HorizontalAlign="Right"
                                                             ItemStyle-Width="80px" ItemStyle-CssClass="label_SS_8" DataFormatString="{0:N3}"/>                                      

                                    <telerik:GridBoundColumn DataField="Tons" HeaderText="Volume<br/>(ktons)" HeaderStyle-HorizontalAlign="Center"
                                                             SortExpression="Tons" ItemStyle-HorizontalAlign="Right"
                                                             ItemStyle-Width="80px" ItemStyle-CssClass="label_SS_8" DataFormatString="{0:N3}"/>

                                    
                                </Columns>

                                <NoRecordsTemplate>
                                    <div style="padding: 5px">
                                        No records available.
                                    </div>
                                </NoRecordsTemplate>

                            </MasterTableView>

                         </telerik:RadGrid>

Thank you

Vessy
Telerik team
 answered on 11 Oct 2017
3 answers
90 views

Hello,

i have a problem when i initialize a radNavigation server side ; 

i have this radNavigation on my aspx page :

<telerik:RadNavigation ID="rnFacturation" runat="server" Skin="Black" DataFieldID="ID" DataTextField="Text" DataNavigateUrlField="Url" DataFieldParentID="ParentID">
</telerik:RadNavigation>

 

and i fill it server side like this :

siteData.Add(New SiteDataItem(menu.Id, Nothing, menu.Nom, url))
...

siteData.Add(New SiteDataItem(sousMenu.Id, menu.Id, sousMenu.Nom, url))

...

rnFacturation.DataSource = siteData
rnFacturation.DataBind()

 

Under Chrome, the RadNavigation has every Nodes i have inserted into it. In IE, the Nodes are only under the hamburger button and the style is very strange!

 

Any idea of the problem ?

 

thanks in advance for the help.

Fabien
Top achievements
Rank 1
 answered on 11 Oct 2017
4 answers
116 views
I'd like to persist the column display settings for my grid to a database.  I'm using the header context menu to allow the users to show/hide fields, but am having trouble figuring out how to capture which are visible.  I've placed a button at the top of my page for them to click.  When I inspect the columns after post-back, the column display settings are not present.  Is there a way to do this?

Thanks!
DogBizPro
Top achievements
Rank 1
 answered on 11 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?