Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
158 views
Please can any one there help out? i want to create or insert binaryimage into the database.
Emmanuel
Top achievements
Rank 1
 answered on 29 Mar 2012
3 answers
185 views
Hi,
I need to make hierarchical grid based on some condition.This means if there is no details,then there should not be (+) image in the grid.I need to hide expand image based on condition.Each master row i have the status of whether detail is there or not.
Princy
Top achievements
Rank 2
 answered on 29 Mar 2012
6 answers
722 views
I am switching over a gridview to a radgrid and ran into a hiccup, Gridview when a cell is blank actually puts in a   so you have to check for this , apparently Radgrid works differently.  I am trying to find out if a cell is blank or not, if its blank I want to hide a button on the radgrid.
Protected Sub myRadGrid_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles myRadGrid.ItemDataBound
       If (TypeOf e.Item Is GridDataItem) Then
           Dim button As LinkButton = e.Item.FindControl("lnkPickUp")
           Dim text As String = e.Item.Cells(7).Text
           If text = Nothing Then
               button.Enabled = False
               button.Visible = False
           End If
       End If
   End Sub
Kevin
Top achievements
Rank 1
 answered on 29 Mar 2012
7 answers
366 views

Hi dude,
I have a RadGrid in Asp.net with three groups. I want to Have a checkbox on the last group header. I do not need to have checkbox in other group header. WHat should I do?

Tnx alot
Tsvetina
Telerik team
 answered on 29 Mar 2012
0 answers
79 views
Hi..
Anyone please...

We are using telerik rad menu control to list out rad menu items in silverlight project . Sometimes it's working well, but sometimes it's shows control error message.

In my project we have Rad treeview , if we select a Rad treeview item, it will open and the title of the treeview item should add in RadMenu items. If I mouseover on RadMenu it will show the menu items what are all added. And close the treeview item which is opened.  Then, again we are open the same treeview item.

Now, the title of treeview item added successfully in RadMenu items in code side using break points. But In design, If I mouseover on RadMenu, it's not show the RadMenu items what are all added. Instead It shows the control related error message box.

code for Add Menu item in RadMenu : Sample1.xaml.cs
**********************************************************************************************************************************************************************
 private RadMenuItem AddChildRadMenuItem(RadMenuItem item, string text)
        {
            if (item == null)
                return null;
            RadMenuItem child = new RadMenuItem();
            child.Click += (s, e) => MenuItemShowWindowClick(s, e);
            child.Header = text;

            foreach (RadMenuItem menuItem in item.Items)
                menuItem.IsChecked = false;
            item.Items.Add(child);
            child.IsChecked = true;
            return child;
        }

**********************************************************************************************************************************************************************

Code for remove menu item for radmenu : Sample1.xaml.cs

private void RemoveRadMenuItem(string name)
        {
            WindowsMenuItem.IsEnabled = true;
            App.checkwindow = false;
            for (int i = 0; i < WindowsMenuItem.Items.Count; i++)
            {
                RadMenuItem menuItem = (RadMenuItem)WindowsMenuItem.Items[i];
                string menuHeader = (menuItem.Header == null) ? "" : menuItem.Header.ToString();
                if (string.Compare(menuHeader, name, CultureInfo.CurrentCulture, CompareOptions.Ordinal) == 0)
                {
                    WindowsMenuItem.Items.Remove(menuItem);
                    menuItem.Click -= (s, e) => MenuItemShowWindowClick(s, e);
                }
            }
            if (WindowsMenuItem.Items.Count == 0)
            {
                WindowsMenuItem.IsEnabled = false;
                App.checkwindow = true;
                return;
            }
            if (((WindowsMenuItem.Items[WindowsMenuItem.Items.Count - 1]) as RadMenuItem).IsCheckable)
                ((WindowsMenuItem.Items[WindowsMenuItem.Items.Count - 1]) as RadMenuItem).IsChecked = true;
        }

