Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
112 views
Hello,

i've got a problem with a templatecolumn inside a radgrid.
The templatecolumn contains two RadButtons.
The problem is, that in Internetexplorer 10, the buttons of the templatecolumn are displayed outside of the radgrid.

To be more specific:
Scrolling is enabled,
5 rows are within the visible area,
the buttons within the templatecolumn are all rendered at once, so they appear below the radgrid.

I remember that I already stumbled upon something similar.
Last time it was a radbutton that was in the wrong place and then "jumped" back to where it belongs when I hovered over it.

Has anyone come across this issue?
Konstantin Dikov
Telerik team
 answered on 21 May 2014
1 answer
72 views
Hi.
May I know which all browser versions are supported by telerik controls?
Shinu
Top achievements
Rank 2
 answered on 21 May 2014
1 answer
95 views
I think if you delete or paste on a folder-by-folder basis, I would like to bring the size and file name of all that is subordinate to that folder. However, I do not know how. I would appreciate answers.
Vessy
Telerik team
 answered on 21 May 2014
4 answers
323 views
I implement Expand All and Collapse All buttons on my chart via the chart properties ExpandAllNodes and CollapseAllNodes.  That functionality works as expected.

The problem arises when you collapse all nodes then individually start expanding nodes.  The chart has several problems.

1.  It is not centering child nodes on expand.  The first child node gets drawn centered under the parent then the rest of the nodes get drawn to the right.  I would expect the all children nodes to be centered under a parent just like they are when the chart is first rendered.

2.  Same level children nodes overwrite each other.  This is a pretty major bug in my opinion since the nodes just draw right over each other.  

Is there a way to force the chart to redraw when expanding nodes so 1 and 2 are not an issue?

See code below and attachments.  In chart_expanded_3rd_level_first_child.png the node "Peter" has 2 children nodes "Arnold" and "Mike".  When you click the + under node "Peter 1" its children overwrite one of the "Peter" node's children.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
  <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
            <telerik:RadButton ID="btnExpand" runat="server" Text="Expand All" OnClick="btnExpand_Click">
            </telerik:RadButton>
            <telerik:RadButton ID="btnCollapse" runat="server" Text="Collapse All" OnClick="btnCollapse_Click">
            </telerik:RadButton>           
            <br/>
 
          <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel">
               <telerik:RadOrgChart ID="RadOrgChart1" runat="server" EnableCollapsing="true" Skin="Office2010Blue" />
          </telerik:RadAjaxPanel>
  
    </form>
</body>
</html>


protected void Page_Load(object sender, EventArgs e)
{
    var employees = CreateEmployees();
 
    RadOrgChart1.DataFieldID = "EmployeeID";
    RadOrgChart1.DataFieldParentID = "ParentID";
    RadOrgChart1.DataTextField = "Name";
    //RadOrgChart1.DataImageUrlField = "ImageUrl";
    RadOrgChart1.DataSource = employees;
    RadOrgChart1.DataBind();
}
 
