Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
488 views
Hello Telerik Team,

I have an issue with radbutton control which acts as checkbox. What I've tried to achieve is to have same onclick event when user will click on asp:label control as it has when he clicks on radbutton itself. I don't want to use text property of radbutton because of css formatting. For further information, please check code below and picture in the attachment.

<asp:Panel runat="server" ID="pnl_spustit_schvalovaci_proces">
      <div class="LabelStyle1" style="clear: both; float: left; padding: 20px 10px 0px 2px">
               <asp:Label ID="Label35" runat="server" Text="Spustiť schvaľovací proces"></asp:Label>
       </div>
       <div style="float: left; padding: 20px 0px 0px 0px">
                 <telerik:RadButton ID="chk_spustit_schvalovaci_proces" runat="server" 
                               ButtonType="ToggleButton" ToggleType="CheckBox" 
                               OnClientClicking="spustit_schvalovaci_proces_OnClientClicking">                                    
                  </telerik:RadButton>
          </div>
</asp:Panel>

The question is, how to bind onclick event to label control with same object id as radbutton. Maybe via some jquery commands ?

Please help me to solve this issue.

Best regards

Vasssek
Vasssek
Top achievements
Rank 1
 answered on 17 Oct 2011
3 answers
118 views
I create tabstrip and multipage with js.how to trigger the pageview created event on server side or load the user control on client side?
 function openLink(linkName, linkValue) {  
            var tabStrip = $find("<%= RadTabStrip1.ClientID %>");  
            var multiPage = $find("<%= RadMultiPage1.ClientID %>");  
 
            tabStrip.trackChanges();  
            multiPage.trackChanges();  
 
            var tab = new Telerik.Web.UI.RadTab();  
            tab.set_text(linkName);  
            tab.set_value(linkValue);  
            tabStrip.get_tabs().add(tab);  
            AttachCloseImage(tab, "../Images/close.gif");  
              
            var page = new Telerik.Web.UI.RadPageView();  
            page.set_id(linkValue);  
            multiPage.get_pageViews().add(page);  
 
            tab.set_pageViewID(linkValue);  
              
            tabStrip.commitChanges();  
            multiPage.commitChanges();  
 
        }  
 
Sachin
Top achievements
Rank 1
 answered on 17 Oct 2011
1 answer
396 views
I'm trying to use the color picker to load and save values. My values are stored in normal HTML format (#000000). The demos show that you can set the selected color in the control property like so: SelectedColor = "#000000" however the property is really a System.Drawing.Color type. You cannot set the property like this: ColorPicker.SelectedColor = "#000000"; in the code. Instead you must convert the HTML string to System.Drawing.Color.

This seems so basic, I think I must be missing something. Are there no built in routines to allow us to easily load and save HTML colors or do we really have to convert everything to and from the database?

Can you give me two examples of the recommended way of setting and getting an HTML color value from code?
Slav
Telerik team
 answered on 17 Oct 2011
6 answers
214 views
Hi,
  I'm implementing a listview in which a chage page size combobox is used inside the layouttemplate. a ajaxmanager is added so that the trigger element is the listview and the updated element is also the listview and another control to prevent page flicker. I have some jquery code defined in the header section. when the page is first loaded, the jquery work fine, but when I change the pagesize by the combobox, the jquery stop working. Strange enough, when I change the jquery to javascript event, the event handler works in all cases. I use firebug from firefox to debug and find out that when change pagesize triggers a postback, the html is rendered back to the browser with a different version; the header part is completely missing, so is the jquery. If I define javascript event handler, it is missing too, but still functions, except I cannot step into the javascript source. I checked and find out this is caused by the ajaxmanager because when I checked off the listview from the ajax trigger control, the complete html is rendered back and the jquery works as expected. Is there any way to fix this but still retain ajax effect ? I wonder if moving the change pagesize combobox out of the listview and set it to the ajax update trigger would make it work. In that case how to get the pager control inside the layouttemplate equivalent to previouse code sample: combo.NamingContainer as RadDataPagerFieldItem).Owner.PageSize.
  I would appreciate it very much if you could explain the details and give some advice.
thank you.
Pavlina
Telerik team
 answered on 17 Oct 2011
1 answer
176 views
Hi,

I am using RadControls for ASP.NET Ajax 2011 Q2.

I've got a RadGrid with paging enabled, and the page sizes can be changed. To achieve custom page sizes, I got this:

void RadGridView1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
 
        PageSizeCombo.Items.Clear();
        PageSizeCombo.Items.Add(new RadComboBoxItem("25"));
        PageSizeCombo.FindItemByText("25").Attributes.Add("ownerTableViewId", RadGridView1.MasterTableView.ClientID);
        // and so on...

In the same aspx I have an overlay div which grays out the page and displays a waiting icon. It can be called via javascript, the code executing the overlay is simple and always works fine, because the elements both exist in every page:

function showLoadingOverlay() {
    try {
        $("#overlaydiv").css('visibility', 'visible');
        $(".loadingImage").css('visibility', 'visible');
    } catch (exc) { }
}
function hideLoadingOverlay() {
    try {
        $("#overlaydiv").css('visibility', 'hidden');
        $(".loadingImage").css('visibility', 'hidden');
    } catch (exc) { }
}


I use the RadComboBox'es OnClientSelectedIndexChanged Attribute on many ComboBoxes, that are Autopostback and do something time consuming, for this I have the function:

function OnClientSelectedIndexChanged(item) {
    showLoadingOverlay();
}


The trouble comes, when I set the OnClientSelectedIndexChanged method of the RadComboBox used for chaning page size, like this:

void RadGridView1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
        PageSizeCombo.OnClientSelectedIndexChanged = "OnClientSelectedIndexChanged";
        // ...

The PageSizeCombo actually does display the overlay div as it should, BUT there is no PostBack.

Several other RadComboBoxes on the same page are AutoPostBack==true also, and they all still fire the PostBack even with theOnClientSelectedIndexChanged  event.

When I manually enable the AutoPostBack of the RadComboBox, there is a PostBack, but the RadGrid's NeedDataSource event isn't called (in which I use the new page size, if there is any).

void RadGridView1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
        PageSizeCombo.OnClientSelectedIndexChanged = "OnClientSelectedIndexChanged";
        PageSizeCombo.AutoPostBack = true;


When I manually add a SelectedIndexChanged, that should refresh the data source (used by other RadComboBoxes!), the event still doesn't fire:

void RadGridView1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
        PageSizeCombo.OnClientSelectedIndexChanged = "OnClientSelectedIndexChanged";
        PageSizeCombo.AutoPostBack = true;
        PageSizeCombo.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(FilterChanged_RadComboBox);

I really don't know what else to try, and I am wondering if this might be a bug, or at least something that doesn't work because nobody expected anyone to use the OnClientSelectedIndexChanged attribute of this builtin RadComboBox?

I would appriciate any fixed or workarounds, apart from creating my own RadComboBox for the pagesizes, because I don't want to fiddle with getting my own RadComboBox right next to the other paging controls.

Cheers
Pavlina
Telerik team
 answered on 17 Oct 2011
2 answers
158 views
We are allowing users to choose multiple employees separated by semi-colons from a large list of employees, similar to the way MS Outlook allows you to choose multiple people to send an email to.

We are using a RadComboBox with an auto complete separator allowing us to choose multiple items from the combo box.

<telerik:RadComboBox

ID="cmbAuthors" runat="server"     

Width="400px" Height="140px"    

EmptyMessage="Type an author"         

MarkFirstMatch = "true"   

AutoCompleteSeparator = ";"

DataTextField="fullname"    >                                                                   

</telerik:RadComboBox>                           


We are seeing a bunch of strange stuff happen:
1) If you have nothing selected in the combobox and move to the next control, the first item is selected.
2) If you choose a couple of names from the drop down, hit semi-colon, and then tab to the next control, the first item in the dd is appended to the list.
3) If you just try to highlight everything in the text box and delete it in order to start over, some combination of what you originally had in the box reappears, sometimes just the last item you had choosen appears, sometimes the entire previous selection reappears.

This seems like a simple use case, anyone else seeing this behavior or have some tips.

Thanks
Ivana
Telerik team
 answered on 17 Oct 2011
2 answers
235 views

Hi Guys,

Here i radtextbox textmode="password" ,
Edit Mode's not assigned any value ,


<telerik:RadTextBox Width="50%" ID="password" AutoCompleteType="Disabled" runat="server"
MaxLength="10" TextMode="Password"
Text='<%# Bind("password") %>'>
</telerik:RadTextBox>


Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 17 Oct 2011
4 answers
137 views
I'm using a RadColorPicker inside of a RadWindow and it causes the RadColorPicker to have all of its colours in one column. If I generate a postback in the page that contains the RadColorPicker then it snaps into the right layout/look. Any idea what is causing this/how to solve this? see images to understand what I mean.

Before postback

After postback


:edit:
uploaded clearer images
Slav
Telerik team
 answered on 17 Oct 2011
1 answer
135 views
Hi All,

              Am Facing RadGrid Paging problem. Am mention the problem below ,pls give your valuable answer.

Query:  coming to paging when am clicking  on the next arrow image paging was not happening and also when am clicking on the last Arrow image also the paging was not carrying to last.

Please give some valuable suggestion

Regards,
Sravan
Magnasys
Shinu
Top achievements
Rank 2
 answered on 17 Oct 2011
1 answer
124 views
I'm having trouble with the drop line indicator.  It will not appear.  I only have one grid and I need to reorder the rows.  I have checked the drag drop demo line by line and but I know that I must be missing something.  If someone can point me in the right direction about

1. What fires the line indicator?  Is it automatic or do I need to wire something up?  I've tried different skins but that did not help. 

I'm using a User control if that makes any difference and I am using Ajax. 

Thanks

Galin
Telerik team
 answered on 17 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?