Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
126 views

Hello,

We have our employee photos as binary fields (VARBINARY(MAX)) in our SQL Server database. How to bind these Images to the indiviudal Org Chart boxes?

Do you have sample Code available?

Thanks in advance.

Thomas

 

 

Plamen
Telerik team
 answered on 22 Dec 2015
2 answers
266 views
Hi I have a RadTreeView where I have implemented a context menu on the nodes.

<telerik:RadTreeView ID="RadTreeView1" runat="server" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick" OnClientContextMenuItemClicking="onClientContextMenuItemClicking">               
             <ContextMenus>
                    <telerik:RadTreeViewContextMenu ID="ctxMenuAddK1" runat="server">
                        <Items>
                            <telerik:RadMenuItem Value="addNodeK1" Text="Add New K1 Node">
                            </telerik:RadMenuItem>                                            
                        </Items>
                     </telerik:RadTreeViewContextMenu>
            </ContextMenus>                       
</telerik:RadTreeView>


when user clicks the menu item, the client side event fires and a modal popup is displayed to the user. the modal popup has 2 text boxes, when user enters value in those text boxes and submits the popup, the text box values are concatenated and sent back to the calling page, where this value id captured in a hidden field.

case "addNodeK1":
var windowResult = window.showModalDialog("Controls\\newNodeK1.htm", "Enter Value", "dialogHeight: 300px; dialogWidth: 400px;");
document.getElementById('<%=HiddenField1.ClientID %>').value = windowResult;
break;

now the control goes to the server side context menu click event. here I am picking up the value from the hidden field, and do my tasks.

protected void RadTreeView1_ContextMenuItemClick(object sender, RadTreeViewContextMenuEventArgs e)
{           
switch (e.MenuItem.Value)
{
case "addNodeK1": 
// get node name and node value from the hidden field.
string nameValue = HiddenField1.Value;
}
}

This works fine. the modal popup holds the execution until a value is submitted by the user. but the issue comes when I try to use radWindow instead of the modal popup.

I have added a radWindowManager and one child radWindow inside it. 

<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
        ReloadOnShow="true" runat="server" Skin="Sunset" EnableShadow="true">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server" Behaviors="Close" OnClientClose="OnClientClose"
                NavigateUrl="Controls\\newNodeK1.htm">
            </telerik:RadWindow>           
        </Windows>
</telerik:RadWindowManager>

and I am trying to invoke the radwindow in the context menu clicked on the client.

var oWnd = radopen("Controls\\newNodeK1.htm", "RadWindow1");

The problem is that unlike the modal popup, it does not hold the execution. the RadWindow appears but the server side code executes simultaneously, and since the hidden field ie empty, my code does not work. what could be the solution of this problem? 
Bhavya
Top achievements
Rank 1
 answered on 22 Dec 2015
1 answer
84 views

Hello All,

Hopefully this has an easy solution. I'm using a RadGrid with an EditForm (EditFormType="Template"). In that form I have a dropdownlist and several other fields. Depending on the value selected in the ddl, I need to enable or disable certain validators. the following code for SelectedIndexChanged works when in edit mode, but does not when in insert mode. How do I get it to fire for Insert as well as Edit?

 

    Protected Sub lstContactType_SelectedIndexChanged(sender As Object, e As EventArgs)

        For Each item As GridDataItem In gridEmpContacts.EditItems
            ' Access your textbox here
            Dim rfv1 As RequiredFieldValidator = TryCast(item.EditFormItem.FindControl("rfvSSN"), RequiredFieldValidator)
            Dim rfv2 As RequiredFieldValidator = TryCast(item.EditFormItem.FindControl("rfvPctBene"), RequiredFieldValidator)
            Dim rfv3 As RequiredFieldValidator = TryCast(item.EditFormItem.FindControl("rfvContactDoB"), RequiredFieldValidator)
            Dim listbox As DropDownList = DirectCast(sender, DropDownList)

            Select Case listbox.SelectedValue
                Case "401K/Profitsharing - Primary", "401K/Profitsharing - Secondary", "Life - Primary", "Life - Secondary", "AD&D - Primary", "AD&D - Secondary"
                    rfv1.Enabled = True
                    rfv2.Enabled = True
                    rfv3.Enabled = True
                Case Else
                    rfv1.Enabled = False
                    rfv2.Enabled = False
                    rfv3.Enabled = False
            End Select
        Next




    End Sub

Viktor Tachev
Telerik team
 answered on 21 Dec 2015
1 answer
131 views

Hi there

 I just startet my first RadGrid Project in ASP.Net.

My question is:

Can I display a large cell with long text in one or two lines and then make something like ". . ." to show that the text is longer than the cell.

Another question is:

How can change the "Update" and the "Cancel" text for the Editing Form.

 

Greetings and thx for your help :-)

Eyup
Telerik team
 answered on 21 Dec 2015
