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

Has anyone tried using ESRI shape files as a datasource to populate the shapes layer?  We have a considerable number of geographical boundaries and point locations stored in ESRI shape files and would like to see if there is a reasonably simple way to use them to populate the shapes layer in the Telerik map control. 
Raymond
Top achievements
Rank 1
 answered on 07 Oct 2014
2 answers
128 views
Folks, using UI for ASP.NET AJAX Q2 2014 SP1 with VS 2010.

In My Radgrid, I have Cancel Confirm both for Parent and Child Grid. Cancel Confirm works well in Parent Grid. Not an issue there.

But in Child Grid,  Cancel Confirm does not work; edit form stays open. AllowAutomaticInserts="false" AllowAutomaticUpdates = "false" in Child Grid.

Below is my client side code.

function confirmCancelBackFnChild(arg) {
               // var grid = $telerik.findControl(document.body, "RadGrid2");
               var grid = $find("<%= RadGrid1.ClientID %>");
               if (arg)
               {
                   var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                   var detailTable = grid.get_detailTables()[0];
                   var detailtableName = detailTable.get_name();
 
                   // alert(detailtableName);
                   document.getElementById('<%=HiddenField1.ClientID%>').value = "true";
 
                   // detailTable.fireCommand("CancelConfirmed", 0);
                   detailTable.fireCommand("CancelConfirmed", String.Empty);
 
               }
 
               else
               {
 
                   document.getElementById('<%=HiddenField1.ClientID%>').value = "false";
 
               }
 
               document.getElementById('<%=HiddenField1.ClientID%>').value = "false";
           }


Below is my Item command for the Command for the Child Grid.

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
    {
        RadGrid grid = (source as RadGrid);
         
        if (true && e.Item.OwnerTableView.Name == "DemographicsDependants") // Child Table
        {
            switch (e.CommandName)
            {
                case "Cancel":
                    int searchlocation = 0;
                    string[] retrievedLocations = (string[])Session["LocationData"];
                    Array.Sort(retrievedLocations);
 
                    string location = Session["SessionOtherInfoFacilityName"].ToString().Trim();
                    searchlocation = Array.BinarySearch(retrievedLocations, location);
 
                    //  if (HiddenField1.Value == "false" && searchlocation >= 0)
                    if (HiddenField1.Value == "false")
                    {
                        e.Canceled = true;
                        Session["savedIndex"] = e.Item.ItemIndex;
                        RadWindowManager1.RadConfirm("Continue with Cancel in Child Table? Warning, you will loose any unsaved work!!!", "confirmCancelBackFnChild", 350, 150, null, "Cancel Confirm");
                    }
                    break;
                case "CancelConfirmed":
                    foreach (GridEditableItem item in RadGrid1.MasterTableView.DetailTables[0].GetItems(GridItemType.EditFormItem))
                    {
                        if (item.IsInEditMode && item.ItemIndex == (int)Session["savedIndex"])
                        {
                            item.FireCommandEvent("Cancel", String.Empty);
                        }
                    }
                    // HiddenField1.Value = "false";
                      
                    break;
            }
        }
    }


Thanks for any Help.

gc_0620










gc_0620
Top achievements
Rank 1
 answered on 07 Oct 2014
1 answer
106 views
Hi,

I am trying to use a PanelBar from one of the samples.
I need just one panel to make it a collapsible panel for advanced options.

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" >
    <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="100%">
        <Items>
            <telerik:RadPanelItem Expanded="false" Text="Advanced Settings" runat="server">
                <Items>
                    <telerik:RadPanelItem Value="AccountInformation" runat="server">
                        <ItemTemplate>
[I have a table here]
                        </ItemTemplate>
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
        </Items>
    </telerik:RadPanelBar>
</telerik:RadAjaxPanel>

I can click on the panelBar to extend it, but it does not want to collapse.

Is the PanelBar the correct control for this ?
Or am I doing something wrong ?