***********************************************************************************************************************************************************************
code for select item of RadMenu: Sample1.xaml.cs

  private void MenuItemShowWindowClick(object sender, RoutedEventArgs e)
        {
            RadMenuItem radMenuItem = (sender as RadMenuItem);
            if (radMenuItem == null)
                throw new InvalidOperationException("Object menu raise exception in method Click.");
            foreach (RadDocumentPane documentPane in DiagramPaneGroup.Items)
            {
                if (documentPane.Header is TabItemHeader)
                {
                    TabItemHeader tabItemHeader = (TabItemHeader)documentPane.Header;
                    string documentName = tabItemHeader.Model.Text;
                    string Title_ = "";

                    if (documentName.Contains("*"))
                    {
                        string[] header = documentName.TrimStart().TrimEnd().Trim().Split('*');

                        Title_ = header[0].Trim().TrimStart().TrimEnd().ToString();

                        if (string.Compare(Title_, radMenuItem.Header.ToString(), CultureInfo.CurrentCulture, CompareOptions.Ordinal) == 0)
                        {
                            DiagramPaneGroup.SelectedItem = documentPane;
                        }

                    }
                    else if (string.Compare(documentName, radMenuItem.Header.ToString(), CultureInfo.CurrentCulture, CompareOptions.Ordinal) == 0)
                    {
                        DiagramPaneGroup.SelectedItem = documentPane;
                    }
                }
            }
        }
***********************************************************************************************************************************************************************
Design code of silverlight Sample1.xaml file

<telerikNavigation:RadMenu x:Name="MainMenu" VerticalAlignment="Top" ClickToOpen="False" Grid.Row="0" >
        ..............
                ..................

                         <telerikNavigation:RadMenuItem Header="Window" x:Name="WindowsMenuItem"></telerikNavigation:RadMenuItem>
                ...................
       .................

</telerikNavigation:RadMenu>

************************************************************************************************************************************************************************

We are using Q3 2010 version of Radcontrols. please try to send the solutions as soon as possible..

For clear information please see the below images ..

Thanks,
PRABAKARAN G.

KARAN
Top achievements
Rank 1
 asked on 29 Mar 2012
9 answers
257 views

Following is the javascript code where I am adding few items in existing rad context menu i.e. RadMenu1. There are few items already in it and I am adding few more items dynamically in javascript

function ContextMenuOpen(sender, args) 
{
   
var menu = $find("m_c_RadMenu1");
   
if (IsMobileBrowser() == false)
   
{
       
var evt = args.get_domEvent();
   
}
    menu
.trackChanges();
   
var items = menu._getAllItems()
    menu
.get_items().clear();

   
//menu.commitChanges();
   
AddItem("Visit & View Details", "a");

   
if (selectedRow.findElement("lblTask") != null) {
       
var tasklist = selectedRow.findElement("lblTask").defaultValue;
       
var taskArray = tasklist.split(',');

       
for (i = 0; i < taskArray.length; i++) {
           
if (typeof (taskArray[i].split('~')[1]) == 'undefined') break;
           
AddItem("Perform " + taskArray[i].split('~')[1], taskArray[i].split('~')[0]);
       
}
       
//rb.AddItem(selectedRow.findElement("lblTask").innerText,4)
   
}
   
AddItem("Log an Incident", "b");
   
if (rb.isLocationSelected == false) {

   
AddItem("Log a Discrepancy", "c");
}


function AddItem(text, value) {
   
var menu = rb.GetMenu();
   
var item = rb.GetContextMenuItem(text);
   
if (item != null) return false;
   
var menuItem = new Telerik.Web.UI.RadMenuItem();
    menuItem
.set_text(text);
    menuItem
.set_value(value)
    menu
.trackChanges();
    menu
.get_items().add(menuItem);
    menu
.commitChanges();
   
return true;
}

Everything goes well , but the newly added context menu shows transparent background on rightside , I found it is filling the background only at the area where text is present , on empty area at rightside it is transparent (see attached image )

see the transparent background, right side of the items

do anybody know how to remove this transparent background?

Anjani
Top achievements
Rank 1
 answered on 29 Mar 2012
1 answer
136 views
Hai,

I have a hiddenfield in the item template of a Radcombo. I have to take the value of hiddenfield in the SelectedIndexChanged event of radcombo. I used the following method as per your website refernece for radcombo. This code was working fine. But one day it started not working, showing null reference exception in finding the hiddenfield. I didn't change anything.

protected

 

void rcbTruck_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)

 


{

RadComboBox

 

combo = (RadComboBox)sender;

 

 

RadComboBoxItem item = (RadComboBoxItem)combo.SelectedItem;

 


hidDailyOrderDetailId2.Value = ((

HiddenField)item.FindControl("hidDailyOrderDetailId1")).Value;

 


}

aspx

<

 

asp:HiddenField ID="hidDailyOrderDetailId2" runat="server" />

 



<

 

