Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
Dir sir,
I have a problem you need help,
in demo ComboBox / Related ComboBoxes :
function LoadCities(combo, eventArqs)
{    
    var item = eventArqs.get_item();
    citiesCombo.set_text("Loading...");
    // this will fire the ItemsRequested event of the
    // cities combobox passing the countryID as a parameter
    citiesCombo.requestItems(item.get_value(), false);                    }
I want to get more value of comboContinent, then how?

Thanks for support,
Brgs,

Princy
Top achievements
Rank 2
 answered on 11 Jan 2010
5 answers
263 views

Hi,
In this example below, how can we change the alternate text or tooltip for the buttons between the listboxes?
I wanted to add the tooltip as move left, move right, etc.

URL: http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/draganddrop/defaultcs.aspx

Thanks
Yana
Telerik team
 answered on 11 Jan 2010
6 answers
250 views
Hi
I got a problem with a dynamically created RadGrid.
My definition is the following:
protected void Page_Init(object sender, EventArgs e) 
        { 
            createGrid("rgSchedules""TK_ID"truethis.phSchedulesGrid, out this.rgSchedules); 
            createSchedulesGridColumns(this.rgSchedules); 
            this.rgSchedules.SelectedIndexChanged += new EventHandler(rgSchedules_SelectedIndexChanged);             
        } 
 
        void rgSchedules_SelectedIndexChanged(object sender, EventArgs e) 
        { 
            // nothing happens but PostBack for test purposes 
        } 
 
        private void createGrid(string gridId, string datakeyName, bool autoPostBack, PlaceHolder ph, out RadGrid localGrid) 
        { 
            RadGrid grid = new RadGrid(); 
            grid.DataSourceID = "odsSchedules"
            grid.EnableViewState = false
            grid.ID = gridId; 
            grid.BorderStyle = BorderStyle.None; 
            grid.AutoGenerateColumns = false
            grid.AllowSorting = true
            grid.AllowPaging = false
            grid.AllowMultiRowSelection = false
            grid.Height = 450; 
            grid.Width = 450; 
            grid.GridLines = GridLines.None; 
            grid.PagerStyle.Visible = false
            grid.ClientSettings.EnablePostBackOnRowClick = autoPostBack; 
            grid.ClientSettings.EnableRowHoverStyle = true
            grid.ClientSettings.Selecting.AllowRowSelect = true
            grid.ClientSettings.Scrolling.AllowScroll = true
            grid.ClientSettings.Scrolling.UseStaticHeaders = true
            grid.ClientSettings.Scrolling.SaveScrollPosition = true
            grid.ClientSettings.Resizing.AllowColumnResize = true
            grid.ClientSettings.Resizing.ClipCellContentOnResize = false
            grid.ClientSettings.Resizing.EnableRealTimeResize = true
            grid.ClientSettings.Resizing.ResizeGridOnColumnResize = true
            grid.MasterTableView.DataKeyNames = new string[] { datakeyName }; 
            grid.MasterTableView.OverrideDataSourceControlSorting = true
            localGrid = grid; 
            ph.Controls.Clear(); 
            ph.Controls.Add(grid); 
        } 
        private void createSchedulesGridColumns(RadGrid grid) 
        { 
            grid.Columns.Clear(); 
 
            string nameCaption = this.GetLocalResourceObject("appointment").ToString(); 
 
            DynamicGrid.AddBoundFieldToGridView("TK_BEZEICHNUNG", nameCaption, grid); 
            DynamicGrid.AddDateTimeFieldToGridView("TK_ANFANG"this.GetLocalResourceObject("begin").ToString(), 
                grid); 
        } 
 

As you can see the grid performs a PostBack on click on a row. So if the grid or another control on the page performs a PostBack the grid gets some new, completly empty columns. They are exactly as many as the defined ones (in our case 2).

Did I miss anything? What am I doing wrong?

Best regards
Ferdinand
Ferdinand
Top achievements
Rank 1
 answered on 11 Jan 2010
1 answer
83 views
Hi,

I've a radgrid :

<

 

telerik:RadGrid ID = "m_radRecipientsGrid" runat="server"

 

 

CellPadding = "0"

 

 

AllowMultiRowSelection="True"

 

 

GroupingEnabled="False"

 

 

HorizontalAlign="Left"

 

 

OnNeedDataSource="m_radRecipientsGrid_NeedDataSource"

 

 

GridLines="None"

 

 

Height ="225px"

 

 

Width = "99%"

 

 

OnItemCommand = "m_radRecipientsGrid_ItemCommand"

 

 

OnSelectedIndexChanged="m_radRecipientsGrid_SelectedIndexChanged" TabIndex="15">

 

 

<MasterTableView AllowPaging="true"

 

 

AllowSorting="true"

 

 

