Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
158 views

Hi, I have an autocompletebox with an EmptyMessage set.
The problem is that the empty message barely shows.
Basically I only see A few pixel width of the first letter of the EmptyMessage.
It's like something is squishing it to the left.

<telerik:RadAutoCompleteBox
    ID="RdtCmpltBx_1"
    runat="server"
    Width="160px"
    DropDownWidth="150px"
    EmptyMessage="Enter name (ex: Alpha)"
    WebServiceSettings-Method="GetSingleName"
    WebServiceSettings-Path="Main.aspx"
    OnClientTextChanged="NameChanged"
    Filter="StartsWith"
    DropDownPosition="Automatic"
    AllowCustomEntry="true"
    InputType="Text"
    TextSettings-SelectionMode="Single" />

I looked at the sample at https://demos.telerik.com/aspnet-ajax/autocompletebox/examples/default/defaultcs.aspx

and I do not see anything different.

Plamen
Telerik team
 answered on 01 Jun 2015
1 answer
222 views

I have a RadGrid that I'm trying to export to Excel. In the RadGrid, it contains a GridTemplateColumn with nested repeaters, labels and spans.  I'm trying to use ExcelML for the export, but am open to using another format if necessary. My telerik version is 2014.1.225.45.

In the ExcelMLExportRowCreated method, I'm trying to find the first repeater control and then traverse down to the labels, the second repeater and it's subsequent labels and span and concatenate the data into a string. I seem to be finding the repeater controls, but each label I find returns the text value as an empty string. I can't seem to find the actual text that shows up in the grid. 

I've read a variety of forum threads trying to figure this out. Can someone suggest how I can get the values out of these controls?

Here is my GridItemTemplate Column and the code behind for the export.

Any help would be appreciated. 

Thank you

<telerik:GridTemplateColumn UniqueName="boards" DataField="boards"  HeaderText="Groups/Committees" ItemStyle-CssClass="system-users-committee-list">
<ItemTemplate>
<%-- Start List of Boards then nest committees under board list item --%>
<ul class="board-memberships unstyled">
<asp:Repeater ID="rptBoards" runat="server" DataSource ='<%# Eval("boards") %>'>
    <ItemTemplate>
        <li class="multi-member-board">
        <li  class="board-name">
                <asp:Label ID="lblBoardName" runat="server"><%# Eval("boardName") + ":" %></asp:Label>
                                                                 
                <ul class="committees unstyled inline">
                    <asp:Repeater ID="rptGroups" runat="server" DataSource ='<%# Eval("groups") %>'  OnItemDataBound="rptrCommittee_ItemDataBound">
                        <ItemTemplate>                                         
                            <li>
                                <asp:Label ID="lblCommitteeList" runat="server"><%# Eval("groupName") %></asp:Label>
                                                                                 
                                <!-- if role -->
                                <span id="roleName" class="role" runat="server" visible="false">(<%# Eval("role.roleName") %>)</span>
                                                                                 
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>
                </ul>
                                                             
        </li>
        </li>
    </ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</telerik:GridTemplateColumn>

 

protected void btnExportExcel_Click(object sender, EventArgs e)
{
  radGridSysDir.ExportSettings.ExportOnlyData = True
  radGridSysDir.ExportSettings.IgnorePaging = true;
  radGridSysDir.ExportSettings.FileName = string.Format("SystemDirectoryExportExcel_{0}", DateTime.Today);
  radGridSysDir.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
  isExport = true;
  radGridSysDir.MasterTableView.ExportToExcel();
}

protected void radGridSysDir_ExcelMLExportRowCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowCreatedArgs e)
        {
            if (e.RowType == GridExportExcelMLRowType.HeaderRow)
            {
                radGridSysDir.Rebind();
                e.Worksheet.Table.Columns.Add(new ColumnElement());
                CellElement cell = new CellElement();
 
                cell.ColumnName = "MemberName";
                cell.Data.DataItem = "Member Name";
                e.Row.Cells.Add(cell);
 
                e.Worksheet.Table.Columns.Add(new ColumnElement());
                CellElement cell2 = new CellElement();
                cell2.ColumnName = "BoardName";
                cell2.Data.DataItem = "Board Name";
                e.Row.Cells.Add(cell2);
 
 
            }
            if (e.RowType == GridExportExcelMLRowType.DataRow)
            {
                CellElement cell = new CellElement();
                 
                int currentRow = e.Worksheet.Table.Rows.IndexOf(e.Row) - 1;
                // cell = e.Row.Cells.GetCellByName("TemplateColumn");
                cell.Data.DataItem = (radGridSysDir.MasterTableView.Items[currentRow].FindControl("lblName") as Label).Text;
                e.Row.Cells.Add(cell);
 
                GridDataItem item = radGridSysDir.MasterTableView.Items[currentRow];
                StringBuilder newString = new StringBuilder();
                CellElement cell2 = new CellElement();
                Repeater rptBoards = (Repeater)item.FindControl("rptBoards");
                foreach (RepeaterItem rItem in rptBoards.Items)
                {
                    if (rItem.ItemType == ListItemType.Item || rItem.ItemType == ListItemType.AlternatingItem)
                    {
                        Label lblBname = (Label)rItem.Controls[1].FindControl("lblBoardName");
                        Repeater rptGroups = (Repeater)rItem.FindControl("rptGroups");
                        newString.Append(lblBname.Text);
                        foreach (RepeaterItem gItem in rptGroups.Items)
                        {
                            if (gItem.ItemType == ListItemType.Item || gItem.ItemType == ListItemType.AlternatingItem)
                            {
                                Label lblGrp = (Label)gItem.Controls[0].FindControl("lblCommitteeList");
                                if (lblGrp != null)
                                {
                                    HtmlGenericControl spanRole = (HtmlGenericControl)gItem.Controls[1].FindControl("roleName");
                                    if (spanRole != null)
                                    {
                                        newString.Append(lblGrp.Text);
                                        newString.Append(spanRole.ToString());
                                    }
                                }
                            }
                        }
                    }
                }
                cell2.Data.DataItem = newString.ToString();
                e.Row.Cells.Add(cell2);
            }
        }


