Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
46 views
Hi,

My radgrid isn't  editable when it loads! I want it to be editable. Please help.





Angella
Top achievements
Rank 1
 answered on 19 Oct 2012
1 answer
99 views
Hi,
I have a masterpage. my aspx page's masterpage file this master page.this aspx page has got 1 label(lblGrandTotal). i have an usercontrol in this aspx page. this usercontrol inside 1 grid(radGrid1),1 label(lblTotal) and 1 radajaxmanager. when i change dropdownlist(inside grid) it write some value to lblTotalPrice inside my usercontrol. it is working pretty. But i want to write same value to my lblGrandTotal.text property. I write this code for this operation. I can take my lblGrandTotal and set my value to lblGrandTotal but i cant see this change in my aspx page.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lblTotal" LoadingPanelID="RadAjaxLoadingPanel1" />                                                 
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

        public void SetGrandTotalPrice(decimal price)
        {
            var lblGrandTotal = Page.Master.FindControl("cphCenter").FindControl("lblGrandTotal") as Label;
            lblGrandTotal.Text = price.ToString();            
        }

How can i resolve this problem
Best Regards
Tsvetoslav
Telerik team
 answered on 19 Oct 2012
1 answer
49 views
We have a RadGrid with a lot of columns, when we navigate with the keyboard the cursor disappear and the scrolls not moving.
Is there any way to scrolls follows de selected cell?

Thanks!
Tsvetoslav
Telerik team
 answered on 19 Oct 2012
4 answers
222 views
 I have Grid with
*Scrolling
*Static header
*Number of columns  - 35
*Browser : ie 7

I got the header alignment Problem when implementing grouping using GroupByExpressions.

Please see the file attached.




Manoj
Top achievements
Rank 1
 answered on 19 Oct 2012
1 answer
167 views
I have a page with a grid and a RadWindowManager with some windows.

Inside these window I have some other controls which I use to interact with the grid.

Now I add a button somewhere in my page:

<telerik:RadButton runat="server" ID="RadButton1" AutoPostBack="true" OnClick="btnAjouter_Click">
</telerik:RadButton>

But for some reason, when I click on this button nothing happen. There is no postback and no javascript error.

I tried to put a UserControl that I use in a RadWindow in comment and the button seems to work...

My UserControl looks like this:

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="WindowDivergence.ascx.vb"
    Inherits="GESPHARxLite_2.WindowDivergence" %>
<%@ Import Namespace="GESPHARxLite_2.GestionMessages" %>
 