AllowFilteringByColumn="true"

 

 

PagerStyle-Mode="NextPrevAndNumeric" PageSize="10">

 

 

<Columns>

 

 

<telerik:GridClientSelectColumn Reorderable="False" UniqueName="ClientSelectColumn">

 

 

<HeaderStyle Width="30px">

 

 

</HeaderStyle>

 

 

</telerik:GridClientSelectColumn>

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

<GroupingSettings CaseSensitive="false" />

 

 

<ClientSettings EnablePostBackOnRowClick ="true" >

 

 

<Scrolling AllowScroll="True"

 

 

UseStaticHeaders="True" />

 

 

<Selecting AllowRowSelect="true" EnableDragToSelectRows ="true" />

 

 

<Resizing AllowColumnResize="true"

 

 

ClipCellContentOnResize="true"

 

 

EnableRealTimeResize="true"

 

 

ResizeGridOnColumnResize="false" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 


When I select items in the grid,
I get the javascript error: 'this._owner' is null or not an object

How to get rid of this error.
Daniel
Telerik team
 answered on 11 Jan 2010
5 answers
113 views
I'm switching over our grids from our outdated infragistics grids.

One feature that was on the infragistics was that on Demand On Load on a grid, so you expand a row and it hits server and pulls child back. So like the RadGrid's ServerOnDemand.

What I'm trying to re-create but having problems, is that once those child items have been loaded, client should be able to collpase and expand that row without hitting the server but now the client has the data for that row. but I can't figure out how to do that using the RadGrid.

I'm using the AjaxManager as well.

So is this even possible?

So quick summary
click row, hits server gets child items display
On collpase it client collpases dosn't hit server ( can't figure this out)
if you expand the same row or a row that has already been expanded then you expand it using client and don't hit server (just show what you already know)
Veli
Telerik team
 answered on 11 Jan 2010
1 answer
162 views
Hi.

The provider gets the logged on user's appointments and displays them accordingly. However, a user needs to be able to view other user's calendars (though not edit them). Therefore I need to send a parameter to the provider in order to display the correct user's appointments.

The trouble so far has been that I do not seem to bind the data correctly.
I use a DropDownList to change the active user, and when I first choose a user (say John) nothing changes. When I choose another user (say Laura), John's data is displayed. Choosing a third user, displays Laura's data and so forth. Therefore there must be something wrong with the timing. 

Moreover, if I change the timeview, e.g. from Day to Month, the data of the original user is displayed.

I only set the original UserID in the Page_Load event and inside an if (!IsPostBack) check.
When the selected index is changed in the DropDownList, the ddlChange is fired, and UserID is updated for the RadScheduler. See code below.
    private void Page_Load(object sender, EventArgs e) 
    { 
        if (User.Identity.IsAuthenticated) 
        { 
            MembershipUser mu = Membership.GetUser(); 
            UserID = (Guid)mu.ProviderUserKey; 
        } 
         
        if(!IsPostBack) 
        { 
            UserProvider p = (UserProvider )RadScheduler1.Provider; 
            p.UserID = UserID;             
        } 
    } 
 
    protected void ddlChanged(object sender, EventArgs e) 
    { 
        DropDownList ddl = (DropDownList)PanelBar.Items[0].Items[0].FindControl("ddlUsers"); 
        string tmpUserID = ddl.SelectedValue.ToString(); 
        if (tmpUserID == "0")  //Meaning that the default/original user is selected 
        { 
            //UserID is the original user's id 
            RadScheduler1.Attributes["UserID"] = UserID.ToString(); 
             
            UserProvider p = (UserProvider )RadScheduler1.Provider; 
            p.UserID = UserID; 
             
            RadScheduler1.ReadOnly = false
        } 
        else 
        { 
            RadScheduler1.Attributes["UserID"] = tmpUserID.ToString(); 
             
            UserProvider  p = (UserProvider )RadScheduler1.Provider; 
            p.UserID = new Guid(tmpUserID.ToString());   
             
            RadScheduler1.ReadOnly = true
        }        
        RadScheduler1.DataBind();  
    } 

Hope you might help me with this :)
Thanks in advance.
Peter
Telerik team
 answered on 11 Jan 2010
8 answers
316 views
Hi there,

I am developing an application that uses client-side bound RadGrid's. The grids get refreshed (rebound) each second to a web service method result. Everything works fine with that...

However I was required to color differently cells that change their value. In OnRowDataBound for example can I access the old data item that was bound to the current row in order to compare some of their members?

Alternatively I could probably handle some other event (OnDataBound or OnDataBinding) and store all data items in a javascript collection. But how do I access the collection of retrieved data items?

Best regards,
Valery Dachev.
Pavlina
Telerik team
 answered on 11 Jan 2010