Mickael
Top achievements
Rank 1
 answered on 07 Oct 2014
3 answers
117 views
Hello everybody,

i use the telerik RadScheduler and the Timeline-View.

I will export the current view to PDF. The HTML-View shows all correct.
In the PDF the inline row of the timeline is smaller then the vertical headers. (Take a look to the Attachment)

The html and pdf have the same css files.

My C# code:
RadScheduler1.ExportSettings.Pdf.PaperSize = SchedulerPaperSize.A4;
RadScheduler1.ExportSettings.Pdf.PaperOrientation = SchedulerPaperOrientation.Landscape;
 
RadScheduler1.ExportSettings.Pdf.PageTopMargin = Unit.Parse("10mm");
RadScheduler1.ExportSettings.Pdf.PageBottomMargin = Unit.Parse("10mm");
RadScheduler1.ExportSettings.Pdf.PageLeftMargin = Unit.Parse("10mm");
RadScheduler1.ExportSettings.Pdf.PageRightMargin = Unit.Parse("10mm");
RadScheduler1.ExportSettings.Pdf.AllowPaging = true;
RadScheduler1.RowHeaderWidth = Unit.Parse("45mm");
RadScheduler1.Width = Unit.Parse("200mm");
 
SqlDSEmployee.SelectCommand = sql();
SqlDSEmployee.DataBind();
 
RadScheduler1.ExportToPdf();


My aspx:

<ExportSettings OpenInNewWindow="True">
             <Pdf PageTopMargin="10mm" PageBottomMargin="10mm" PageLeftMargin="10mm" PageRightMargin="10mm"
                    PaperSize="A4" StyleSheets="Content/StylePDF.css">
            </Pdf>
</ExportSettings>

What can I do? Is this a problem with the PDF-Exporter?

Best regards
Tobias
Plamen
Telerik team
 answered on 07 Oct 2014
1 answer
127 views
Hi,

i have two problems with a grid in batch editing mode and RadDropDownList inside the grid. I set the databinding in code behind for both. The databinding of the RadDropDownList  is in the prerender section of the grid:

protected void rgPmls_PreRender(object sender, EventArgs e)
{RadDropDownList rcbCarrier =    (RadDropDownList)rgPmls.FindControl(rgPmls.MasterTableView.ClientID + "_CarrierId").FindControl("rcbCarrier");

Carrier getCarrier = new Carrier();
rcbCarrier.DataSource = getCarrier.GetCarrier();
rcbCarrier.DataTextField = "Carrier";
rcbCarrier.DataValueField = "CarrierId";
rcbCarrier.DataBind();
}

Here is the grid:

<telerik:RadGrid ID="rgPmls" runat="server" AllowAutomaticDeletes="True"
           AllowAutomaticInserts="True" Skin="Windows7" OnItemInserted="rgPmls_ItemInserted"
           OnItemUpdated="rgPmls_ItemUpdated" AllowAutomaticUpdates="True" AllowPaging="True"
           AutoGenerateColumns="False" Width="1650px" OnBatchEditCommand="rgPmls_BatchEditCommand" Culture="de-DE"  OnItemCommand="rgPmls_ItemCommand" OnNeedDataSource="rgPmls_NeedDataSource" OnPreRender="rgPmls_PreRender">
           <MasterTableView CommandItemDisplay="Top" DataKeyNames="LoadingscheduleId"
               HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False">
               <BatchEditingSettings EditType="Cell" />
<Columns>
<telerik:GridTemplateColumn HeaderText="Reeder" HeaderStyle-Width="110px" UniqueName="CarrierId" DataField="CarrierId">
    <ItemTemplate>
        <%# Eval("Carrier") %>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadDropDownList runat="server" ID="rcbCarrier" DataValueField="CarrierId"
            DataTextField="Carrier" Width="100">
        </telerik:RadDropDownList>
    </EditItemTemplate>
    <HeaderStyle Width="110px" HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
