Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
335 views
Sirs:
I'm trying to code server side validation like you document here:
http://www.telerik.com/help/aspnet/grid/grdvalidation.html
under the 'Adding a validator to EditItemTemplate of GridTemplateColumn' section.

I'm trying to get the code to use a ValidationSummary control so I can show a more detailed error message at the top of the grid. Is this possible?



Steve Gray
Top achievements
Rank 1
 answered on 08 Apr 2011
2 answers
102 views
I'm creating a couple of datepickers programatically and I'm adding them to Panel object. I'm trying to add an attribute to the datepickers when they're created to run a JavaScript that opens the calendar when the input box of the date picker is clicked. This works great for datepickers that I've created on the client side and add this attribute server side, but when I create the datepickers server side, I'm not getting the full ClientID.

here is how I'm creating the datepickers and setting the attributes:
Panel edpanelContent = new Panel();
edpanelContent.Attributes.Add("class", "popupcontent");
RadDatePicker eddp = new RadDatePicker();
eddp.ID = "dp_ENDDATE";
eddp.DateInput.Attributes["onclick"] = String.Format("showPopUp('{0}');", eddp.ClientID);
edpanelContent.Controls.Add(eddp);

when I look at the page source, it's referencing the ID being passed to the JavaScript as just "dp_ENDDATE" without all the other pathing that goes along with it. The client id should look like this
ctl00_MainContent_ctl00_RadGrid2_ctl00_ctl02_ctl02_dp_ENDDATE_dateInput_text

Is there a way to set this up so I can assign the JavaScript to the DateInput server side when the control is created? Thanks.
Philip Senechal
Top achievements
Rank 1
 answered on 08 Apr 2011
1 answer
86 views
Hello All,
In my codebehind I set the sqldatasource controls filterExpression based on selecting items.

So when the page load I use the sqldatasource and bring back all records, when the user selects "sold Items" I use the sqldatasources FilterExpression to bring back just the "Sold Items" this works just fine, but when I page to the next page all my record show and not just the "Sold Items".

So each time they select an item, I add a diffent filter to the sqldatasource and then I set teh grids DataSourceID to my sqldatasource control then do a grid DataBind();

Like I said it works fine, except when I page to the next page, it's like the filter is removed and is gets everything as if there was no filter, but it should have not gotten everything in the first place because of the filter on the sqldatasource.

How can I fix this,
Thanks,
KS.
Pavlina
Telerik team
 answered on 08 Apr 2011
1 answer
105 views
Hi,

We are currently using a RadListbox in our software as follow:

<telerik:RadListBox ID="MyListBox" runat="server" OnItemDataBound="BindMyItems" EnableDragAndDrop="false" AutoPostBackOnReorder="true" 
AllowReorder="true" OnReordering="ReOrderMyItems" ViewStateMode="Disabled">
<ItemTemplate>
<telerik:RadTextBox ID="MyTextBox" runat="server" />
</ItemTemplate>
</telerik:RadListbox>


My challenge is, when the RadTextBox has got focus and we press shit+ctrl+ <- (back arrow) for selecting the text in the RadTextBox the RadTextBox are removed from the RadListBox. We have a client KeyPress event on the RadTextBox that is added in the codebehind. When this combination of keys are pressed the KeyPress event is triggered, but I get the ctrl key and then the shift key and that is it. It seems like I am not able to catch the combination of the keypress and therefore I am struggling a bit preventing the RadTextBox from being removed

This is how I add the KeyPress event in the codebehing, I am adding it in the BindMyItems(); For IE I am using onkeydown and other browsers I am using onkeypress.
Code behind adding of attribute : MyTextBox.Attributes.Add(lBrowser.Browser == "IE" ? "onkeydown" : "onkeypress", "return MyKeyPressEvent(this, event)");


My Question is, is there a way of catching this keypress combination to prevent this from happening?

Kind Regards,
David.
Helen
Telerik team
 answered on 08 Apr 2011
