Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
713 views
Hi All!

I am using custom filter for my RadGrid (I wouldn't post the code here anymore) but my problem is, everything is working fine, but when I change page on the radGrid, it doesn't show anything , but when I click the filter button again it displays the results again 

I tried putting this on my code: 
      protected void RadGrid1_PageIndexChanged(object sender, GridPageChangedEventArgs e)
        {
            RadGrid1.CurrentPageIndex = e.NewPageIndex;
            DBcontrols.filterRadGrid();
            DBcontrols.filterRadGridUsingRange();
            RadGrid1.DataBind();
        }


still No avail, how do I retain the Databind even when changing pages? 
shakeel
Top achievements
Rank 1
Iron
 answered on 24 Jan 2024
0 answers
68 views

I am using a RadTextBox for a simple messaging form, and if the user leaves a field blank, I use a CustomValidator to set the control IsValid=true.  This is great and it uses the invalid style (pink background) and little icon and brings the user's attention to the field.

protected void valMissingFields_ServerValidate(object source, ServerValidateEventArgs args)
{
    txtMessageSubject.Text = txtMessageSubject.Text.Trim();
    txtMessageBody.Text = txtMessageBody.Text.Trim();

    txtMessageSubject.Invalid = (txtMessageSubject.Text == "");
    txtMessageBody.Invalid = (txtMessageBody.Text == "");

    args.IsValid = (!txtMessageSubject.Invalid && !txtMessageBody.Invalid);
}

I thought the InvalidStyleDuration would make it go away after a few seconds (3000 ms = 3 seconds):

<table cellspacing="0" cellpadding="0" style="width:100%;">
    <tr valign="top">
        <td style="width:90px;">
            Message:
        </td>
        <td>
            <telerik:RadTextBox ID="txtMessageBody" runat="server" 
                Width="100%" MaxLength="1000" TextMode="MultiLine" Rows="25" 
                InvalidStyleDuration="3000" 
                EnableEmbeddedSkins="false" Skin="MyCustomSkin"></telerik:RadTextBox><br />
        </td>
        <td style="width:20px; text-align:right;">
            <span class="required">*</span>
        </td>
    </tr>
</table>

But it does not.

Instead, the user is stuck typing into the text box with bright red bold lettering.  

Am I misunderstanding how this works?

As a workaround, I thought I'd use the OnClientEvents for OnValueChanging to make it switch the Invalid indication off, but apparently that event only fires when focus moves away from the control.

 

 
Peter
Top achievements
Rank 1
 asked on 22 Jan 2024
0 answers
67 views

I'm using the RadSpreadsheet component and saving it's content following this instructions here:

Telerik RadControls Access the Spreadsheet workbook on the server - Telerik UI for ASP.NET AJAX

 

So, my code behind is like this:

protected void Page_Load(object sender, EventArgs e)
{
    if (Page.IsCallback && Request.Params["__CALLBACKID"] == RadSpreadsheet1.UniqueID)
    {
        Workbook workbook = Telerik.Web.Spreadsheet.Workbook.FromJson(Request.Params["__CALLBACKPARAM"]);
        SaveWorkBook(workbook);
    }

}

 

With this code I'm able to save the spreadsheet just fine. But it's not saving the images I add using the Insert Image button (from telerik component). The images are simply not being passed through.

How can I work around that? Thank you!

 

Starshipit
Top achievements
Rank 1
 asked on 19 Jan 2024
2 answers
1.6K+ views
Hi,

I am using a RadButton in one of my aspx pages but on clicking the button, the click event is not firing.
Here is the Markup of my page.

<asp:Label ID="labelCard" runat="server" Text="Select Card Type"></asp:Label>
<asp:DropDownList ID="ddlType" runat="server" AutoPostBack="true" DataTextField='<%# Eval("Type") %>' Width="120px">
    <asp:ListItem>--Select--</asp:ListItem>
    <asp:ListItem>Type 1</asp:ListItem>  
    <asp:ListItem>Type 2</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredCardValidator1" runat="server" ErrorMessage="Please select card type" ControlToValidate="ddlType" InitialValue="--Select--" />
<asp:Label ID="labelCode" runat="server" Text="Enter Coupon Code"></asp:Label>
<asp:TextBox ID="textCode" runat="server" />
<asp:RequiredFieldValidator ID="RequiredNameValidator2" runat="server" ErrorMessage="Please enter coupon code" ControlToValidate="textCode" Display="Dynamic" />
<telerik:RadButton ID="btnCheck" runat="server" Text="Submit" OnClick="btnCheck_Click">
</telerik:RadButton>

Thanks,
Ben
David
Top achievements
Rank 1
Iron
 answered on 18 Jan 2024
1 answer
132 views
I inherited a .NET website using RadAjax.Net2.dlls. Currently only supported in IE compatibility mode from my understanding.  I would like to upgrade to a version that works in current browsers.  The website is using .NET 2.0 but we are upgrading the framework to 2.8 if possible.   I appreciate any recommendations on upgrade path.  
Rumen
Telerik team
 answered on 15 Jan 2024
1 answer
105 views

Greetings,

I am currently working on an ASP.NET WebForms application, which uses a Telerik RadTreeView.

The treeview uses has the tri state checkboxes active and gets populated server side. We first create a tree of stations (around 2500), which can contain other stations. After that, we populate the tree with datapoints by iterating over all stations and adding the datapoints with the Node.Add() Method.

So the structure is as follows:

Station
- Station 1
- Station 2
   - Station 4
      - DataPoint
      - DataPoint
   - Station 5

The checkboxes are used to show if any datapoint is already selected in the treeview and to select additional datapoints for a grouping.
There are multiple groups which can be switched between to see a different selection in the tree.

Therefore, it is necessary to add every datapoint that was already selected (and saved) to show the tri-state checkboxes correctly on page load.
After that a load on demand is possible.

What I tried so far:

  • Loading the stations and inserting the datapoints (20k objects) before adding the root node to the RadTreeView
    • Building the station tree is fast, but adding the root node to the RadTreeView Control takes about 600 seconds
  • Loading the stations and inserting the datapoints (20k objects) after adding the root node to the RadTreeView

    • Building the station tree is fast, but addings the nodes the the RadTreeView Control takes a long time

  • Loading the stations and adding the minimal amount of datapoints to display everything checked correctly with tri state checkboxes
    • Building the station tree is fast, but on every change of the grouping the tree will be walked completly to attach datapoints which were selected in the new grouping but where not present from the older groupings (or loaded on demand)

So my question is, is there a faster way to load about 20k objects into the tree, so on the change of grouping no new datapoints need to be loaded?

Or am I thinking this very wrong currently? Thank you in advance!

Vasko
Telerik team
 answered on 15 Jan 2024
1 answer
95 views

RadWindow is showing a tooltip with its ID in it. See attached image. How can I disable this?


Vasko
Telerik team
 answered on 12 Jan 2024
1 answer
107 views

Hi, my grid has many columns and some of them have very long header texts.

I already set <Resizing AllowColumnResize="true" AllowResizeToFit="true" ResizeGridOnColumnResize="true"  />

However the header text are still clipped.

I would like to set the long header text to be shown as whole instead of clipped.

Please help! Thanks!

 

 

 

 

Vasko
Telerik team
 updated answer on 10 Jan 2024
9 answers
265 views
Hello,

Putting a calendar control in a center pane with vertical & horizontal splitters:

I would like to understand if the calendar control can be forced to expand horzontally (taking up 100% of width at all times) as the vertical splitter bar expands. It appears the calendar does grow vertically as the horizontal splitter bar expands.

Thanks!
Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 09 Jan 2024
2 answers
805 views
Hi i have a tab strip & a number of page views associated with it.

what i've also got is some .net buttons which allow the user to also navigate through the tabs if they wish, like a next and previous.

I'd like to disable the previous button when the user is on the first tab and disable the next button when they're on the last tab.

hopefully that makes sense, i want to do this without having to do a postback which i'm sure is possible.

I suppose it would be some code that goes into the buttons Enabled attribute, something like Enabled=' if currenttab = firsttab then false else true' in the example of the 'previous' button.

Many thanks

Alan
Rumen
Telerik team
 updated answer on 08 Jan 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?