</Columns>
<ClientSettings AllowKeyboardNavigation="true">
<Scrolling AllowScroll="True" FrozenColumnsCount="3" UseStaticHeaders="True" />
</ClientSettings></telerik:RadGrid>

The databinding works fine and I can see all the items in the RadDropDownList. But I have the problems when I update the grid:

First problem: When I update the grid in batch editing mode all works fine at the first time and i get the selectedvalues of the RadDrobDownList. When I update
the grid a second time with a new seleted item, I get no value back.

Second problem: When the RadDropDownList has only one item, I also get no value back

What do I forget?

Thx for help.

Regards Thomas
Angel Petrov
Telerik team
 answered on 07 Oct 2014
5 answers
243 views
Hi,
I am evaluating Telerik to replace some controls we have for our project.

We are using a RadSearchBox, and when the user select an entry, based on the entry different things can happen.
One of them is that a popup open with a label inside displaying the user entry name.

So far I have the following

ASP
<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server">
<telerik:RadSearchBox
    ID="RadSearchBox1"
    runat="server"
    Width="300px"
    EmptyMessage="Search..."
    OnClientSearch="aspButtonCallbackFn"
    ShowSearchButton="true">
    <DropDownSettings Height="400" Width="300" />
    <WebServiceSettings Path="Main.aspx" Method="GetResults" />
</telerik:RadSearchBox>
 
<asp:Button runat="server" ID="Button6" OnClick="Button1_Click" Style="display: none" />
<script type="text/javascript" language="javascript">
    function aspButtonCallbackFn() {
        __doPostBack('<%=Button6.UniqueID%>', "");
    }
</script>
</telerik:RadAjaxPanel>
 
<telerik:RadWindow
    ID="modalPopup"
    runat="server"
    Width="360px"
    Height="360px"
    Modal="true">
    <ContentTemplate>
        <div style="height:100px; width:300px; text-align:center;">
            <asp:Table runat="server">
                <asp:TableRow>
                    <asp:TableCell ColumnSpan="2">
                        <asp:Label
                            ID="Lbl_Pnl_ForAdd"
                            runat="server"
                            Text="" />
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell HorizontalAlign="Center">
                        <asp:Button
                            ID="Bttn_Add"
                            Width="100"
                            OnClick="Bttn_Add_Click"
                            Text="Add"
                            runat="server"
                            class="button" />
                    </asp:TableCell>
                    <asp:TableCell HorizontalAlign="Center">
                        <asp:Button
                            ID="Bttn_Cancel_ForAdd"
                            Width="100"
                            OnClick="Bttn_Cancel_ForAdd_Click"
                            Text="Cancel"
                            runat="server"
                            class="button" />
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </div>
    </ContentTemplate>
</telerik:RadWindow>
telerik:RadSearchBox
    ID="RadSearchBox1"
    runat="server"
    Width="300px"
    EmptyMessage="Search..."
    OnClientSearch="aspButtonCallbackFn"
    ShowSearchButton="true">
    <DropDownSettings Height="400" Width="300" />
    <WebServiceSettings Path="Main.aspx" Method="GetResults" />
</telerik:RadSearchBox>
 
<asp:Button runat="server" ID="Button6" OnClick="Button1_Click" Style="display: none" />
<script type="text/javascript" language="javascript">
    function aspButtonCallbackFn() {
        __doPostBack('<%=Button6.UniqueID%>', "");
   }
</script>

<telerik:RadWindow
   ID="modalPopup"
