Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
123 views
Hello,
how to change the names of the fonts in dropdown  in french  language,  without changing the names of their font file (English)

Thanks,
walid2013
Top achievements
Rank 1
 answered on 15 Jul 2014
1 answer
147 views
I am using a RadHtmlChart that calls a javascript method when a series is clicked:

<telerik:RadHtmlChart runat="server" ID="SBarChart1" Transitions="false" EnableTheming="true" CssClass="Chart"
                    OnClientSeriesClicked="OnBarClientSeriesClicked" > ...

The chart is bound to a DataTable.  The first row in the table has the data:

- resultsTbl.Rows[0].ItemArray {object[5]} object[]
[0] "Jan '13" object {string}
[1] "012013" object {string}
[2] 5510.83 object {decimal}
[3] 0 object {decimal}
[4] 0 object {decimal}

As you can see the second item is a STRING with a value of "012013".  The column name for this field is "CategoryID.  Take note of the leading zero in the string!

When a user clicks on a chart series, the Javascript OnClientSeriesClicked method is called and I retrieve the data from the series using the args.get_dataitem() method:

function BarClientSeriesClicked(sender, args) {
    var theDataItem = args.get_dataItem();
    ...

The data I get back in the VAR theDataItem is:
CategoryText   "Jan '13"
CategoryID      12013
Domestic          5510.83
International      0

As you can see the Type of the CategoryID field has changed from STRING to an INTEGER (the value is no longer quoted). A side effect of this TYPE change is that my string value has changed (the leading zero has been removed)! Somewhere after the databind of the chart to the DataTable, and before the Javascript method call occurs, something is reinterpreting my STRING field as an INTEGER and changing the type.  

I want my bound STRING fields to remain as STRING types when I retrieve the data in the Javascript BarClientSeriesClicked method.  A side effect of changing the field type is the leading zero is truncated and my string comparison no longer works (my later code is expecting a string containing a two-digit month and four digit year which is no longer the case).

I believe this is a bug somewhere deep in the RadHtmlChart code.  As you can see I am binding a STRING field to the chart and I have nothing else to do with the data until the chart calls the OnClientSeriesClickedEvent where the data type has magically changed.

I have a work around where I can force a non-numeric character at the start of my string (e.g. prepend the letter 'a' to my original CategoryID value, e.g. 'a012013'). After I get the data value with args.get_dataItem(), my value remains as a STRING type (as you can see the value is now quoted indicating it is a STRING type):

CategoryText   "Jan '13"
CategoryID      "a012013"
Domestic          5510.83
International      0

I can then strip off the leading 'a' character and I have a CategoryID of type STRING that is properly formatted with my leading zero intact.

Even though I have a work around I am bringing this up because it seems to be a bug somewhere in the RadHtmlChart code.

Thanks

Courtney


Danail Vasilev
Telerik team
 answered on 15 Jul 2014
1 answer
74 views
I have two Radcombobox which the first one is binding to a dataTable. when the Item is selected from the first radcombobox according to that the second one Items maybe populated or if not we have to be able to type in it. when I click in the second one to type (for example:5555) the drop down collapses and 5555 is removed and it shows the default text so fast and the user oblige to open it again. I want the Radcombobox doesn't get refresh.
Shinu
Top achievements
Rank 2
 answered on 15 Jul 2014
1 answer
118 views
using a standard radgrid with an editform template when I look at the popup it does have the same look as a radwindow. I'm using the metro skin and would expect flat icons but the close window icon is not. also the window title bar is white but the radwindow title bar is blue. shouldn't they match?
Venelin
Telerik team
 answered on 15 Jul 2014
3 answers
209 views
Hi,
I have a RadGrid which contains Parent Rows and each parent Row has Child Rows(populating Child rows with DetailTableDataBind event).
and i am creating a hyperlink inside the child table
protected void grd_ItemDataBound(object sender, GridItemEventArgs e)
{
  if (e.Item.OwnerTableView.Name == "ChildTable" && e.Item is GridDataItem)
       {
         GridDataItem item = (GridDataItem)e.Item;
         string  szID = item.GetDataKeyValue("ID").ToString();
         string szName = item.GetDataKeyValue("NAME").ToString(); 
 
         HyperLink hLink = (HyperLink)item.FindControl("HyperLink1");
         hLink.Text = szName;
 
         hLink.Attributes.Add("onclick", "return onDocClick('" + item.OwnerTableView.ParentItem.ItemIndex + "', '" + item.ItemIndex + "');");
      }
}

Javascript
 function onDocClick(parentindex, childindex) 
 { 
  // here How do i select/check Corresponding Parent Row and Child Row?
 }
Princy
Top achievements
Rank 2
 answered on 15 Jul 2014
5 answers
162 views
Actually I can horizontally increase all
elements width by putting their width in percentage(%). So that in a
normal wide screen(1366x768) the pages are rich with labels and its associated
text-boxes, drop-downs, calendar controls ,text-areas and popups.

But our major clients have huge Desktop Monitors so that the text-box,
drop-downs normal height is 22px and in that huge screens its is not at
all sufficient.

Also Popup windows width & height too have the same issue. Can't resize relatively.
Need a solution please help ASAP.

Thanks in Advance


Please see the attachment
Vargis
Top achievements
Rank 2
 answered on 15 Jul 2014
5 answers
344 views

I have created Telerik Grid like this and item Bound Function also shown like as follows:

Please tell me if I resized the columns then how will I get the width of column present in RadGrid.Please find that telerik Auto Generated Column is set to true.



"

Namespace="Microsoft.SharePoint.WebControls" %>

<%@ Register Assembly="Telerik.Web.UI, Version=2010.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Table runat="server">

<asp:TableRow>

<asp:TableCell>

<telerik:RadGrid ID="gridForPreNewEdit2" AllowPaging="true" ShowFooter="false" runat="server" AutoGenerateColumns="true" GridLines="Both">

</telerik:RadGrid>

</asp:TableCell>

</asp:TableRow>

</asp:Table>

void grdViewForPreview_ItemDataBound(object sender, GridItemEventArgs e)

{

try

{

 

if (e.Item is GridDataItem)

{

GridDataItem item = e.Item as GridDataItem;

SPWeb web = SPContext.Current.Web;

SPList list = web.Lists[new Guid(ddlSrcList.SelectedValue)];

 

SPListItem itemCol = list.Items.Add();

 

var contex = SPContext.GetContext(this.Context, 0, list.ID, list.ParentWeb);

 

foreach (GridColumn column in item.OwnerTableView.RenderColumns)

{

if (column.HeaderText == "Delete")

{

ImageButton btnDeleteFor = new ImageButton();

btnDeleteFor.ID = column.UniqueName;

btnDeleteFor.Enabled = false;

item[column.HeaderText].Controls.Clear();

item[column.HeaderText].Controls.Add(btnDeleteFor);

}

else

{

foreach (ListItem lstItem in lbDisplayedCols.Items)

{

if (lstItem.Text.ToLower().Trim() == column.HeaderText.ToLower().Trim())

{

SPField listField = list.Fields[column.HeaderText];

 

if (listField.Type != SPFieldType.DateTime && listField.Type != SPFieldType.User)

{

Panel pnlForBFC = new Panel();

pnlForBFC.ID = "Field2_" + listField.InternalName;

BaseFieldControl bfc = listField.FieldRenderingControl;

bfc.ID = "Field_" + listField.InternalName;

 

bfc.ControlMode = SPControlMode.New;

 

bfc.EnableViewState = true;

bfc.RenderContext = contex;

bfc.ItemContext = contex;

bfc.IsValid = true;

bfc.Visible = true;

pnlForBFC.Controls.Add(bfc);

pnlForBFC.Enabled = false;

 

item[column.HeaderText].Controls.Clear();

item[column.HeaderText].Controls.Add(pnlForBFC);

}

else if (listField.Type == SPFieldType.User)

{

 

PeopleEditor peopleEditor = new PeopleEditor();

 

item[column.HeaderText].Controls.Clear();

item[column.HeaderText].Controls.Add(peopleEditor);

}

else if (listField.Type == SPFieldType.DateTime)

{

DateTimeControl dtControl = new DateTimeControl();

dtControl.ID = "Field_" + listField.InternalName;

dtControl.Enabled = false;

item[column.HeaderText].Controls.Clear();

item[column.HeaderText].Controls.Add(dtControl);

}

 

}

}

}

}

}

else if (e.Item is GridFooterItem)

{

GridFooterItem itemForFooter = e.Item as GridFooterItem;

foreach (ListItem chosenListCol in lbDisplayedCols.Items)

{

if (ViewState[chosenListCol.Text] != null)

{

Label lblForFooter = new Label();

lblForFooter.ID = "Field_" + chosenListCol.Text;

lblForFooter.Text = "0";

lblForFooter.Width = Unit.Percentage(100);

lblForFooter.BorderColor = Color.Black;

lblForFooter.BorderStyle = BorderStyle.Solid;

lblForFooter.BorderWidth = 1;

itemForFooter[chosenListCol.Text].Controls.Clear();

itemForFooter[chosenListCol.Text].Controls.Add(lblForFooter);

}

}

}


Pavlina
Telerik team
 answered on 15 Jul 2014
1 answer
91 views
hello telerik,

I have radgrid with number of columns. there is an option to not display all the column on page load. In case of setting display=none to part of them, the grouping operation misses up the column's width. This is not happening if all the columns are displaying and it's happening only in ie10.
 the optional columns are: UserNameColumn,OUNameColumn, PendingUserApprovalColumn, SelectionColumn, MenuColumn

this this the Grid: 
<bks:BksGrid  runat="server" ID="gridUsersCertifications" AutoGenerateColumns="false" OnItemCreated="gridUsersCertifications_OnItemCreated" OnItemDataBound="gridUsersCertifications_OnItemDataBound" OnPreRender="gridUsersCertifications_PreRender" ShowGroupPanel="true" OnNeedDataSource="gridUsersCertifications_OnNeedDataSource" ExtraHeight="55"  AllowMultiRowSelection="true">
    <MasterTableView AllowSorting="false" GroupLoadMode="Client" TableLayout="Fixed" DataKeyNames="UserCertificationID,BE_OriginatedIN,AcquiringStatusID" ClientDataKeyNames="UserCertificationID,BE_OriginatedIN,AcquiringStatusID"  >
     
        <Columns>
            <telerik:GridClientSelectColumn UniqueName="SelectionColumn" ItemStyle-Width="35px" ></telerik:GridClientSelectColumn>
            <telerik:GridTemplateColumn Groupable="false" UniqueName="MenuColumn" ItemStyle-Width="30px">
                <ItemTemplate>
                    <img src="/Images/Edit.png" alt="" onclick="javascript:OpenMenu(event,'<%#Eval("UserCertificationID") %>','<%#Eval("AcquiredCertificationStatusID") %>','<%#Eval("AcquiringStatusID") %>','<%#Eval("AllowUpdateByUser") %>')"/>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn UniqueName="IDColumn" Display="false" DataField="UserCertificationID"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="UserIDColumn" DataField="UserID" Display="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="UserNameColumn" DataField="UserName" HeaderText="CERTIFICATION_USER_NAME"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="OUIDColumn" DataField="BE_OriginatedIN" Display="false"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn UniqueName="OUNameColumn" HeaderText="CERTIFICATION_OU" SortExpression="ParentName" GroupByExpression="ParentName Group By ParentName" >
                <ItemTemplate>
                    <span class="spanFullPath">
                        <bks:BksLabel runat="server" ID="lblOuName" Text='<%#Eval("ParentName") %>'></bks:BksLabel>
                    </span>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="CertificationIDColumn" DataField="CertificationID" Display="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="MDTypeName" DataField="MDTypeName" HeaderText="CERTIFICATION_TYPE_NAME" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="MDTypeID" DataField="MDTypeID" Display="false" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="CertificationNameColumn" DataField="CertificationName" HeaderText="CERTIFICATION_NAME"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn UniqueName="StatusColumn" HeaderText="CERTIFICATION_STATUS" SortExpression="CertificationStatus" GroupByExpression="CertificationStatus Group By CertificationStatus">
                <ItemTemplate>
                    <span class="spanStatus"><img runat="server" id="imgStatus" alt="" src="" /></span>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="CalculatedExpirationDateColumn" DataField="CalculatedExpirationDateFormat" HeaderText="CALCULATED_CERTIFICATION_EXPIRATION_DATE"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="OriginalExpirationDateColumn" DataField="OriginalExpirationDateFormat" HeaderText="ORIGINAL_CERTIFICATION_EXPIRATION_DATE"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="PlannedStartDateColumn" DataField="PlannedStartDateFormat" HeaderText="CERTIFICATION_PLANNED_START_DATE"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="PlannedAcquiringDateColumn" DataField="PlannedAcquiringDateFormat" HeaderText="CERTIFICATION_PLANNED_ACQUIRING_DATE"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn Groupable="false" UniqueName="acquiringStatusColumn" HeaderText="CERTIFICATION_ACQUIRING_STATUS" >
                <ItemTemplate>
                    <span class="spanApprovalProcess">
                        <bks:BksLabel runat="server" ID="lblacquiringStatus" Text='<%#Eval("AcquiringStatus") %>'></bks:BksLabel>
                    </span>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="AcquiringMethodColumn"  DataField="acquiringMethod" HeaderText="CERTIFICATION_ACQUIRING_RENEWAL_METHOD"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn Groupable="false" UniqueName="InitialAcquirementDateColumn" DataField="InitialAcquirementDateFormat" HeaderText="CERTIFICATION_INITIAL_ACQUIREMENT_DATE"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn UniqueName="PendingUserApprovalColumn" Visible="false" HeaderText="CERTIFICATION_PENDING_FOR_USER_APPROVAL" >
                <ItemTemplate>
                    <img runat="server" id="imgPendingUserApproval" alt="" src="/Certifications/Images/PendingApproval.png" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
 
    <ClientSettings AllowGroupExpandCollapse="True" AllowDragToGroup="True" >
        <ClientEvents OnRowMouseOver="GridRowMouseOver" OnRowSelecting="GridUsersCertifications_OnRowSelecting" />
    </ClientSettings>
 
    <GroupingSettings ShowUnGroupButton="true" />
 
    <CommandButtons>
         <bks:BksButton ID="btnUpdateCertification" runat="server" Text="UPDATE_CERTIFICATIONS" OnClientClick="UpdateMultiCertifications()" />
    </CommandButtons>
 
</bks:BksGrid>


thanks in advance,  Shir.

Venelin
Telerik team
 answered on 15 Jul 2014
9 answers
416 views
When we increase the height of the Rad Button its looses its border bottom.
(Default Height 22px ..we cant increase 1px ie 23px bottom border line will disappear)

Please find the attached Image.
Bozhidar
Telerik team
 answered on 15 Jul 2014
7 answers
306 views
Hi 

I have a grid button(linkbutton) , that I want to show a password from a data source after I click it.

So I need to change the GridButtonColumn to a GridBoundColumn after the button is clicked, is this possible?

The I want to change it to a GridBoundColumn becuase I need the DataField and HeaderText properties.

Help would be much appreciated.

Grant.
Princy
Top achievements
Rank 2
 answered on 15 Jul 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?