Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
57 views
Im working off this example,
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/basic-filtering/defaultcs.aspx

The only difference is that my grid is inside an ajaxpanel.  Everything is getting loaded correctly, the dropdowns are populated, but when I make a selection in the dropdown, there is a script error generated and the filter is not performed.  Do I need to disable ajax on the request somehow as in the example for the grid export?

http://localhost:59456/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:fa6755fd-da1a-49d3-9eb4-1e473e780ecd:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2014.2.724.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:6915a8c2-c063-435a-ab31-d2d2285652a6:16e4e7cd:f7645509:24ee1bba:2003d0b8:f46195d3:88144a7a:1e771326:e524c98b:ed16cbdc:6b3f73b3:58366029:ccd65cf8:aa288e2d:258f1c72:e330518b:c128760b:c8618e41:e4f8f289:1a73651d:333f8d94

0x800a139e - Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Selection out of range


Parameter name: value





BitShift
Top achievements
Rank 1
Veteran
 answered on 24 Sep 2014
1 answer
126 views
Currently we are have visual studio 2008 asp.net solution
which uses telerik controls  while upgrading to Visual studio 2013
solution the controls and its values don’t render as required .

Please help let us know how shall we upgrade solution to
Visual studio 2013 .

Aneliya Petkova
Telerik team
 answered on 24 Sep 2014
1 answer
214 views
Hello,


I've been trying to implement the validation for batch edit and I can not get  it to work for some reason. I tried the following demo on my local machine and it is not firing the validation. Can you let me know if I need to set something on web.config or what could be possibly reason that it is not firing the validation? 

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

Thanks

Here is my code

<telerik:RadGrid ID="RadGrid1" AllowAutomaticInserts="True" AllowAutomaticUpdates="true"   runat="server" OnBatchEditCommand="RadGrid1_BatchEditCommand" AutoGenerateColumns="false" OnNeedDataSource="RadGrid1_NeedDataSource">
    <MasterTableView EditMode="Batch" CommandItemDisplay="TopAndBottom" DataKeyNames="MaterialID" HorizontalAlign="NotSet"  AutoGenerateColumns="false">
        <BatchEditingSettings OpenEditingEvent="Click" EditType="Row" />

         <Columns>
              <telerik:GridTemplateColumn HeaderText="Rental" DataField="IsMaterialRental" UniqueName="IsMaterialRental">
                
                  <ItemTemplate>  <%# Eval("IsMaterialRental") %> </ItemTemplate>
                  <EditItemTemplate>
             <telerik:RadComboBox ID="DeckMaterial_RadComboBoxRental"  runat="server" AllowCustomText="true" MarkFirstMatch="true" >
<Items>
<telerik:RadComboBoxItem Text="No" Value="0" />
<telerik:RadComboBoxItem Text="Yes" Value="1" />
</Items>
</telerik:RadComboBox>                      
         <asp:RequiredFieldValidator ID="DeckMaterial_RequiredFieldValidatorRental" runat="server" Text=""   ControlToValidate="DeckMaterial_RadComboBoxRental"  ></asp:RequiredFieldValidator>                                                          
                  </EditItemTemplate>
              </telerik:GridTemplateColumn>

              <telerik:GridTemplateColumn HeaderText="High Value" DataField="HighValueID" UniqueName="HighValueName">
                  <ItemTemplate>  <%# Eval("HighValue") %> </ItemTemplate>
                  <EditItemTemplate>
                        <telerik:RadComboBox   ID="DeckMaterial_RadComboBoxHighValue"  runat="server" AllowCustomText="true" MarkFirstMatch="true">                             
                        </telerik:RadComboBox>
                  </EditItemTemplate>
              </telerik:GridTemplateColumn>


               <telerik:GridTemplateColumn HeaderText="Quantity" DataField="Quantity" UniqueName="Quantity">                   
                   <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("Quantity") %>'></asp:Label> </ItemTemplate>
                   <EditItemTemplate>
     <telerik:RadNumericTextBox ID="DeckMaterial_RadTextBoxQty" runat="server">