3 answers
174 views

Hi

When I click on the control panel download I'm being asked which program to open it with.

Whats wrong? there is no file extension

ANdy

Andrey
Telerik team
 answered on 21 Dec 2015
2 answers
424 views

Hi,

We're using 2015.1.225.45  Telerik version to export graphics bar from RADHtmlChart to PDF. We have a javascript handler to export it with the following code:

$find('<%=RadClientExportManager1.ClientID%>').exportPDF($(".RadHtmlChart"));

The graphics bar have some text with accents. On the browser, the text is shown correctly but on the exported PDF, the text with accents has errors. 

You can confirm this comparing the images graphics_bar_browser.png and graphics_bar_PDF.png attached to this thread.

It looks like there's some encoding problem or the font being used does not supports accent characters

Best Regards,

AMBISIG

 

Ivan Danchev
Telerik team
 answered on 21 Dec 2015
5 answers
918 views
Hi, Telerik,
I have a RadGrid with a checkbox in each row.  I need to use JavaScript to iterate each row and check and see whether each row are checked. The checkbox is defined in <telerik:GridTemplateColumn> in MasterTableView.  How do I do that? 
Eyup
Telerik team
 answered on 21 Dec 2015
1 answer
79 views

I am having an issue with the display of the Radeditor control.  

The issue only occurs when the Browser is IE 10.  

Attached are two images B4postback.png  shows the way the RadEditor window is rendering before postback.  (Incorrect rendering   The window is not the correct height.)  

Afterpostback.png - shows how the RadEditor window renders after a Postback with the Multipage page the editor is on being visible.  (Correct rendering)  

If I set the Tab controls to autopostback the editor does render correctly; however, that does not appeal to the client as a postback on tab click causes too much of a delay between switching tabs/pages.  

I have updated the site to use Q3 2015. Previously we were using Q1 2013, but that version always renders incorrectly in IE 10, even after postback.    

I have tried using the solution for display issues: http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/troubleshooting/content-area-appearance-problems 

But that appears to have no effect.  

The control only displays incorrectly on page load when the control is on a non-focused multipage page that is later made visible with at a postback of that multipage page, under IE 10.   All other browsers I have tested, IE 8, IE 9, IE 11  and Chrome appear to render correctly. 

The issue is pressing because the Client just updated all 4000+ of it's computers to IE 10 this past week and The end user has no choice except to use the browser that has been made available to them.  

Any Ideas on what I can try so that the control always renders correctly, that don't involve a postback before the multipage with the Editor Control is switched too? 


 

 

 

Ianko
Telerik team
 answered on 21 Dec 2015
1 answer
60 views

I have a dynamically loaded grid (automatic column generation, data table as a source) and currently I use the code below to catch the rows as they are created and compare their content to the previous row to track changes in the data. If nothing changed i want to hide the row from the grid. Based on everything i have read the code below should work properly and it does for highlighting column changes BUT for some reason its ignoring the e.Item.Visible setting and still showing rows that I have set to hidden. Thanks in advance!

01.System.Data.DataTable dt = null;
02.int rowCnt = 0;
03.List<int> colsNotToTrack = new List<int>();
04.protected void rgResults_ItemCreated(object sender, GridItemEventArgs e)
05.{
06.    if (compareLines && e.Item is GridDataItem)
07.    {
08.        if (rowCnt > 0)
09.        {
10.            bool changed = false;
11.            for (int i = 2; i < e.Item.Cells.Count; i++)
12.            {
13.                if (colsNotToTrack.Contains(i))
14.                    continue;
15.                if (dt.Rows[rowCnt][i - 2].ToString() != dt.Rows[rowCnt - 1][i - 2].ToString())
16.                {
17.                    e.Item.Cells[i].BackColor = System.Drawing.Color.LightSalmon;
18.                    changed = true;
19.                }
20.            }
21.            e.Item.Visible = changed;
22.        }
23.        rowCnt++;
24.    }
25.     
26.}
Kostadin
Telerik team
 answered on 21 Dec 2015
1 answer
173 views

Hello,
I have a radwindow that uses ContentTemplate, I need to update a radComboBox inside the ContetnTemplate on the event of a LinkButtom Clicked in a RadGrid Control

I tried using the AjaxManager like this

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
       <telerik:AjaxSetting AjaxControlID="grd_limousine">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="wnd_UpdateStatusWindow" />
            </UpdatedControls>
       </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

 

I also tried to put the window inside a panel and set it as the control to be updated instead

the problem is that when I used the AjaxManager on the radWindow it started returning null in this code

function showWindow(windowID, url) {
    //window.radopen(null, 'wnd_UpdateStatusWindow');
    var window = $find(windowID);
    window.show();
}
Can anyone tell me why this happening and how to fix it?
Ianko
Telerik team
 answered on 21 Dec 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?