Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
208 views
Client side radgrid updateItem() works absolutely inconsistently. It fires always server update only if I put debugger inside javascript otherwise it may or may not update record. Is that a bug in radgrid?

I have grid with last column template. Idea was to have an Excel like grid - on tab out from last column udate current record and edit next one.

<telerik:GridTemplateColumn  UniqueName="COSTTOCOMPLETE" HeaderText="Cost to Complete">
    <ItemTemplate>
        <telerik:RadNumericTextBox ID="costToComp" runat="server" Text = '<%# Eval("COSTTOCOMPLETE") %>' ReadOnly="true">
            <NumberFormat DecimalDigits="0" />
        </telerik:RadNumericTextBox>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadNumericTextBox ID="costToComp" runat="server" Text = '<%# Bind("COSTTOCOMPLETE") %>'>
            <NumberFormat DecimalDigits="0" />
            <ClientEvents OnBlur="costToComp" />
        </telerik:RadNumericTextBox>
    </EditItemTemplate>
    <InsertItemTemplate>
        <telerik:RadNumericTextBox ID="costToComp" runat="server" Text = '<%# Bind("COSTTOCOMPLETE") %>'>
            <NumberFormat DecimalDigits="0" />
            <ClientEvents OnBlur="costToComp" />
        </telerik:RadNumericTextBox>
    </InsertItemTemplate>
</telerik:GridTemplateColumn>

