Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
204 views
I have added a table control inside radpanelitem content template.
The issue is with the row, it does not take the height of the image inside it (6px)
If i render the table without the radpanelbar, the rows are rendered correctly.
I would appreciate any workaround for this issue.

Here is the code (please replace the images with different images to see the error) -

<telerik:RadPanelBar ID="RadPanelBar3" runat="server" ExpandMode="FullExpandedItem" Width="100%">
            <Items>
                <telerik:RadPanelItem runat="server" Text="search" Expanded="True">
                    <ContentTemplate >
                        <asp:Table runat="server" ID="tblsearchRequest" style="border-spacing:0;" CellSpacing="0" >
                            <asp:TableRow style="border-width:0">
                                <asp:TableCell style="margin:0;padding:0;border-width:0; font-size: 1px">&nbsp;</asp:TableCell>
                                <asp:TableCell HorizontalAlign="left" style="padding-right: 4px; border-bottom: 1px solid #B4BBCD; padding: 0px;  font-size: 1px"></asp:TableCell>
                                <asp:TableCell ID="tdAny" runat="server" HorizontalAlign="left"  style="border-bottom: 1px solid #B4BBCD; padding-right: 4px; padding: 0px; height: 6px; font-size: 1px; width: 11px" VerticalAlign="bottom">
                                    <asp:Image Visible="false" Width="11" Height="6" ID="imgSelAny" runat="server" ImageUrl="~/Images/SelectArrow.gif" BorderWidth="0" ></asp:Image>
                                </asp:TableCell>
                                <asp:TableCell HorizontalAlign="left" style="padding-right: 4px; border-bottom: 1px solid #B4BBCD; padding: 0px;  font-size: 1px"></asp:TableCell>
                                <asp:TableCell ID="tdAll" runat="server" HorizontalAlign="left" style="border-bottom: 1px solid #B4BBCD; padding-right: 4px; padding: 0px; height: 6px; font-size: 1px; width: 11px" VerticalAlign="bottom">
                                    <asp:Image Visible="false" ID="imgSelAll" Width="11" Height="6" runat="server" ImageUrl="~/Images/SelectArrow.gif" BorderWidth="0" ></asp:Image>
                                </asp:TableCell>
                                <asp:TableCell HorizontalAlign="left" style="padding-right: 4px; border-bottom: 1px solid #B4BBCD; padding: 0px;  font-size: 1px"></asp:TableCell>
                                <asp:TableCell ID="tdBool" runat="server" HorizontalAlign="left" style="border-bottom: 0px solid #B4BBCD; padding-right: 4px; padding: 0px; height: 6px; font-size: 1px; width: 11px" VerticalAlign="bottom">
                                    <asp:Image ID="imgSelBool" Width="11" Height="6" runat="server" ImageUrl="~/Images/SelectArrow.gif" BorderWidth="0" ></asp:Image>
                                </asp:TableCell>
                                <asp:TableCell HorizontalAlign="left" style="padding-right: 4px; border-bottom: 1px solid #B4BBCD; padding: 0px; font-size: 1px"></asp:TableCell>
                                <asp:TableCell style="margin:0;padding:0;border-width:0; font-size: 1px"></asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </ContentTemplate>
                </telerik:RadPanelItem>
            </Items>
    </telerik:RadPanelBar>
Ivan Zhekov
Telerik team
 answered on 13 Apr 2012
3 answers
166 views
Hi,

The problem is when I use vertical scrollbar on RadListBox on Android browser it selects the item I clicked to start scrolling, I don't want the listbox to select Item while I'm scrolling.

could you help me please.


Ivan Zhekov
Telerik team
 answered on 13 Apr 2012
7 answers
161 views
Dear Telerik.

I was following our examples of RadScheduler with Teachers and Students as ResourceTypes. I build dynamic resource types per user (every user can CRUD their resource types). For this to happen I obviously need to store user id inside every resource type. 
I use web service approach (this is the only option if you work with MVC) with ResourcePopulationMode="ServerSide".
In my public class SchedulerProvider : SchedulerProviderBase