private DataTable CreateEmployees()
{
    var employees = new DataTable();
    employees.Columns.Add("EmployeeID");
    employees.Columns.Add("ParentID");
    employees.Columns.Add("Name");
    employees.Columns.Add("ImageUrl");
    employees.Rows.Add(new string[] { "1", null, "Kate", "~/Img/Northwind/Customers/LONEP.jpg" });
    employees.Rows.Add(new string[] { "2", "1", "Peter", "~/Img/Northwind/Customers/SAVEA.jpg" });
    employees.Rows.Add(new string[] { "21", "1", "Peter1", "~/Img/Northwind/Customers/SAVEA.jpg" });
    employees.Rows.Add(new string[] { "22", "1", "Peter2", "~/Img/Northwind/Customers/SAVEA.jpg" });
    employees.Rows.Add(new string[] { "23", "1", "Peter3", "~/Img/Northwind/Customers/SAVEA.jpg" });
    employees.Rows.Add(new string[] { "24", "1", "Peter4", "~/Img/Northwind/Customers/SAVEA.jpg" });
    employees.Rows.Add(new string[] { "25", "1", "Peter5", "~/Img/Northwind/Customers/SAVEA.jpg" });
    employees.Rows.Add(new string[] { "26", "1", "Peter6", "~/Img/Northwind/Customers/SAVEA.jpg" });
    employees.Rows.Add(new string[] { "27", "1", "Peter7", "~/Img/Northwind/Customers/SAVEA.jpg" });
 
    employees.Rows.Add(new string[] { "3", "2", "Arnold", "~/Img/Northwind/Customers/LACOR.jpg" });
 
    employees.Rows.Add(new string[] { "31", "21", "Arnold31", "~/Img/Northwind/Customers/LACOR.jpg" });
    employees.Rows.Add(new string[] { "32", "21", "Arnold32", "~/Img/Northwind/Customers/LACOR.jpg" });
    employees.Rows.Add(new string[] { "41", "22", "Arnold41", "~/Img/Northwind/Customers/LACOR.jpg" });
    employees.Rows.Add(new string[] { "42", "22", "Arnold42", "~/Img/Northwind/Customers/LACOR.jpg" });
    employees.Rows.Add(new string[] { "51", "23", "Arnold51", "~/Img/Northwind/Customers/LACOR.jpg" });
    employees.Rows.Add(new string[] { "52", "23", "Arnold52", "~/Img/Northwind/Customers/LACOR.jpg" });
 
 
    employees.Rows.Add(new string[] { "4", "3", "Tim", "~/Img/Northwind/Customers/GREAL.jpg" });
    employees.Rows.Add(new string[] { "5", "3", "Nora", "~/Img/Northwind/Customers/TRADH.jpg" });
    employees.Rows.Add(new string[] { "6", "4", "David", "~/Img/Northwind/Customers/CENTC.jpg" });
    employees.Rows.Add(new string[] { "7", "2", "Mike", "~/Img/Northwind/Customers/VAFFE.jpg" });
    return employees;
}
 
protected void btnCollapse_Click(object sender, EventArgs e)
{
    RadOrgChart1.CollapseAllNodes();
}
 
protected void btnExpand_Click(object sender, EventArgs e)
{
    RadOrgChart1.ExpandAllNodes();
}


Boyan Dimitrov
Telerik team
 answered on 21 May 2014
4 answers
359 views
Hi All,

I have a RadDateTimePicker control, in which I have defined  <ClientEvents OnDateSelected="DateSelected" />.

function DateSelected(sender, eventArgs)
    {
       var dtp = $find("<%= RadDateTimePicker1.ClientID %>");
       var selDate = dtp.get_selectedDate();
      
    }

selDate shows the result as :  Fri May 16 2014 00:00:00 GMT+0530 (India Standard Time)

My Issue is:   After selecting date from calendar, whatever time I select from the TimePicker,  It always shows 5:30 hours ahead of the selected time.
for eg.  Suppose I select 2:00 PM, then It will show 7:30 PM as the selected time.


Please suggest some wayout.

Thanks a lot.
Vincy
Top achievements
Rank 1
 answered on 21 May 2014
9 answers
415 views
Hi guys,

 How can I generate a jpg image file from barcode?

Thanks
Joseph
Princy
Top achievements
Rank 2
 answered on 21 May 2014
3 answers
313 views
I have a multiline radtextbox with maxlength property in which i want copy paste functionality to work ,when i copy some data and paste in radtextbox its showing javascript error in IE,when i remove maxlength its allowing me to copy paste,but i want maxlength property also.



Please Suggest



Thanks.
Shinu
Top achievements
Rank 2
 answered on 21 May 2014
4 answers
346 views
I'm persisting the GroupBy expressions for a grid. The grouping is set by the end-user.

I have a problem in that I have a column like this...
<telerik:GridTemplateColumn HeaderText="Template"
                                  SortExpression="Name"
                                  ShowSortIcon="true"
                                  Groupable="true"
                                  DataField="Name"
                                  UniqueName="Name">

Now, when I save the GroupBy expression, I save the value returned by the GroupByExpression's .Expression property.

When I try adding that that as a new GroupByExpression when the user revisits the page, the GroupBy header displays "Name" rather than the column's defined HeadterText of "Template".

Now, I did try serializing the whole of the GroupByExpression, but when I tried deserializing it to recreate the object, it complained that Only Field object can be in the Frieds collection, or something like that.

So, to the question. How can I serialize the GroupByExpression so that I can recreate the grouping with a) the correct field and b) the correct header text for the item in the GroupBy area of the grid?

--
Stuart
Pavlina
Telerik team
 answered on 21 May 2014