here is javascript:
function costToComp(sender, args) { 
    var grid = $find('<%= rg_OpenWIP.ClientID %>'); 
    var idx = grid._editIndexes[0]; 
    if (idx != null) { 
        $find(grid.MasterTableView.get_id()).updateItem(parseInt(idx)); 
        var items = grid.get_masterTableView().get_dataItems(); 
        if ((items.length - 1) != idx) { 
            $find(grid.get_masterTableView().get_id()).editItem(parseInt(idx) + 1);//works always 
        
    
    else
        $find(grid.MasterTableView.get_id()).insertItem(); 
    
}; 
Yurii
Top achievements
Rank 1
 answered on 15 Aug 2011
1 answer
102 views
Hi.

I have a radcombobox that fills on demand from a sql-query, it is used to find users, companies, servers and so on. Works very good.
But, I would like to change it to a broader search if the text is not found.

<telerik:RadComboBox ID="rcomSearch" runat="server" OnItemsRequested="rcomSearch_ItemsRequested"
                EnableLoadOnDemand="true" DataTextField="text1" DataValueField="typeid" MarkFirstMatch="true"
                AutoPostBack="False" HighlightTemplatedItems="true" EmptyMessage="Søk i IBA..."
                OnSelectedIndexChanged="rcomSearch_SelectedIndexChanged" LoadingMessage="Henter..."
                Width="300px"  OnClientSelectedIndexChanged="OnClientSelectedIndexChanged"
                Visible="true"  AllowCustomText="True"    >

So, OnSelectedIndexChanged i will go directly to the found object, but if I press Enter with text in the box I would like to response.redirect to a Search-page and give a list of results there.
Anyone knows how to do this?
Kevin
Top achievements
Rank 2
 answered on 15 Aug 2011
1 answer
131 views
Please help me. In RadAjaxManger has two client function : onResquestStart and onResponseEnd . when i ajax request to server and do something. after return value i will get value in fuction onResponseEnd but how to know i do something in Server is succeed 
or error.Is function onResponseEnd has notify an action in Server is succeed or not.?
Kevin
Top achievements
Rank 2
 answered on 15 Aug 2011
3 answers
115 views
Hello everyone,
I have a RadGrid with autogenerated columns, I set a datasource with the column names with spaces.
(example: "id ue", "number boxes", etc.).


My problem occurs when I drag a field in the group panel.


"Field id not found in the source table" in reality the field is not "id" but "id ue" ... but the blank character generates exception in the group panel.




Can you help me?


thanks


Best Regards


Lasly 
Andrey
Telerik team
 answered on 15 Aug 2011
3 answers
195 views
I have radmenu bar in which i want to highlight or backcolor change of root menu in CSS.

below is my code and css.

 <telerik:RadMenu ID="RadHistorickMenu" Skin="MenuSkin" runat="server" EnableEmbeddedSkins="false" OnClientItemClicking="OnClientItemClicking"
                            EnableRoundedCorners="true" EnableShadows="true" Width="100%" OnItemClick="RadHistorickMenu_ItemClick"> 
                            <Items>
                                <telerik:RadMenuItem Text="Quarterly" >
                                    <Items>
                                        <telerik:RadMenuItem Text="I S"/>
                                        <telerik:RadMenuItem Text="O D"  />
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem Text="Annual" >
                                    <Items>
                                        <telerik:RadMenuItem Text="I S"  />
                                        <telerik:RadMenuItem Text="O D"  />
                                    </Items>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>

My CSS is below.

 

/* <RadMenu / Black> */
  
.RadMenu_MenuSkin .rmRootGroup,
.RadMenu_MenuSkin a.rmLink,
.RadMenu_MenuSkin .rmText
{
    background-color: transparent
}
  
.RadMenu_MenuSkin .rmRootGroup
{
    background-repeat: repeat-x;
    background-color: #717171;
}
   
  
.RadMenu_MenuSkin .rmVertical
{
    background-position: 0 -408px;
}
  
/* <Root items> */
  
.RadMenu_MenuSkin,
.RadMenu_MenuSkin a.rmLink
{
    font: normal 12px/23px "Segoe UI", Arial, sans-serif;
    color: #ffffff;
    text-decoration: none;
}
  
.RadMenu_MenuSkin a.rmLink,
.RadMenu_MenuSkin .rmText
{
    background-repeat: no-repeat;
    background-position: 0 500px;
}
  
.RadMenu_MenuSkin a.rmLink:hover,
.RadMenu_MenuSkin a.rmFocused,
.RadMenu_MenuSkin a.rmSelected
{
    background-position: 0 -72px;
    background-color : #dcdcdc; /* Selected menu*/
    color : #28638f;
    font-weight:bold;
}
  
.RadMenu_MenuSkin .rmLast a.rmExpanded .rmText
{
    background-position: 0 500px;
    background-repeat: no-repeat;
}
  
.RadMenu_MenuSkin a.rmDisabled,
.RadMenu_MenuSkin a.rmDisabled:hover
{
    color: #7d7d7d;
    background-position: 0 500px;
}
  
/* </Root items> */
  
.RadMenu_MenuSkin .rmVertical .rmLink,
.RadMenu_MenuSkin .rmHorizontal .rmLink
{
    margin-right: 5px; /* Distance between menu items*/
}
  
/* <Submenu items> */
  
.RadMenu_MenuSkin .rmGroup,
.RadMenu_MenuSkin .rmMultiColumn,
.RadMenu_MenuSkin .rmGroup .rmVertical
{
    border: 1px solid #080808;
}
  
.RadMenu_MenuSkin .rmTopFix,
.RadMenu_MenuSkin .rmBottomFix,
.RadMenu_MenuSkin .rmRoundedCorners .rmGroup .rmItem,
.RadMenu_MenuSkin .rmRoundedCorners li.rmFirstGroupColumn .rmItem,
.RadMenu_MenuSkin .rmRoundedCorners .rmFirstGroupColumn li.rmFirstGroupColumn .rmItem,
.RadMenu_MenuSkin .rmRoundedCorners ul.rmHorizontal .rmFirst,
.RadMenu_MenuSkin_Context.rmRoundedCorners .rmGroup .rmItem,
.RadMenu_MenuSkin_Context.rmRoundedCorners ul.rmHorizontal .rmFirst
{
    background-color: #717171
    background-repeat: repeat-y;
}
  
* html .rmRoundedCorners_MenuSkin .rmGroup .rmItem,
* html .rmRoundedCorners_MenuSkin ul.rmHorizontal .rmFirst
{
    background-color: #717171
    background-repeat: repeat-y;
}
  
  
.RadMenu_MenuSkin .rmRoundedCorners .rmGroupColumn
{
    background-color: #717171;
}
  
.RadMenu_MenuSkin .rmRoundedCorners .rmScrollWrapContainer .rmTopFix,
.RadMenu_MenuSkin .rmRoundedCorners .rmScrollWrapContainer .rmBottomFix,
.RadMenu_MenuSkin_Context.rmRoundedCorners .rmScrollWrapContainer .rmTopFix,
.RadMenu_MenuSkin_Context.rmRoundedCorners .rmScrollWrapContainer .rmBottomFix
{
    background: #717171;
}
  
* html .rmRoundedCorners_MenuSkin .rmScrollWrapContainer .rmTopFix,
* html .rmRoundedCorners_MenuSkin .rmScrollWrapContainer .rmBottomFix
{
    background: #717171;
}

i mean on click of IS or OD, it will change back color or css of Quarterly / Annual (root menu) in css.
can any one help me with this?
Kate
Telerik team
 answered on 15 Aug 2011
1 answer
166 views
I would like to use the Telerik upload control for my interface, but I would prefer to upload the file(s) to a service-based destination instead of a local destination on my Web server. How do I accomplish this, and will I still be able to utilize Telerik progress indicators?
Peter Filipov
Telerik team
 answered on 15 Aug 2011
2 answers
110 views
Is there a possiblity to format the hours column to the following:

1:00 PM     00
                  15
                  30
                  45
2:00 PM    00
ect.?
Also can I higlight the current hour and minute in different colo?

I attached a screenshot from our old scheduler. Since we are now using Telerik scheduler, we should support all the old features implemented in our old scheduler.
Plamen
Telerik team
 answered on 15 Aug 2011
6 answers
304 views
hello
i have questions.
how to call client event (such as javascript function call) when i clicked on the ribbonbartab.
please let me know soon.
thank.
Kate
Telerik team
 answered on 15 Aug 2011
3 answers
161 views
Hi!  I need to have a RadComboBox, contained within a RadListView, rebind upon a RadWindowClosing. 

I followed the solution from http://www.telerik.com/community/forums/aspnet/window/rebind-radcombobox-when-radwindow-closed.aspx.  However cannot seem to access the RadComboBox in the code behind.

Here's the relevant code from the aspx page:
// Javascript
function closeRadWindow() {
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
}

function openWin() {
     var oWnd = radopen("/TestDevelopment/Controls/CopyrightHolder.aspx", "winCopyright");
}   

 // RadAjaxManager and RadWindow declaractions
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline"
        DefaultLoadingPanelID="RadAjaxLoadingPanel1" onajaxrequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadListView1"
             <UpdatedControls
                <telerik:AjaxUpdatedControl ControlID="cboHolder" /> 
             </UpdatedControls
          </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     <telerik:RadWindowManager>
        <Windows>
            <telerik:RadWindow ID="winCopyright" Modal="true" Behaviors="Close, Move"
                NavigateUrl="/TestDevelopment/Controls/CopyrightHolder.aspx" runat="server"
                Width="870px" Height="515px" OnClientClose="closeRadWindow">
            </telerik:RadWindow>           
        </Windows>
    </telerik:RadWindowManager>
 
// Button
<input type="button" id="btnHolder" runat="server" value="Holder" onclick="openWin(); return false;" />

Here's the relevant code from the vb page:
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)
        Dim cb As RadComboBox = DirectCast(RadListView1.FindControl("cboHolder"), RadComboBox)
        cb.DataBind()
End Sub

I get an error saying 'object reference not set to an instance of an object', and when debugging through the code I see that it's not able to find the RadComboBox.  I'm guessing perhaps this has something to do with the button only being in the Edit and Insert Item Templates?

Any assistance would be greatly appreciated, thank you!
Radoslav
Telerik team
 answered on 15 Aug 2011
5 answers
912 views
Hi, new to RadGrid and Telerik.

I have created a RadGrid made of GridTemplateColumns and populated it with data.

Now, for each row in the grid I'd like to iterate over every value in each column in that row and if the value is numeric and is negative, I'd like to make it red.

I suspect it would be nested foreach, but I'm not seeing a Row object to iterate over and I can't see how to get the value out of each column(field) so I can test for negative.

Also, how would I set the style color to red on that value?

Which even would be best for this, Prerender or Databound?

Thanks!

Tsvetina
Telerik team
 answered on 15 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?