telerik:RadComboBox ID="rcbTruck" runat="server" DropDownWidth="250px" Width="250px"

 

 

ShowToggleImage="true" Height="140px" AllowCustomText="True" MarkFirstMatch="False"

 

 

HighlightTemplatedItems="True" TabIndex="2" EmptyMessage="--Select--" AutoPostBack="true"

 

 

EnableLoadOnDemand="True" Skin="Web20" ToolTip="Please Select truck" MaxHeight="250px"

 

 

OnItemsRequested="rcbTruck_ItemsRequested" OnSelectedIndexChanged="rcbTruck_SelectedIndexChanged">

 

 

<ItemTemplate>

 

 

<input id="hidScheduledStartTime" type="hidden" runat="server" value='<%#DataBinder.Eval(Container.DataItem,"ScheduledTime") %>' />

 

 

<asp:Label ID="lblVehicleName" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"VehicleName") %>'></asp:Label>

 

 

<asp:HiddenField ID="hidDailyOrderDetailId1" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"Daily_Order_Detail_Id") %>' />

 

 

</ItemTemplate>

 

 

</telerik:RadComboBox>

 

Ivana
Telerik team
 answered on 29 Mar 2012
1 answer
204 views

Team

I am using GridBinaryImageColumn column in my grid.

I have a requirement to open popup (radwindow) on the click of that binary image & display that image in that radwindow.

Can you please let me know how can I implement it ???
Thanks

Sampada

Tsvetina
Telerik team
 answered on 29 Mar 2012
1 answer
135 views
Hi,
I have a very simple Telerik AJAX setup in one page, and it works well most of the time, but it sometimes enters into a state where dropdowns won't send their selected values back to the server in AJAX posts anymore.

This is basically what I have (simplified for the purpose of posting it here, the actual page is much much bigger):

<%@ Page Language="VB" MasterPageFile="~/Admin/_MasterPages/Default.master" AutoEventWireup="false"<br>    ValidateRequest="false" MaintainScrollPositionOnPostback="true" CodeFile="Edit.aspx.vb"<br>    Inherits="Admin_Setup_Edit" %><br><br><asp:Content ID="Content1" ContentPlaceHolderID="SubNavigationContentPlaceHolder"<br>    runat="Server"><br></asp:Content><br><asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server"><br>    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">        <br>    </telerik:RadAjaxManager><br>    <telerik:RadCodeBlock ID="CodeBlock1" runat="server">    <br>        <script type="text/javascript"><br><br>            var AddEvent_ShowLoader = function () {<br>                JS.showLoader();<br>            }<br><br>            var AddEvent_HideLoader = function () {<br>                JS.hideLoader();<br>            }<br><br>        </script><br>    </telerik:RadCodeBlock><br>    <telerik:RadAjaxPanel ID="mainAjaxPanel" runat="server" ClientEvents-OnRequestStart="AddEvent_ShowLoader"<br>        ClientEvents-OnResponseEnd="AddEvent_HideLoader" LoadingPanelID="MasterRadAjaxLoadingPanel"><br>        <table cellpadding="0" cellspacing="0" width="100%"><br>            <tr><br>                [[... a lot of other rows here... ]]<br>            </tr>            <br>            <tr><br>                <td class="BorderRight"><br>                    <asp:DropDownList ID="ddlStatus" runat="server"><br>                    </asp:DropDownList><br>                </td>                <br>                <td><br>                    <asp:DropDownList ID="ddlType" runat="server"><br>                    </asp:DropDownList><br>                </td><br>            </tr><br>            <tr><br>                [[... a lot of other rows here... ]]<br>            </tr>            <br>        </table><br>    </telerik:RadAjaxPanel><br></asp:Content>

Values from dropdowns will come as empty strings, which is incorrect.
Please note that this is a random issue, so there must be something that's getting corrupted somehow and I need to know why.

Have someone experienced this before? Any pointers on what the problem could be?

Thanks
Andrey
Telerik team
 answered on 29 Mar 2012
9 answers
458 views
My client would like to use a close button that has the word close followed by the X.  (They think the current close button is too tiny to be noticed by users.)  The close button is the only button we want to have appear along the top of the window.  I have created a custom skin and updated the sprite (attached), but don't know how to get the window to show the entire close portion of the sprite.  Any clues?  I'm also attaching an image that shows how the close button appears currently.

Thanks.

Laurie
Chris Mitchell
Top achievements
Rank 1
 answered on 29 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?