<div class="WindowDivergence">
    <%--Ordonnance--%>
    <div>
        <div class="alignLeft wdLabel">
            <telerik:RadCodeBlock runat="server">
                <%=GetMessageEx(750).Texte%>:
            </telerik:RadCodeBlock>
        </div>
        <div class="alignLeft wdDataInput">
            <telerik:RadTextBox runat="server" ID="txtNoOrdo" ReadOnly="true" Width="35px">
            </telerik:RadTextBox>
        </div>
        <div class="alignLeft wdDataInput">
            <telerik:RadTextBox runat="server" ID="txtMedicament" ReadOnly="true" Width="250px">
            </telerik:RadTextBox>
        </div>
        <div class="spacer">
        </div>
    </div>
    <%--Type de divergence--%>
    <div>
        <div class="alignLeft wdLabel">
            <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                <%=GetMessageEx(6203).Texte%>:
            </telerik:RadCodeBlock>
        </div>
        <div class="alignLeft wdDataInput">
            <telerik:RadComboBox runat="server" ID="cboTypeDivergence" Width="291px" OnClientSelectedIndexChanged="TypeChanged">
            </telerik:RadComboBox>
        </div>
        <div class="spacer">
        </div>
    </div>
    <%--Intervenants--%>
    <div>
        <div class="alignLeft wdLabel wdLabelValidator">
            <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
                <%=GetMessageEx(900).Texte%>:
            </telerik:RadCodeBlock>
        </div>
        <div class="alignLeft wdDataInput">
            <asp:RequiredFieldValidator runat="server" ID="rfvIntervenant" ErrorMessage="*" ControlToValidate="cboIntervenant"></asp:RequiredFieldValidator>
            <telerik:RadComboBox runat="server" ID="cboIntervenant" Width="100px" DropDownWidth="200px"
                HighlightTemplatedItems="true" OnClientSelectedIndexChanged="IntervenantChanged">
                <ItemTemplate>
                    <div class="cboContentContener">
                        <div>
                            <b>
                                <%=GetMessageEx(389).Texte%>
                            </b>
                            <%#DataBinder.Eval(Container, "Text")%>
                        </div>
                        <div>
                            <b>
                                <%=GetMessageEx(205).Texte%>
                            </b>
                            <%#DataBinder.Eval(Container, "Attributes['Description']")%>
                        </div>
                    </div>
                </ItemTemplate>
            </telerik:RadComboBox>
        </div>
        <div class="alignLeft wdDataInput">
            <telerik:RadTextBox runat="server" ID="txtIntervenant" Width="185px" ReadOnly="true">
            </telerik:RadTextBox>
        </div>
        <div class="spacer">
        </div>
    </div>
    <%--Date révision--%>
    <div>
        <div class="alignLeft wdLabel wdLabelValidator">
            <telerik:RadCodeBlock ID="RadCodeBlock3" runat="server">
                <%=GetMessageEx(3163).Texte%>:
            </telerik:RadCodeBlock>
        </div>
        <div class="alignLeft wdDataInput">
            <asp:RequiredFieldValidator runat="server" ID="rfvDateRevision" ErrorMessage="*" ControlToValidate="rdpDateRevision"></asp:RequiredFieldValidator>       
            <telerik:RadDatePicker runat="server" ID="rdpDateRevision" Width="126px">
            </telerik:RadDatePicker>
        </div>
        <div class="spacer">
        </div>
    </div>
    <%--Medecin traitant--%>
    <div>
        <div class="alignLeft wdLabel wdLabelValidator">
            <telerik:RadCodeBlock ID="RadCodeBlock4" runat="server">
                <%=GetMessageEx(665).Texte%>:
            </telerik:RadCodeBlock>
        </div>
        <div class="alignLeft wdDataInput">
            <asp:RequiredFieldValidator runat="server" ID="rfvMedecin" ErrorMessage="*" ControlToValidate="cboMedecinTraitant"></asp:RequiredFieldValidator>           
            <telerik:RadComboBox runat="server" ID="cboMedecinTraitant" Width="100px" HighlightTemplatedItems="true"
                DropDownWidth="200px" AllowCustomText="true" OnClientSelectedIndexChanged="MedecinChanged">
                <ItemTemplate>
                    <div class="cboContentContener">
                        <div>
                            <b>
                                <%=GetMessageEx(209).Texte%>
                            </b>
                            <%#DataBinder.Eval(Container, "Text")%>
                        </div>
                        <div>
                            <b>
                                <%=GetMessageEx(237).Texte%>
                            </b>
                            <%#DataBinder.Eval(Container, "Attributes['Nom']")%>
                        </div>
                    </div>
                </ItemTemplate>
            </telerik:RadComboBox>
        </div>
        <div class="alignLeft wdDataInput">
            <telerik:RadTextBox runat="server" ID="txtMedecinTraitant" Width="185px" ReadOnly="true">
            </telerik:RadTextBox>
        </div>
        <div class="spacer">
        </div>
    </div>
    <%--État de divergence--%>
    <div>
        <div class="alignLeft wdLabel">
            <telerik:RadCodeBlock ID="RadCodeBlock5" runat="server">
                <%=GetMessageEx(6210).Texte%>:
            </telerik:RadCodeBlock>
        </div>
        <div class="alignLeft wdDataInput">
            <telerik:RadComboBox runat="server" ID="cboEtatDivergence" Width="291px">
            </telerik:RadComboBox>
        </div>
        <div class="spacer">
        </div>
    </div>
    <div class="wdLabel">
        <telerik:RadCodeBlock ID="RadCodeBlock6" runat="server">
            <%=GetMessageEx(335).Texte%>
        </telerik:RadCodeBlock>
    </div>
    <div style="padding: 5px;">
        <telerik:RadTextBox runat="server" ID="txtCommentaire" TextMode="MultiLine" MaxLength="2000"
            Width="432px" Height="70px">
        </telerik:RadTextBox>
    </div>
    <div class="wdFooter">
        <telerik:RadButton runat="server" ID="btnSave" Text="Ok" OnClientClicked="btnOk_OnClick">
        </telerik:RadButton>
        <telerik:RadButton runat="server" ID="btnAnnuler" Text="Annuler" OnClientClicked="btnAnnuler_OnClick">
        </telerik:RadButton>
    </div>