1 answer
121 views
Hi,

We are using version 2010.2.826.35 of the ASP.NET for AJAX components.

Q.  I want to be able to create a custom attribute key / value on each TimeSlot in server side code, and then access that custom attribute in javascript when the time slot is clicked.  If it matters, my Scheduler will only be displayed in Monthly View.

On the server I have:
Private Sub DployRadScheduler_TimeSlotCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.TimeSlotCreatedEventArgs) Handles DployRadScheduler.TimeSlotCreated
  
    e.TimeSlot.Control.Attributes.Add("divName", "week1")
  
End Sub

I don't know how to retrieve that Attribute in javascript when the user clicks on the timeslot.  I already have the javascript function in place to handle the OnClientTimeSlotClick event, but I can't seem to get the object that contains the attribute.

Any ideas?  Or is there another way to do this?  Basically, in Month View, I just want to know what week they clicked in, within the current Scheduler (where the Scheculer is always displaying 5 weeks...).

By the way, I do see that my Attribute and Value are getting written into the source of the HTML, but I obviously don't want to try to navigate through the DOM to find the one that corresponds to the timeslot I clicked.

Thanks In Advance.

 

Peter
Telerik team
 answered on 08 Apr 2011
1 answer
106 views
Hello All,

I am making use of Telerik's RadSiteMap control to display the hyperlinks of all the pages residing in my site. I have a requirement wherein I have to use the 'rel="nofollow"' attribute of the anchor tag for some of the hyperlinks (but not for all of them).

Is it possible to control this using the ".sitemap" file itself. Otherwise is there any javascript workaround to add this attribute? I went through the html source of my aspx page once the page was rendered in my browser. There was no unique identifier for any of the hyperlinks. Any insights on how I could achieve this?

Regards,
Raghuraman.V
Dimitar Terziev
Telerik team
 answered on 08 Apr 2011
3 answers
129 views

I have a rad grid in my page with template columns

On applying filter it gives  

<>"Specified argument was out of the range of valid values.
Parameter name : Index" error.


Can any one suggest me the cause and what can i do to rectify the same

Iana Tsolova
Telerik team
 answered on 08 Apr 2011
3 answers
88 views
I have control as part of a master page where I have added a RadAjaxPanel to the toolbar (TopNavigationControl.ascx.cs) as follows:

<telerik:RadAjaxPanel ID="panelAjaxPersonShortcut" runat="server" EnableAJAX="True"><br><div id="topNavigationControl-contentDiv"><br>    <div id="textSize"><br>        <asp:LinkButton ToolTip="Sign out" CausesValidation="false" ID="signOut" runat="server"<br>            OnClick="signOut_Click">Sign Out</asp:LinkButton><br>    </div><br>    <asp:LinkButton ToolTip="Home" CausesValidation="false" ID="home" runat="server"<br>        OnClick="home_Click">Home</asp:LinkButton><br>    <asp:LinkButton ToolTip="Help" CausesValidation="false" ID="help" runat="server"<br>        OnClick="help_Click">Help</asp:LinkButton><br>    <ps:PersonShortcut ID="ucPersonShortcut " runat="server" />        <br></div><br></telerik:RadAjaxPanel>

The control ucPersonShortcut was added late in the project and was ajax-ified to prevent postback problems with existing pages when the user clicks buttons on this shortcut that stay on the same page.  My problem is that existing pages that contain other Telerik controls seems to be adversely affected  e.g. a telerik RadDatePicker no longer shows the calendar when the popup button is clicked...

   <telerik:RadDatePicker ID="DateBirthDate" runat="server" CssClass="input" MinDate="1850-01-01"><br>                        <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x"><br>                        </Calendar><br>                        <DatePopupButton HoverImageUrl="" ImageUrl="" /><br>                        <DateInput DateFormat="dd/MM/yyyy" DisplayDateFormat="dd/MM/yyyy" CssClass="input"><br>                        </DateInput><br>                        <ClientEvents OnPopupOpening="PopupOpening" OnPopupClosing="PopupClosing" /><br>                    </telerik:RadDatePicker>