runat="server"
Width="360px"
Height="360px"
Modal="true">
<ContentTemplate>
<div style="height:100px; width:300px; text-align:center;" class="popup_Container">
<asp:Table runat="server">
<asp:TableRow>
<asp:TableCell ColumnSpan="2">
<asp:Label
ID="Lbl_Pnl_ForAddExistingInterest"
runat="server"
Text="" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell HorizontalAlign="Center">
<asp:Button
ID="Bttn_Add_ForAddExistingInterest"
Width="100"
OnClick="Bttn_Add_ForAddExistingInterest_Click"
Text="Add"
runat="server"
class="button" />
</asp:TableCell>
<asp:TableCell HorizontalAlign="Center">
<asp:Button
ID="Bttn_Cancel_ForAddExistingInterest"
Width="100"
OnClick="Bttn_Cancel_ForAddExistingInterest_Click"
Text="Cancel"
runat="server"
class="button" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</ContentTemplate>
</telerik:RadWindow>

C#
[WebMethod]
public static SearchBoxData GetResults(SearchBoxContext context)
{
    return SQLAccess.Instance.Search(context.Text);
}
 
protected void Button1_Click(object sender, EventArgs e)
{
    try
    {
        string selectedData = RadSearchBox1.Text;
        Lbl_Pnl_ForAddExistingInterest.Text = String.Format("Do you want to add {0}?", selectedData);
        RadAjaxPanel2.ResponseScripts.Add(String.Format("$find('{0}').ajaxRequest();", RadAjaxPanel2.ClientID));
 
        string script = "function f(){$find(\"" + modalPopup.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
        ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
   }
}

Any help would be welcomed.
Mickael
Top achievements
Rank 1
 answered on 07 Oct 2014
4 answers
121 views
Does Telerik provide Radar Chart for ASP.Net Web.
I am checking this post www.telerik.com/forums/radar-chart-update but I thing it showing that it does not support for ASP.Net web, but supporting for WPF, Silverlight etc
.
Can anybody help me.
Anjan Kant
Top achievements
Rank 2
 answered on 07 Oct 2014
1 answer
154 views
I have a radgrid that displays number values'

Is it possible to scan the entire grid and highlight all cells who's value is great than say 100?
Konstantin Dikov
Telerik team
 answered on 07 Oct 2014
1 answer
162 views
Is there a way to disable the text box visually and from editing using javascript? I was using the radComboBox and it had the .disable() & .enable() functions. I see AutoCompleteBox has the set_enabled(i) however the control appearance is still enabled.
Nencho
Telerik team
 answered on 07 Oct 2014
1 answer
200 views
Hello all..

I have the following peculiar problem.

aspx
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
          </telerik:RadWindowManager>

<telerik:RadNotification ID="n1" runat="server" Text="" Position="Center"
    AutoCloseDelay="5000" Width="450" Title="" KeepOnMouseOver="true"
    EnableRoundedCorners="true" Animation="Resize" ContentIcon="warning"
    AnimationDuration="700" TitleIcon="none" Font-Size="12px" Font-Bold="True"
    ShowCloseButton ="true">
</telerik:RadNotification>

vb
  Protected Sub grdTenders_DeleteCommand(sender As Object, e As GridCommandEventArgs)

     ... code to set the value of <res> below

    If res = 1 Then
      n1.Title = "Error Deleting"
      n1.Text = "Cannot delete this tender. It has been sent out to at least 1 Manufacturer!"
      n1.Show()
      Exit Sub
    End If

...and further down

Protected Sub grdTenDetails_ItemCommand(sender As Object, e As GridCommandEventArgs)

     ... again code to set the value of res below

    If res = 1 Then
      n1.Title = "Error Editing"
      n1.Text = "Cannot Edit this tender. It has been sent out to at least 1 Manufacturer!"
      n1.Show() 
        e.Canceled = True
        Exit Sub
      End If


The first notification works fine.
The second time the notification should be shown (on the second sub) the window pops up without title or text!
It is functional, but the values for <title> and <text> remain the default ones (empty)
I stopped the code in n1.Show() and the values are correct. Then I continue the code and still no text/title.

I even tried to add another notification (r2) on the page and changed the code on the second sub, but still the second window comes up empty!


Any information would be appreciated...




Marin Bratanov
Telerik team
 answered on 07 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?