2 answers
175 views
Hi, i have a RadGrid with the following columns:

            <Columns>
                <telerik:GridBoundColumn DataField="IDII" HeaderText="IDII" Display="False"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="IDGrupo" HeaderText="IDGrupo" Display="False"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Grupo" HeaderText="Grupo" Display="False"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="IDGrupoPai" HeaderText="IDGrupoPai" Display="False"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="IDIndicador" HeaderText="ID Indicador" Display="False" HeaderStyle-Width="75%"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Indicador" HeaderText="Indicador" ReadOnly="True"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TipoValor" HeaderText="TipoValor" Display="False" UniqueName="TipoValor"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="Valor" HeaderText="Valor" UniqueName="Valor" HeaderStyle-Width="25%">
                    <ItemTemplate>
                        <asp:Label ID="lbValor" runat="server" Text='<%# Bind("Valor")%>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadDropDownList ID="boolValor" runat="server" >
                            <Items>
                                <telerik:DropDownListItem Text="Sim" Value="1" />
                                <telerik:DropDownListItem Text="Não" Value="0" Selected="True" />
                                <telerik:DropDownListItem Text="n/a" Value=""/>
                            </Items>
                        </telerik:RadDropDownList>
                        <telerik:RadTextBox ID="strValor" runat="server" ></telerik:RadTextBox>
                        <telerik:RadNumericTextBox ID="intValor" runat="server" NumberFormat-DecimalDigits="0" ></telerik:RadNumericTextBox>
                        <telerik:RadNumericTextBox ID="floatValor" runat="server" NumberFormat-DecimalDigits="2" ></telerik:RadNumericTextBox>
                        <telerik:RadDatePicker ID="dateValor" runat="server"></telerik:RadDatePicker>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>

I use the Batch Edit Mode and in function SetEditorValue() I hide all the controls first and show only a specific one, but the RadDatePicker does not hide, i have tried everything and does not work. Can you help me please!

   function SetEditorValue(sender, args) {
       if (args.get_columnUniqueName() === "Valor") {
           args.set_cancel(true);
           //Obtem o conteúdo pretendido
           var container = args.get_container(), editarValor = args.get_value();
           //Esconde todos os controladores existentes na celula
           var rddlValor = $telerik.findControl(container, "boolValor");
           rddlValor.set_visible(false);
           var rtbValor = $telerik.findControl(container, "strValor");
           rtbValor.set_visible(false);
           var rnitbValor = $telerik.findControl(container, "intValor");
           rnitbValor.set_visible(false);
           var rnftbValor = $telerik.findControl(container, "floatValor");
           rnftbValor.set_visible(false);
           var rdpValor = $telerik.findControl(container, "dateValor");
           rdpValor.set_visible(false);
           //Obtem o ID do TipoValor
           var celulaTipoValor = sender.get_masterTableView()._getCellByColumnUniqueNameFromTableRowElement(args.get_row(), "TipoValor");
           var IDTipoValor = sender.get_batchEditingManager().getCellValue(celulaTipoValor);
           //Passa o valor para o respetivo controlador
           switch (IDTipoValor) {
               case "1":
                   rddlValor.set_visible(true);
                   if (editarValor === "Sim")
                       rddlValor.findItemByValue("1").select();
                   break;
               case "2":
                   rtbValor.set_visible(true);
                   rtbValor.set_value(editarValor);
                   rtbValor.focus();
                   break;
               case "3":
                   rnitbValor.set_visible(true);
                   rnitbValor.set_value(editarValor);
                   rnitbValor.focus();
                   break;
               case "4":
                   rnftbValor.set_visible(true);
                   floatValor = (editarValor !== null) ? editarValor.toString().replace(".", ",") : "";
                   rnftbValor.set_value(floatValor);
                   rnftbValor.focus();
                   break;
               case "5":
                   rdpValor.set_visible(true);
                   dataValor = (editarValor !== null) ? new Date(editarValor.replace(/(\d{2})-(\d{2})-(\d{4})/, "$2/$1/$3")) : "";
                   rdpValor.set_selectedDate(dataValor);
                   rdpValor.get_dateInput().focus();
                   break;
               default:
                   break;
           }
       }
   }

Best regards,
João

João
Top achievements
Rank 1
 answered on 21 May 2014
3 answers
77 views
Is it possible to do something in an Item data bound event server side with a light Box?
If so can you please show me how?

Eyup
Telerik team
 answered on 21 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?