Kostadin
Telerik team
 answered on 01 Jun 2015
1 answer
45 views

Hello,

We are developing a website with radpagelayout,
we have problems with rendering between IIS 8.1 in Windows local and remote which is windows 2008 r2.

We wonder if the dll telerik not a problem rendering different between the two IIS.

Localhost

http://www.noelshack.com/2015-22-1432721635-local.jpg

Remote

http://www.noelshack.com/2015-22-1432721634-distant.jpg

 

Thank you for your help.

Nencho
Telerik team
 answered on 01 Jun 2015
11 answers
345 views
Hi all!
I am new into Telerik and I think I need a boost here to see íf I can use RadGrid for my project:

Now to what I have done:
I need to set a datasource for my grid wich I today do like :
DataGrid1.DataSource = GetTheTable()
DataGrid1.DataBind()

No problem so far and items seen in grid.

Now ... I want to implement Filtering for my Colums in the bound table. I have read that this can't be done when using simple databinding. Correct?

Do I have to first specify my columns and then bind my datasource?

Now ... how to do this manually by code? Anyone can give me an example?

//h
Kostadin
Telerik team
 answered on 01 Jun 2015
5 answers
179 views
Hello,

The Task planner on window, work bad, it' ll be great if a service telerik , get a Automating task , to check or reproduce task (function .net)
all the days or cycling time.

thanks
Olivier,
Olivier
Top achievements
Rank 2
 answered on 31 May 2015
3 answers
272 views
Hi,
  We are using telerik:RadDatePicker for date field, we have a page with multiple input controls and with tab index set to those controls.
When go to RadDatePicker field and after selecting date (using Calendar control), we loose the focus.
Then if we press "tab key", focus move to control with tab index=1, instead of next control.

Refer  attached screenshot, with tab index order (marked inside red color circle).


Abdul Moiz
Top achievements
Rank 1
 answered on 30 May 2015
6 answers
186 views
I have multiple charts down the page and I have been trying to figure out ways to get them to align.
when the text of the legend is smaller and greater it auto resizes the chart plot area to different widths.
my latest fix I use monospace font and put a fixed number of characters into the legend.
the whitespace at the right side of legend crops so I had inserted html spaces & nbsp;
issues with this
1) font is different from rest of page and not best font for design
2) the right axis of my charts may have different numbers which may effect the width also and slightly show charts not aligned
3) the export image shows html & nbsp; as text instead of white space.

so to fix the nonbreaking space showing in the export I instead use spaces and add a period at the end.
issues with this method
1) looks stupid with a period out in right field

is there any way to
1) add a title to the legend to make it fixed width such as a number of _
2) set the width of the plot area
3) fix the export of image / pdf to not show non-breaking spaces
Vessy
Telerik team
 answered on 29 May 2015
6 answers
355 views
Hi,

I was wondering what the reason was behind the .t-container-fluid .t-col styles having a padding of 15px?  Also, what is the best way to override the style in order to achieve no padding.

Thanks!
Henry
Top achievements
Rank 1
 answered on 29 May 2015
1 answer
179 views

When setting the selected items using SelectedValue the display text is not being updated. If I expand the dropdown I see the checkboxes selected but the displayed text is empty.

If I select a node it will update the displayed text but until then it is empty. Am i missing something?

Version 2015.1.401.40

<telerik:RadDropDownTree 
    runat="server" 
    ID="rddtTo" 
    CheckBoxes="SingleCheck" 
    Width="732px"
    DefaultMessage="Please select" 
    DataFieldID="ID" 
    DataFieldParentID="ParentID"
    DataValueField="ID" 
    DataTextField="NodeName"
    OnDataBound="rddtTo_DataBound">
</telerik:RadDropDownTree>  

Protected Sub rddtTo_DataBound(sender As Object, e As System.EventArgs)
   DirectCast(sender, Telerik.Web.UI.RadDropDownTree).ExpandAllDropDownNodes()
   rddtTo.SelectedValue = hdnSelectedValues.Value
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
   If Not Page.IsPostBack Then
      Using p_Db As New mlDB("Messages_Template_List", -1)
         p_Db.SQL = "Messages_Groups_Select"
         rddtTo.DataSource = p_Db.GetDataTable
         rddtTo.DataBind()
      End Using
   End If
End Sub

 

 

Ivan Danchev
Telerik team
 answered on 29 May 2015
1 answer
159 views

Hi,

Does Radgrid provide a way to search for an specific an specific text without filter the content on the gridview? The gridview has paging and its inside an modalpopupextender.

 

Thanks,

Ed

Konstantin Dikov
Telerik team
 answered on 29 May 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?