2 answers
217 views
Hi ,
I am trying to access the EditItemTemplate's text box control id(tbEntityID) in javascript to assign a new value to it. I searched many forums solution and tried many way, but no luck for me. following is the code snippet what i've followed.
Please help me to sort out this problem.


ASPX
<telerik:GridTemplateColumn HeaderText="Client Id" UniqueName="txtEntityId" EditFormColumnIndex="0" DataField="EntityID">  
<ItemTemplate> 
<asp:Label runat="server" ID="lblEntityID" Text='<%# Eval("EntityID", "{0:C}") %>'></asp:Label> 
</ItemTemplate> 
<EditItemTemplate> 
<asp:TextBox runat="server" ID="tbEntityID" Text='<%# Bind("EntityID") %>'></asp:TextBox> 
</EditItemTemplate> 
</telerik:GridTemplateColumn> 

C#
protected void GrdBPOClients_OnItemDataBound(object sender, GridItemEventArgs e)  
{  
 
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
            {  
                GridEditableItem editedItem = (GridEditableItem)e.Item;  
 
                System.Web.UI.WebControls.TextBox textbx = (System.Web.UI.WebControls.TextBox)editedItem.FindControl("tbEntityID");  
 
            }  
}   

JavaScript
function OnClientEntityClose(oWnd, oArg)   
{  
                //get the transferred arguments  
                var arg = oArg.get_argument();  
                if (arg) 
                        {  
                            if (arg.NewEntityId!= '')  
                            document.getElementById('textbx').value = arg.NewEntityId;  
                        }

Thanks in Advance
Bharani
Shinu
Top achievements
Rank 2
 answered on 11 Jan 2010
2 answers
153 views
Hi,

Is it possible to create a server-side toggle function for the date selection like the way you demonstrate client side on your site?

I have to write the selected date to DB and delete it if a date is unselected by the user.

Thanks for your information.

Marc
Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 11 Jan 2010
5 answers
351 views
Hello,
           I am working in sharepoint moss site.I have created one web part. In my web part i am using Rad Ajax Panel with some ASP.net controls. I am using <asp:panel> and  <asp:LinkButton>  and rad rotator , inside Rad Ajax Panel. My problem is that ,when i click on any link button first time , the PAGE is getting full post back.After that it behaves as expected.

Following is my code:-

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<table width="652" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" valign="top" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top" scope="col" class="prismbannerTopleft"></td>
        <td align="left" valign="top" scope="col" class="prism_bannerTopMiddle"></td>
        <td align="left" valign="top" scope="col" class="prismbannerTopRight"></td>
      </tr>
      <tr>
        <td align="left" valign="top" scope="col" class="prism_bannerMiddleleft">&nbsp;</td>
        <td align="left" valign="top" scope="col" >
      
 <telerik:RadRotator ID="rrMonths" runat="server" AutoPostBack="false"
    OnItemDataBound="rrMonths_ItemDataBound" ScrollDuration="2000" >
   <ItemTemplate>
      <asp:Image AlternateText="IMAGE" ID="Image2" runat="server" ImageUrl='<%#DataBinder.Eval(Container.DataItem, "Image") %>'/>
   <asp:HiddenField ID ="hdnid" runat ="server" Value='<%# DataBinder.Eval(Container.DataItem, "Id") %>' />
      </ItemTemplate>
  </telerik:RadRotator>

        </td>
      <td align="left" valign="top" scope="col" class="prism_bannerMiddleRight">&nbsp;</td>
      </tr>
        <tr>
        <td align="left" valign="top" scope="col" class="prism_bannerBottomleft"></td>
        <td align="left" valign="middle" scope="col" class="prismbannerBottomtext">
        
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr>
          <td width="72%" height="30" align="right" valign="middle" scope="col">
                <asp:Panel runat="server" ID="PanelNumber" Width="200" HorizontalAlign="Right">
                   <asp:LinkButton ID="lnkdemo1" runat="server">1</asp:LinkButton> <br/>
                   <asp:LinkButton ID="lnkdemo2" runat="server">2</asp:LinkButton><br/>
                   <asp:LinkButton ID="lnkdemo3" runat="server">3</asp:LinkButton><br/>
                   <asp:LinkButton ID="lnkdemo4" runat="server">4</asp:LinkButton><br/>
                   <asp:LinkButton ID="lnkdemo5" runat="server">5</asp:LinkButton><br/>
             </asp:Panel>
          </td>
      </tr>
   </table>
</td>
<td align="left" valign="top" scope="col" class="prism_bannerBottomRight"></td>
</tr>
</table></td>
  </tr>
</table>
</telerik:RadAjaxPanel>


If you have any solution regarding my problem ,send me ASAP.
Thanks in Advance.
divya sahu
Top achievements
Rank 1
 answered on 11 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?