Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
431 views
Hi,

      I have a requirement like, I should accept any string which does not contain some special characters like @,*,& etc. Actually i should block the user from typing these character.
Similar behavior as the unit price text box in this example
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx.

At the same time i should display some error message to the user about the blocking action. I am bit confused of acheiving this through radinputmanager and a asp text area control.

I tried setting the telerik:RegExpTextBoxSetting tag with the right regular expression, validation message and the control id, but the validation happens only on click of any button.
This is the link i used as reference http://www.telerik.com/help/aspnet-ajax/using_radinputmanager.html

Kindly help me with some code snippets.

Regards,
Saravanan K
Shinu
Top achievements
Rank 2
 answered on 24 Jun 2010
1 answer
168 views
I'm using the following demo to load Combo items from a DB which I don't have linked to an Entity model (so old command query).

 
    [WebMethod(CacheDuration = 0)] 
    public RadComboBoxItemData[] LoadMedportalUsers(RadComboBoxContext context) { 
        IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context; 
        string filterString = ((string)contextDictionary["FilterString"]).ToLower(); 
 
        SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["myDB"].ConnectionString); 
 
         
        SqlCommand selectCommand = new SqlCommand(@" SELECT UserID, UserName FROM Aspnet_Users
                                                     WHERE LOWER(UserName) LIKE '%" + filterString + "%'", connection); 
 
        SqlDataAdapter adapter = new SqlDataAdapter(selectCommand); 
        DataTable users = new DataTable(); 
        adapter.Fill(users); 
 
        List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(users.Rows.Count); 
 
        foreach (DataRow row in users.Rows) { 
            RadComboBoxItemData itemData = new RadComboBoxItemData(); 
            itemData.Text = row["UserName"].ToString(); 
            itemData.Value = row["UserID"].ToString(); 
            result.Add(itemData); 
        } 
        return result.ToArray(); 
    } 

We have about 3000 users in the AspNet_Users table...so this throws:
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Is there perhaps a way to tweak to allow the dynamic loading?

Any way around that?


Simon
Telerik team
 answered on 24 Jun 2010
3 answers
100 views
Hi,

I am trying to set a controls value, based on values sent from one listbox to the other. I have set up code to find the control in the ontransferred event of the listboxes. Currently I am using the findcontrol method of listbox that the item is being sent to, then I try to find the control by the ID. When the code runs though the control is being set to a null value instead of the control in the listbox.

Thanks,
jonathan
Yana
Telerik team
 answered on 24 Jun 2010
1 answer
78 views
I'm having issues running RadScriptManager on a page that's uisng the RadGridView.  If I use the regular ScriptManager I get javascript errors and the GridView does not let you select rows.  If I switch to the RadGridView I get this:

Object reference not set to an instance of an object.


[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.RadMenuUtils.RadControl.GetUpdatingUpdatePanel(Control target) +101
   Telerik.RadMenuUtils.RadControl.IsInAjaxUpdatePanel(Control target) +50
   Telerik.RadMenuUtils.RadControl.Page_PreRenderComplete(Object sender, EventArgs e) +21
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8698542
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1029
Maria Ilieva
Telerik team
 answered on 24 Jun 2010
5 answers
125 views
I have a web page using the RadTreeView and it has some data. I have a add and Edit button to edit the contents of the tree.

This all works fine with IE and firefox.

With safari, when I click the buton, the tree look changes. Instead of the + icon, I get dot icon. It all works but the look gets distorted. (the tree node changes from + to .)
Kamen Bundev
Telerik team
 answered on 24 Jun 2010
4 answers
184 views
i have a radgrid
dynamic create columns, in function to dataset returned from db, this grid show ok but when i export to excel..   dont show column titles (column headers)
i asign values for  UniqueName, HeaderText, DataField  etc...
i export using this code..
        gdw.ExportSettings.FileName = "MyXlsFile"
        gdw.ExportSettings.OpenInNewWindow = True
        gdw.ExportSettings.IgnorePaging = True
        gdw.ExportSettings.HideStructureColumns = True
        gdw.ExportSettings.Excel.Format = GridExcelExportFormat.Html
        gdw.MasterTableView.ExportToExcel()


whats wrong.??
Daniel
Telerik team
 answered on 24 Jun 2010
3 answers
101 views
Hello

I am working on line graph and came across this issue which I could not resolve, hopefully someone can answer me on this

Referring to the attached part of my graph, i am trying to label the highest point using marked zone

However, depending on the dynamic value of my points, there will be situations where the label will be overlapped below the line

I tried:

  • myMarkedZone.Label.TextBlock.BringToFront(), and radChart.save() failed
  • myMarkedZone.Label.TextBlock.Appearance.FillStyle.MainColorOpacity = 50, and was told that this property is ReadOnly
  • myMarkedZone.Label.TextBlock.Appearance.Position.Auto = true, and it appears to be positioned TopLeft

Can anyone enlighten me on how to resolve this issue?

Thanks!
Ves
Telerik team
 answered on 24 Jun 2010
1 answer
99 views
I had a problem .When I print everything comes properly except "Select " text next to each rad combo box.The same to RadDatePicker("Auto generated "open the calendar popup" text next to RadDatePicker").
I put my screenshots attached.I hope reply as soon as possible.Thanks.
<td>
        <telerik:RadDatePicker ID="dpkDate" runat="server">
        </telerik:RadDatePicker>
</td>
<td>         
<telerik:RadComboBoxID="cbxClientCode" runat="server" AutoPostBack="true" OnItemDataBound="cbxClientCode_OnItemDataBound" EnableLoadOnDemand="true" OnSelectedIndexChanged="cbxClientCode_SelectedIndexChanged" OnItemsRequested="cbxClientCode_ItemsRequested"  >
  </telerik:RadComboBox>
</td>
Simon
Telerik team
 answered on 24 Jun 2010
1 answer
173 views

I have a RadWindow1 (url: Page2.aspx) that is opened from Page1.aspx.  When a user clicks on a button on the RadWindow1, I want to remove the Move feature from the RadWindow1.  When I try to reference RadWindow1 from Page2.aspx.vb, it returns Nothing. How can I reference RadWindow1?



I have a RadWindow1 (url: Page2.aspx) that is opened from Page1.aspx.  When a user clicks on a button on the RadWindow1, I want to remove the Move feature from the RadWindow1.  When I try to reference RadWindow1 from Page2.aspx.vb, it returns Nothing.  Here is the code I have tried:

        'Dim window_ProductCode As RadWindow = PreviousPage.FindControl("window_ProductCode")

        '------------------

        'If PreviousPage IsNot Nothing Then
           'Dim windowMgr As RadWindow = PreviousPage.FindControl("RadWindowManager1")
           'window_ProductCode.Behaviors = WindowBehaviors.None
        'End If

       '------------------

        'Dim window_ProductCode As RadWindow = Page.Parent.FindControl("RadWindowManager1")
Shinu
Top achievements
Rank 2
 answered on 24 Jun 2010
1 answer
99 views

I am using telerik rad controls.. for example radGrid.. here the two different ways to use this I am seeing and confused between those..

<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
 <RadG:RadGrid ID="RadGrid1" GridLines="None" runat="server" ></RadG:RadGrid>

OR

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" > </telerik:RadGrid>

For example I know that snerious that working first one just fine but for example for this one I am trying to get this work http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx   with using RadG it is saying for example  RadNumericTextBox is not know element...  If I use telerik one, that time still giving error.. so I am confused ..

Vinkel
Top achievements
Rank 1
 answered on 24 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?