</div>
<telerik:RadScriptBlock runat="server" ID="sbDivergence">
 
    <script type="text/javascript">
        var oldText;
     
        function btnOk_OnClick(sender, args)
        {
            var win = $find('<%=Me.NamingContainer.BindingContainer.ClientID %>');
            if (Page_IsValid)
            {
                win.close(null);
            }
        }
 
        function btnAnnuler_OnClick(sender, args)
        {
            var win = $find('<%=Me.NamingContainer.BindingContainer.ClientID %>');
            win.close(null);
        }
 
        function IntervenantChanged(sender, args)
        {
            var item = args.get_item();
            var txtIntervenant = $find("<%=txtIntervenant.ClientID %>");
            txtIntervenant.set_value(item.get_attributes().getAttribute("Description"));
        }
 
        function MedecinChanged(sender, args)
        {
            var item = args.get_item();
            var txtMedecin = $find("<%=txtMedecinTraitant.ClientID %>");
 
            if (item != null)
            {
                txtMedecin.set_value(item.get_attributes().getAttribute("Nom"));
            }
            else
            {
                txtMedecin.set_value("");
            }
        }
         
        function TypeChanged(sender, args)
        {
            var item = args.get_item();
            var txtCommentaire = $find("<%=txtCommentaire.ClientID %>");
 
            txtCommentaire.set_value(item.get_attributes().getAttribute("Texte"));
        }
    </script>
 
</telerik:RadScriptBlock>

And my RadWindow:

<telerik:RadWindow ID="rwDivergence" runat="server" Width="470px" Height="350px"
    Modal="true">
    <ContentTemplate>
        <telerik:RadAjaxPanel runat="server" ID="diverPanel">
            <%--<GESPHARxLite_2:WinDivergence runat="server" ID="ucDiver" GridToRebind="gridMPA" />--%>
        </telerik:RadAjaxPanel>
    </ContentTemplate>
</telerik:RadWindow>

I can't find why my button only works when I put my UserControl in comment. 

Thanks.
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Oct 2012
2 answers
384 views
Kindly see my picture it describe my scenario.
Adeel
Top achievements
Rank 1
 answered on 18 Oct 2012
9 answers
223 views
I took the update to the ASP.NET AJAX controls this morning when prompted in VS 2010.  After the install no projects will open.  Winforms or Websites.  Visual Studio Encounters and error and shuts down when trying to open a project.  I re-installed VS 2010 and no luck.  I ended up having to uninstall AJAX and was able to continue working on my Winform apps but now I have no controls for my asp.net web apps.   This is a disaster.   I can't find the installs for the previous version that was running for Q2 2012.

Doug
Andrey
Telerik team
 answered on 18 Oct 2012
1 answer
185 views
Hi,
I have a radgrid that has custom filter template that consists of distinct checkboxes based on the current data. also, I have a linkbutton column that opens up a new window to edit the row. the issue im having is after a row has been edited the filter control data is not update after i call rebind.

sample grid:
lets says here's how the grid looks like when it loads

col1                          col2                     
no filter                     filter checkboxes(abc company, def company, ghi company)
edit button                abc company
edit button                def company
edit button                ghi company

then lets say u edit "abc company" to "xyz company"
then do RadGrid1.ReBind()

the "abc company" updates the gridrow perfectly to "xyz company" but the problem is the filter checkboxes remains ("abc company"..)

is there any other way to "rebind" the entire radgrid including the filter controls?

Thanks much!

                                
Rheng
Top achievements
Rank 1
 answered on 18 Oct 2012
1 answer
88 views
i am trying to get a multicolumn combo to populate but cannot get it to display correctly

the combo is as follows:-