Interestingly, the page where this calendar resides is in a user control 'ucManagePerson' and this page has a RadAjaxManagerProxy on it..not sure if this has anything to do with it.

<asp:Content id="cntMain" contentplaceholderid="mainContent" runat="server"><br>    <asp:Label runat="server" id="CaptionNumberPersons" class="caption"/><br>    <telerik:RadAjaxManagerProxy ID="ajaxManagerProxy" runat="server"><br>        <AjaxSettings><br>            <telerik:AjaxSetting AjaxControlID="ucViewPersons"><br>                <UpdatedControls><br>                    <telerik:AjaxUpdatedControl ControlID="ucManagePerson" /><br>                </UpdatedControls><br>            </telerik:AjaxSetting><br>        </AjaxSettings><br>    </telerik:RadAjaxManagerProxy><br>        <br>        <vp:ViewPersons ID="ucViewPersons" runat="server" /><br>        <mp:ManagePerson ID="ucManagePerson" runat="server" /><br></asp:Content><br>


Basically if I take the RadAjaxPanel off the person shortcut the calendar works, I put it back on, it does not pop up. Any ideas??

Retards
Colin
Maria Ilieva
Telerik team
 answered on 08 Apr 2011
1 answer
144 views
I have a column in a RadGrid that has a customised Filter control. Rather than the standard text box, I have used the column's FilterTemplate to display a RadCombo list containing possible filter values. I have a couple of questions relating to this scenario.

In addition to the list, I would like to show the standard list of filter operators that normally appears next to the text box in filter controls. Does a control exist to implement this feature? How is it configured?

When the user selects a value from the list, in code-behind the filter is applied and the grid is rebound. As a result, the combo is repopulated and its SelectedValue property is initialised to null. However, I want the SelectedValue property to be set to the value the user has just selected, so that selecting all other items in the list produces the appropriate re-filtering action. How can I do that?

Suggestions welcome, thanks in advance!


                <telerik:GridBoundColumn DataField="CaseStatus" FilterControlAltText="Filter status column"
                    HeaderText="Case Status" UniqueName="Status">
                    <FilterTemplate>
                        <telerik:RadComboBox runat="server" ID="ddlStatus" AutoPostBack="true"
                                      OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged">
                        </telerik:RadComboBox>
                    </FilterTemplate>
                </telerik:GridBoundColumn>


        protected void ddlStatus_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            string filterExpression = string.Format("CaseStatus = {0}", (byte)Enum.Parse(typeof(CaseStatus), e.Value));
            rgResults.MasterTableView.FilterExpression = filterExpression;
            rgResults.MasterTableView.Rebind();
        }
Mira
Telerik team
 answered on 08 Apr 2011
9 answers
355 views
Our IT department deployed a new desktop image.  Previously the Telerik controls loaded flawlessly.  Now I have a problem.  I have gone as far as re-imaging the machine, so it must be something on this particular image that is causing the telerik controls to not load, but I need your help to identify the problem.

Attempt: I load Visual Studio 2010 and attempt to load the Telerik tools.  Result: It says I need Visual Studio loaded that is 2005 or greater.  I did that and it doesn't recognize that its loaded.

Attempt: I load Visual Studio 2008 and attempt to load the Telerik tools.  Result:  Same result.  It doesn't recognize that its loaded.

Attempt: I load Visual Studio 2005 and attempt to load the Telerik tools.  Result:  The telerik tools load, however Visual Studio 2008 or Visual Studio 2010 do not recognize that they are loaded. 

I have a log file of the install for you to take a look at, however you do not provide a way for me to upload this to this forum.

Any thoughts ?

Drew
Teodor
Telerik team
 answered on 08 Apr 2011
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?