Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
289 views

I've a RadGrid and a ItemTemplateColumn which contains a RadTextBox, I'm binding the grid on client side by using a Webservice and on "OnRowDataBound" event i want to set value in the textbox (that is present inside the ItemTemplate)

 

<telerik:RadGrid ID="dgvDataEntry" runat="server">

    <MasterTableView>

        <Columns>

        <telerik:GridTemplateColumn HeaderText="Attribute Name" DataField="AttrName" UniqueName="AttrName">

            <ItemTemplate>

                <telerik:RadTextBox ID="RadTextBox1" runat="server" />

        </ItemTemplate>

        </telerik:GridTemplateColumn>

        </Columns>

    </MasterTableView>

<ClientSettings>

    <ClientEvents OnRowDataBound="RadGrid1_RowDataBound" />

</ClientSettings>

</telerik:RadGrid>

here is my OnRowDataBound event

function RadGrid1_RowDataBound(sender, args) {

var txt = args.get_item().findControl("RadTextBox1"); //I always get "null" here
}

Is it the wrong way to access the control inside the ItemTemplate? Let me know where i'm doing wrong?

 

 

 

 

 

 

 

 

 

Sadaf
Top achievements
Rank 1
 answered on 02 Jun 2013
2 answers
41 views

I have populated the FontNames tool with a list in toolsfile.xml (standard fonts like Arial, etc), plus some additional fonts using FontNames.Add() in code. The additional fonts are hosted elsewhere, and are loaded with css @font-face statements.

All the fonts appear in the drop down list, and are correctly applied to content, so the important part is working well.

The problem occurs when you put your cursor in some text which has a font applied. If it is one of the common fonts, the FontName tool correclty displays the name of the font. If it is one of the uncommon fonts I added to the list, the tool shows somethng like this: "Thread-00002640-Id-0000017d" instead of the actual font name.

 
Works correclty in Forefox and Webkit browsers

Any ideas on how to get IE to display the proper font name?

I am using version 2012.3.1308.40

Dan Ehrmann
Top achievements
Rank 1
 answered on 01 Jun 2013
1 answer
193 views
I am expecting a NO this can't be done because the radgrid is a databound control,

if you have grid with 17 rows in it and I just want want to rebind row 5 only and nothing else.. is this possible? (Client Side fyi)

Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Jun 2013
1 answer
237 views
Hi,

I am trying to check some combo items from a Radcombobox inside a GridTemplateColumn but unfortunately I cannot get it to work. Instead when I directly set the checked attribute on a checkbox I obtain the correct functionality. The RadGrid is bound to a datasource which all combo items are defined with boolean values (SyncVariantLocalizations, SyncVariantPictures, etc).

Code working:
<asp:CheckBox ID="CheckBox5" runat="server" Enabled="false" Checked='<%# Eval("SyncVariantLocalizations")%>' />

Code not working:
<telerik:GridTemplateColumn UniqueName="SyncSetting" HeaderText="Sync Settings" HeaderStyle-Width="232">
                                    <ItemTemplate>
                                        <div style="float: right;">
                                            <telerik:RadComboBox ID="RadComboBoxSyncConf" runat="server" Width="220px" CheckBoxes="true" EnableCheckAllItemsCheckBox="false" DropDownAutoWidth="Enabled">
                                                <Items>
                                                    <telerik:RadComboBoxItem Text="Product Localizations" Value="SyncProductLocalizations" Checked='<%# Eval("SyncProductLocalizations")%>' Enabled="false" />
                                                    <telerik:RadComboBoxItem Text="Product Pictures" Value="SyncProductPictures" Checked='<%# Eval("SyncProductPictures")%>' Enabled="false" />
                                                    <telerik:RadComboBoxItem Text="Product Categories" Value="SyncProductCategoryMap" Checked='<%# Eval("SyncProductCategoryMap")%>' />
                                                    <telerik:RadComboBoxItem Text="Product Manufacturers" Value="SyncProductManufacturerMap" Checked='<%# Eval("SyncProductManufacturerMap")%>' />
                                                    <telerik:RadComboBoxItem Text="Variant Localizations" Value="SyncVariantLocalizations" Checked='<%# Eval("SyncVariantLocalizations")%>' />
                                                    <telerik:RadComboBoxItem Text="Variant Pictures" Value="SyncVariantPictures" Checked='<%# Eval("SyncVariantPictures")%>' />
                                                    <telerik:RadComboBoxItem Text="Variant Attributes" Value="SyncVariantCustomAttributes" Checked='<%# Eval("SyncVariantCustomAttributes")%>' />
                                                </Items>
                                            </telerik:RadComboBox>
                                        </div>
                                    </ItemTemplate>
 
                                </telerik:GridTemplateColumn>


Thanks.
Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Jun 2013
4 answers
160 views
Hi,
We just upgraded our Telerik controls to 2013.1.507 from 2011.2.712, but several of the static Telerik JS files do not load correctly and we get an access denied when the page tries to load the new static files. Is there a setting that I need to update as well to enable the upgraded static files to load correctly. Examples of the core.js files are below.

Works: http://aspnet-scripts.telerikstatic.com/ajaxz/2011.2.712/Common/Core.js (old version)
Error: http://aspnet-scripts.telerikstatic.com/ajaxz/2013.1.507/Common/Core.js (upgraded version) 