public override IEnumerable<Appointment> GetAppointments(ISchedulerInfo schedulerInfo)
    {
      var membershipUser = Membership.GetUser();
membershipUser is the user that is currently logged in user, which is expected.

However, in here in the same class:
    public override IDictionary<ResourceTypeIEnumerable<Resource>> GetResources(ISchedulerInfo schedulerInfo)
    {
      var membershipUser = Membership.GetUser();
memebrshipUser is ALWAYS NULL regardless if somebody is logged in or not.

It seems to me that its a different instance of the same class, which I cannot figure out why.
This is preventing me from being able to retrieve only relevant resource types and resources for currently logged in user.
Can you please guide me through what should be done here (how to get the resource types for currently logged in user inside GetResources), and if I am using RadScheduler control  the right way in MVC environment at all.

Thank you very much in advance!
Peter
Telerik team
 answered on 13 Apr 2012
2 answers
104 views
I've got some Javascript bound to the click event for a bunch of buttons in an asp:repeater representing time slots. Once the buttons are updated through the RadAjaxManager, the Javascript no longer works. If I remove the RadAjaxManager stuff (so it does full PostBacks), it works fine. I've tried moving the Javascript into various places. I've tried using .on rather than just binding .click directly but can't seem to make it work.

jQuery(function($) {
            $(".SelectScheduleDate").on("click", selectTime);
}

Any thoughts on what I need to do differently?

David
Eyup
Telerik team
 answered on 13 Apr 2012
1 answer
85 views
Hi,

We have recently installed the radeditor as the default editor in our Sharepoint 2010 installation. One request that has been mentioned is the ability to have different tools available based on the users permissions in sharepoint. e.g. a power user or sharepoint administrator may wish to have the HTML view availaible to do some more advanced customisations / fix user errors.

Is it possible to control toolbar / editor configurations on a per user basis?

I have searched around the internet and forums and found no reference as to how to achieve this in sharepoint environment.
Stanimir
Telerik team
 answered on 13 Apr 2012
1 answer
98 views
Is that possible to make a boundcolumn readonly in edit mode and user should be able to insert new record to that field?
Princy
Top achievements
Rank 2
 answered on 13 Apr 2012
1 answer
403 views

hi I have a RadGrid bound to an openaccess data source on the radgrid

 

_UpdateCommand event I want to save the text value of a combobox not the selected value because we have allowcustomtext on the dropdown set to true

we are useing a "GridDropDownColumn" in the grid, have "radComboBox.AllowCustomText = true" in the Itemdatabound event, and now I am getting the value with "ExtractValues" method in the _UpdateCommand event

Hashtable values = new Hashtable();
gridEditableItem.ExtractValues(values);
values["School"] = radComboBox.Text;

 

I am just not sure how to get the orm to save the changed value?

I tried this but that did not work

gridEditableItem.UpdateValues(values);

what am I missing?

 

 


 

 

 

 

 

 

 

 

 

 

 

 

 

Pavlina
Telerik team
 answered on 13 Apr 2012
1 answer
174 views
I have a radgrid bound to a sqldatasource, I have the columns using a radcombobox. What I want to do is switch some of the columns to use checkboxes like on this example:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx 
The only other thing I've been able to find on this is from this forum from 2009:
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-filtering-using-a-radcombobox-of-checkboxes.aspx 

But first mine is all declared in the aspx file, and second everything else is changing the filter using a js call like:
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("CustomerName", args.get_item().get_value(), "EqualTo");

While that forum post ends with a:
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("ContactTitle," + text ); 
That calls a function on the code behind:
private void RadAjaxManager1_AjaxRequest(object  sender, AjaxRequestEventArgs e) 
 
  if(e.Argumnet.ToString().Split[','][0]=="ContactTitle"
    { 
     //Access the rest of the string and set the filter Expression 
     
    } 
}  

What is the best way to do what I'm trying to do, and if that's the only way to do the checkboxes (using the ajax call) how do I modify the sqldatasource from the ajax call so that it doesn't mess up the rest of the filtering?

Update:
I created a control that inherits from GridTemplateColumn,
In there I do:
RadComboBox rcBox = new RadComboBox();
            rcBox.ID = "DropDownList_" + DataField;
            rcBox.AutoPostBack = true;
            rcBox.DropDownWidth = DropDownWidth;
            rcBox.Width = FilterControlWidth;
            rcBox.CheckBoxes = true;
            rcBox.ItemChecked += rcBox_ItemChecked;
            rcBox.Height = Unit.Pixel(200);
 	    DataTable table = GetDataTable(string.Format("SELECT DISTINCT cast({0} as varchar) as {0} FROM {1} Where 1=1 {2} order by {0} asc"this.DataField, TableName, where));
            rcBox.DataTextField = this.DataField;
            rcBox.DataValueField = this.DataField;
            rcBox.DataSource = table;
            cell.Controls.Add(rcBox);

my rcBox_ItemChecked looks like this:
private void rcBox_ItemChecked(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e)
        {
            ((GridFilteringItem)(((RadComboBox)sender).Parent.Parent)).FireCommandEvent("Filter"new Pair());
        }

in the:
protected override void SetCurrentFilterValueToControl(TableCell cell)
and:
protected override string GetCurrentFilterValueFromControl(TableCell cell)
How can I access the checkboxs?
And how do I add or filtering best?
Pavlina
Telerik team
 answered on 13 Apr 2012
1 answer
90 views
G'Day Guys,

I have been asked to place a copyright notice in small lettering on the very bottom right of each chart.

Should be a simple thing to put some text down there, but I am struggling to find out how to do it.  If it were within the plot area then I gather I could use markedzones, but even reading through the examples I do not see a clear way to put text on the chart using marked zones.  I followed the demo and I can make lovely colorful back strips ..... not what I need right now though.

1.  How can I add something like "Copyright 2012, XYZ Company" to the bottom right hand corner of the chart.
2. If it can't go on the bottom can you show me a simple example of placing text on the plot area.

Many thanks in advance.

Attatched a pic to show what I want, follow the red arrow :).

Cheers

Ian.
Yavor
Telerik team
 answered on 13 Apr 2012
6 answers
171 views
Does anyone know how to refresh the get_count() value after removing a menu item on client side?
I use the following to remove the menu header item after the last child item is removed but the get_count() function keeps returning the maximum amount of child items that were created by get_items().add(...).

Here is the code I use:

function AddNewMenuItem(itemText,itemValue) {
    var menu = $find(MainMenu_ID);
    var menuTabsItem = menu.findItemByText("Tabs");
    var menuItem = new Telerik.Web.UI.RadMenuItem();
    if (!menuTabsItem) {
        menuItem.set_text("Tabs");
        menuItem.set_value("");
        menu.get_items().add(menuItem);
        menuTabsItem = menu.findItemByText("Tabs");
    }
    menuItem = new Telerik.Web.UI.RadMenuItem();
    menuItem.set_text(itemText);
    menuItem.set_value(itemValue);
    menuTabsItem.get_items().add(menuItem);
}
 
function RemoveMenuItem(itemValue) {
    var menu = $find(MainMenu_ID);
    var menuTabsItem = menu.findItemByText("Tabs");
    var menuTabsItemToRemove = menu.findItemByValue(itemValue);
    if (menuTabsItem) {
        alert("a " + menuTabsItem.get_items().get_count())
        menu.get_items().remove(menuTabsItemToRemove);
        alert("b " + menuTabsItem.get_items().get_count())
        if (menuTabsItem.get_items().get_count() == 0) {
            menu.get_items().remove(menuTabsItem);
        }
    }
}

It works to add and remove items under the item "Tabs" but when a child item is removed from the menu "Tabs" the get_count() returns the same value for point "a" and point "b" in the alert functions of RemoveMenuItem. Just to make myself clear, the item does get removed as expected.
Ioannis
Top achievements
Rank 1
 answered on 13 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?