<telerik:RadComboBox ID="comboBoxBoard" runat="server" Filter="Contains" EmptyMessage="Boarding at"
    Height="150px" Width="250px" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
    Font-Bold="true" Font-Size="120%" Font-Italic="false" CssClass="CustomRadComboxCssClass"
    Skin="50pxOffice2007" EnableEmbeddedSkins="false" ItemRequestTimeout="500" EnableVirtualScrolling="true"
    MarkFirstMatch="true" AllowCustomText="false" OnClientItemsRequesting="OnClientItemsRequesting_DubBus_Board"  >
    <WebServiceSettings Method="GetStopDataByRouteTest" Path="~/Templates/public/RoutePlannerService/RTPIWebServiceProxy.asmx"  />
    <HeaderTemplate>
        <ul>
            <li class="col1">Value</li>
            <li class="col2">No</li>
            <li class="col3">Address</li>
            <li class="col4">Location</li>
            <li class="col5">Stage</li>
        </ul>
    </HeaderTemplate>
    <ItemTemplate>
        <li class="col1">
            <%# DataBinder.Eval(Container, "Value")%>
        <li class="col2">
            <%# DataBinder.Eval(Container, "Text")%>
        <li class="col3">
            <%# DataBinder.Eval(Container, "Attributes['Address']")%>
        <li class="col4">
            <%# DataBinder.Eval(Container, "Attributes['Location']")%>
        <li class="col5">
            <%# DataBinder.Eval(Container, "Attributes['Stage']")%>
    </ItemTemplate>
</telerik:RadComboBox>



then the webservice call looks like this....

[WebMethod] // Cached for 24 hours
 public RadComboBoxData GetStopDataByRouteTest(RadComboBoxContext context)
 {
     //string route = context["Text"].ToString();
     //string direction = context["Direction"].ToString();
     //string numberOfItems = context["NumberOfItems"].ToString();
 
     string route = "1";
     string direction = "I";
     string numberOfItems = "0";
 
     try
     {
 
         RadComboBoxData comboData = new RadComboBoxData();
 
         var dtBoarding = GetStopByRouteAndDirection(route, direction);
 
 
         if (dtBoarding.Rows.Count > 0)
         {
 
             int itemsCount;
             int.TryParse(numberOfItems, out itemsCount);
 
             int itemOffset = itemsCount;
             int endOffset = Math.Min(itemOffset + ITEMS_PER_REQUEST, dtBoarding.Rows.Count);
             comboData.EndOfItems = endOffset == dtBoarding.Rows.Count;
 
             List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(endOffset - itemOffset);
             foreach (DataRow dataRow in dtBoarding.Rows)
             {
 
                 RadComboBoxItemData itemData = new RadComboBoxItemData();
 
                 string stopNumber = dataRow["StopNumber"].ToString();
                 string address = dataRow["Address"].ToString();
                 string location = dataRow["Location"].ToString();
                 string stage = (dataRow["StageNumber"].ToString() != string.Empty ? dataRow["StageNumber"].ToString() : "");
 
                 itemData.Value = stopNumber;
                 itemData.Text = stopNumber;
                 itemData.Attributes.Add("Address", address);
                 itemData.Attributes.Add("Location", location);
                 itemData.Attributes.Add("Stage", stage);
                 result.Add(itemData);
             }
 
             comboData.Message = GetStatusMessage(endOffset, dtBoarding.Rows.Count);
             comboData.Items = result.ToArray();
 
         }
 
         if (comboData.Items == null)
             comboData.Items = new RadComboBoxItemData[0];
 
         return comboData;
     }
     catch (Exception ex)
     {
         return null;
     }
 
 }


running an old version of the controls:- v2.0.50727


Any help is greatly appreciated

Cheers,
Craig



Craig
Top achievements
Rank 1
 answered on 18 Oct 2012
2 answers
111 views
I need to check for customer pricing and or volume pricing before updating grid. Why does this not work?

protected void RadCartGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
        {
            GridEditableItem editedItem = e.Item as GridEditableItem;
            
            string itemNumber = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["Itemnumber"].ToString();
            int lineID = Convert.ToInt32(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["LineID"].ToString());
            string custNum = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["CustomerNumber"].ToString();
            int qty = Convert.ToInt32(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["Quantity"].ToString());
           
            //CHECK FOR CUSTOMER PRICING OR QTY BREAK PRICING.
            updateCart.UPDateItem(itemNumber, lineID, custNum, qty);
            RadCartGrid1.Rebind();
        }

Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Oct 2012
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?