The response I get from the upgraded version is as follows.

<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>EAA9A8DBA5D5647D</RequestId>
<HostId>RoXshPY0+cLn3M1xyk5UsVHd4QCK1cdFFsempv3HxcuuEu5azqzgMhIV8eTzv3Xo</HostId>
</Error>

Please let me know what I'm missing. Thanks for your help.
Chad
Top achievements
Rank 1
 answered on 01 Jun 2013
8 answers
539 views
I have a RadComboBox that was working great. I then decided to move the ComboBox to a usercontrol, using a RadAjaxManagerProxy control. I'm loading items on demand. The error that i get specifically is this:

The target &#39;ctl00$ph_content$ctl00$cboCompany&#39; for the callback could not be found or did not implement ICallbackEventHandler.

I belive ctl00$ph_content$ctl00$cboCompany is the wrong location for the ComboBox now that it is in the UserControl.

Has anyone seen this behavior and know a fix?

Thanks,
Duncan
Marc
Top achievements
Rank 1
 answered on 31 May 2013
2 answers
121 views
Hello experts,

I am trying to create a super simple horizontal menu, something like: Home | About | Contact
I don't need sub menus or all the advanced stuff of the RadMenu. However, I need to be able to style it exactly like the website, hence can't use any of the Telerik skins.

<telerik:RadMenu ID="RadMenu1" runat="server" Flow="Horizontal" EnableEmbeddedSkins="False" Skin="">
  <Items>
    <telerik:RadMenuItem Text="Home" ></telerik:RadMenuItem>
    <telerik:RadMenuItem runat="server" Text="|" IsSeparator="True" />
    <telerik:RadMenuItem Text="About" ></telerik:RadMenuItem>
    <telerik:RadMenuItem runat="server" Text="|" IsSeparator="True" />
    <telerik:RadMenuItem Text="Contact" ></telerik:RadMenuItem>
  </Items>
</telerik:RadMenu>

I tried the tutorial to create a custom skin:

http://www.telerik.com/help/aspnet-ajax/menu-appearance-creating-custom-skins.html

but I can't manage to skin it as I want. There are zillions of css classes, some are not  even exposed and built-in within the Telerik control.

The resulting html of the RadMenu control is some super simple <ul><il>, exactly what I want. But it is rendered useless because I can't control its styling.

Can the RadMenu control be configured so all its embedded css classes are removed?
May be is there another control a better choice to do such a simple menu?

thank you for your help.
Micha
Top achievements
Rank 1
 answered on 31 May 2013
4 answers
462 views
hi,

i want to add a custom attribute to radgrid and this attribute must shown on source of grid html.. is it possible?
for example;

 <div id="RadGrid1" class="RadGrid RadGrid_Office2007" myAttribute="someAttributeValue" >
.... other grid html on page.....
</div>

thanks in advance..
Sylvie
Top achievements
Rank 1
 answered on 31 May 2013
3 answers
174 views
Hi,

I am exporting grid data into an excel. I needed to add company logo at the top in excel. So, I did this:

string

 

 

imageURL = Page.ResolveUrl("~/Images/") + "Companylogo.jpg";
 
Radgrid1.ExportSettings.FileName = pFileName;

 

Telerik.Web.UI.ExportInfrastructure.

 

Table table = pExportEventArgs.ExportStructure.Tables[0];

 

xls.

 

Cell cmpCell = table.Cells["A1"];

 

table.InsertImage(cmpCell, imageURL);

table.ShiftRowsDown(1, 8);

Then I need to add some information to the sheet like this on row 9, from starting cell like this:
table.rows[9].cells[0]. value = "Down loaded from company name:" + current Date Time;

For this long text to appear as visible, I want to merge cells and then display.

From row 10, grid data gets displayed. If cell1 is not wide enough, row 9 value partially is visible.

How can I merge cells of particular row and add value to it.

I appreciate your response.

Daniel
Telerik team
 answered on 31 May 2013
1 answer
84 views
Hi,

I've got a hierarchichal RadGrid with one Detail Table. Lets call the items on the upper level "boxes" and the ones in the detail table "apples" - which is quite near reality in this case. (only we're not actually tracking apples ;-))

The user can move one or more different apples from one to another box via DragDrop.

This works fine when the apples are dropped on a specific box: Then I get a e.DestDataItem from the RadGrid1_RowDrop(object sender, GridDragDropEventArgs e) event, and I can figure out which box the apple(s) were placed in.

It also works fine, when there are already apples in a box, and some other apples are dropped on these rows. Then again I get a e.DestDataItem, and I can figure out, which box these apples are in, and I can add the dragged apples to the same box.

BUT: If apples are dropped either on the header rows of the DetailTable, or if a box is empty and they are dropped on the "No child records to display", then the e.DestDataItem is null. This sort of makes sense, but in this case I need a reference to the box, so I can add the dragged apples to this box.
I spent almost an hour now inspecting the GridDragDropEventArgs I get in this case, and I can nowhere find a reference. As soon as the DestDataItem is null, there seems to be no way of finding out which box the apples were dragged on.

The DestinationGrid and DestinationTableView Members are both not-null, so maybe I am missing something.
Any help is appreciated.

Best,
Christian

Angel Petrov
Telerik team
 answered on 31 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?