<NumberFormat GroupSeparator="" DecimalDigits="0" />
     </telerik:RadNumericTextBox>
                        
                       <asp:RequiredFieldValidator ID="RequiredFieldValidator_Qty" runat="server" ControlToValidate="DeckMaterial_RadTextBoxQty"   Display="Dynamic" ErrorMessage="Required"></asp:RequiredFieldValidator>

                   </EditItemTemplate>
               </telerik:GridTemplateColumn>

             <telerik:GridBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description" >

                        <ColumnValidationSettings EnableRequiredFieldValidation="true">
                            <RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
                            </RequiredFieldValidator>
                        </ColumnValidationSettings>
             </telerik:GridBoundColumn>

             <telerik:GridTemplateColumn HeaderText="Category" HeaderStyle-Width="180px" UniqueName="CategoryID" DataField="CategoryID">
                        <ItemTemplate>
                            <%# Eval("Category") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="RadComboBox_Category" runat="server"></telerik:RadComboBox>
                        </EditItemTemplate>
             </telerik:GridTemplateColumn>

         </Columns>
        
    </MasterTableView>
    <ClientSettings    AllowKeyboardNavigation="true">
    </ClientSettings>
</telerik:RadGrid>
Konstantin Dikov
Telerik team
 answered on 24 Sep 2014
1 answer
91 views
I know this topic has come up a lot but I haven't seen anything recently. Has anyone figured out how to ajaxify a google map inside a RadAjaxPanel? I just want my map not to disappear after every request.
Maria Ilieva
Telerik team
 answered on 24 Sep 2014
1 answer
121 views
Hi,

I have a question to build a wizard exactly like this:

http://www.fenster24.de/

Would radPanelBar be the right point to start?
I tried to make a setup with ContentTemplate and HeaderTemplate but run into several issues:

Load parameter data from database into the templates;
Persist data on F5

Would it be a better choice to start with a simple Repeater and add Accordion effects after that with JQuery?

Marc

Plamen
Telerik team
 answered on 24 Sep 2014
1 answer
191 views
Hi there,

I have been using the Upload control for quite a while now using my own custom AsyncUploadResult class.
What happens now is unexpected as I'm trying to save the absolute path to the uploaded file into a string variable and this ends up in a error thrown statint the escape sequence is not recognized. See below :

My custom upload class :
1.public class DataUploadResult : AsyncUploadResult
2.    {
3.        private string sourceFilePath;
4.        public string SourceFilePath { get { return this.sourceFilePath; } set { this.sourceFilePath = value; } }
5.    }

My UploadHandler:
1.protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
2.        {
3.            DataUploadResult result = CreateDefaultUploadResult<DataUploadResult>(file);
4.            result.SourceFilePath = string.Format(@"{0}\{1}", configuration.TempTargetFolder, tempFileName);
5.        }
            return result;

And my FileUploaded event Handler;
1.protected void RauDataUpload_OnFileUploaded(object sender, FileUploadedEventArgs e)
2.    {
3.            DataUploadResult result = e.UploadResult as DataUploadResult;
4.    }

And it fails on row 3 with the following error message:
"Exception has been thrown by the target of an invocation."
Unrecognized escape sequence. (430): {"SourceFilePath":"C:\Dev\NRP\NRP\Study\UploadTemp\1411349019322101001_20140410-125730_PTAP.sld"}

Is this a bug or am I doing something wrong ?

Obviously I trimmed my code for my example here, the actual Custom Upload result embeds 19 variables and everything worked perfectly until I add this SourceFilePath string to it.

Any clue ? Looks like '\' isn't supported.

Cheers,

Chris

Hristo Valyavicharski
Telerik team
 answered on 24 Sep 2014
3 answers
145 views
Hello,

how can I configure the radGrid so that the columns geht automaticly the width so that all data are shown without a break.

Herer is the code

    <rc:TelerikGrid AutoSave="false" ID="RadGrid1" runat="server" SkinID="List" DataSourceID="" 
        AllowSorting="false" Width="100%" AutoGenerateColumns="true" ShowGroupPanel="false"   
        ShowFooter="false" AllowPaging="false" PageSize="20"  enableajax="false"   
        GroupingEnabled="false" AllowFilteringByColumn="true" ToolTip="false">  
        <ClientSettings AllowDragToGroup="false" AllowExpandCollapse="false" AllowGroupExpandCollapse="false" > 
            <Scrolling ScrollHeight="460px" SaveScrollPosition="false" /> 
            <ClientEvents OnMasterTableViewCreated="hide_MasterApp_Updateprogress" /> 
        </ClientSettings> 
        <HeaderStyle  Width="150" Wrap="true" /> 
        <ItemStyle Wrap="false" />   
        <MasterTableView CssClass="MasterTable" CommandItemDisplay="None"   
            GroupLoadMode="Server">  
            <RowIndicatorColumn UniqueName="RowIndicator" Visible="false">  
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
        </MasterTableView> 
    </rc:TelerikGrid> 
Venelin
Telerik team
 answered on 24 Sep 2014
1 answer
127 views
Hi, in SearchBox, when the field being searched is a date, we would like to be able to search via the 'smart parsing engine' of DateInput.  Is that possible today, or can you please add it to a future version?
Angel Petrov
Telerik team
 answered on 24 Sep 2014
3 answers
254 views
We are modifying the RAD grid for Sharepoint and are running into a problem.   We need to change the default filter text box to a drop down combo box for some of the columns like you see in the demo: http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx 

With the SharePoint control, you have to set the filter template in the GridFilteringItem class.   However, when we add the code below, the button is showing but the grid does not refresh and filter based on the combo box selection.   The filters for the other columns are working fine.   It appears that the event to filter the grid is not firing, but it is difficult to tell.

Does anyone have simple sample code or ideas that would help?

         if (e.Item is GridFilteringItem)
           {
               GridFilteringItem aSystemFilteringItem = e.Item as GridFilteringItem;
               //((Telerik.Web.UI.GridTableCell)(aSystemFilteringItem["System"])).Controls.Clear();

               Button btnTest = new Button();
               btnTest.Text ="CLick Me";
               btnTest.Click += btnTest_Click;
               ((Telerik.Web.UI.GridTableCell)(aSystemFilteringItem["System"])).Controls.Add(btnTest);

               RadComboBox aSystemFilterDropDown = new RadComboBox();
               aSystemFilterDropDown.ID = "ProcessFilterDropDown";
               aSystemFilterDropDown.Width = Unit.Pixel(150);
               aSystemFilterDropDown.Items.Add(new RadComboBoxItem("", ""));
               aSystemFilterDropDown.Items.Add(new RadComboBoxItem("CGE", "CGE"));
               //aSystemFilterDropDown.SelectedIndexChanged += aSystemFilterDropDown_SelectedIndexChanged;
               aSystemFilterDropDown.OnClientSelectedIndexChanged = "SystemIndexChanged";
               aSystemFilterDropDown.AutoPostBack = true;

               ((Telerik.Web.UI.GridTableCell)(aSystemFilteringItem["System"])).Controls.Add(aSystemFilterDropDown);

               string script = "<script type=\"text/javascript\">";
               script = script + "function SystemIndexChanged(sender, args) {alert('entered'); ";
               script = script + "var tableView = $find(\"" + ((GridItem)e.Item).OwnerTableView.ClientID + "\");";
               script = script + "tableView.filter(\"System\", args.get_item().get_value(), \"EqualTo\");";
               script = script+   "}";
               script = script + "</script>";

               LiteralControl scriptLtControl = new LiteralControl(script);
               RadScriptBlock radscript = new RadScriptBlock();
               radscript.Controls.Clear();
               radscript.Controls.Add(scriptLtControl);

               ((Telerik.Web.UI.GridTableCell)(aSystemFilteringItem["System"])).Controls.Add(radscript);

           }
Ted
Top achievements
Rank 1
 answered on 24 Sep 2014
3 answers
190 views
Hello forum

I hope you can help me out on this problem.

I have a radtextbox in which I want to select part of the text using client .selectText.

I build the client function and it works fine.

Now I want to fire the clientfunction from server-side , so i implement a "ScriptManager.RegisterStartupScript" and everything is still OK.

Then I wrap it all in radajaxpanel, whereafter my server functions fire ok , but now cant detect my radtextbox.
(  my clientbutton still runs fine.)


How do I call my clientscript correct from serverside, to be able to still detect my radtextbox?

Regards
Mark

my base code is: 

   <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">  
    <telerik:RadScriptBlock ID="myscriptblock" runat="server">      
        <script type="text/javascript">

     function test() {

         var tb = $find("mytxt");
         alert(tb);          
         tb.selectText(3, 6);
         return false;
      
     }
    
        </script>
    </telerik:RadScriptBlock>
         <telerik:RadTextBox ID="mytxt" ClientIDMode="Static" Runat="server"  Text="1 2 3 4 5 6 7 8 9" >
         </telerik:RadTextBox>
         <button runat="server" id="mybutton" onclick="test();return false;">findpos</button>         
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />   
    </telerik:RadAjaxPanel>
 </form>

cs:----------------------------------------------------------------------------------------
 protected void Button1_Click(object sender, EventArgs e)
    {
        ScriptManager.RegisterStartupScript(this, this.GetType(), "eScript", "test();", true); 
    }














Mark
Top achievements
Rank 1
 answered on 24 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?