Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
226 views

Hi sir,

 

I have used a rad combobox for listing states, I have set data source and AllowCustomText="true". When focus on the combobox then listed all items, I wants the items are listed only after enter a text in the rad combobox (drop down disabled on focus) .  eg:- if user enter ‘a’ then first letter of the sate will appear in the list.

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 02 Feb 2012
3 answers
232 views
Now, I know by design RadDataPager is implimented to work the way it is for my scenario (described below), but I am wondering how to work around it.

I am using ASP.NET AJAX... I saw a suggestion for Silverlihgt RadDataPager to use some sort of RadDataPager.PagedSourse.PageIndexChanged or something maybe.

My Scenario:
  • I am binding a RadDataPager using the TotalRowCountRequest event.
  • I start by binding the RadDataPager (PageSize=5) to have a TotalRowCount of 10 (item count of a collection I'm keeping in ViewState).
  • User clicks to view Page #2 (which means PageIndex 1)   <-------------- so far so good
  • User deletes one of the items in my ViewState item collection.
    • Now the TotalRowCountRequest gets the updated count (which is now 9 because the User removed 1 from the original 10)
      • PageIndexChanged is now fired with a NewPageIndex of 0        <------------------ this is what I want to prevent

I understand that this is the way it's suppose to work, as it's really meant for a User to do something like going to last page, and then filtering items (since the item collection would chage Telerik assumes the RadDataPager should take the User to the first Page).

So is there a good way to do what I want and prevent TotalRowRequest from firing PageIndexChanged with a PageIndex of zero?

Thanks for your time to read and reply!
-Dan
Veli
Telerik team
 answered on 02 Feb 2012
2 answers
93 views

Have a look at http://www.iytworldwide.com/MFSchools.aspx

I edited my post because i was able to get the scroll bar to appear

However, If you go to the site and scroll left and right the performance is AWFUL.
Galin
Telerik team
 answered on 02 Feb 2012
2 answers
110 views
Hi,
    I have implemented ToolTip to display user details(in a User Control) on mouseover event of radgrid row. It;s working perfectly in IE & Chrome.., but the dynamically generated labels are not being displayed in firefox browser. 

---------------------------------------------


                Control ctrl = Page.LoadControl("~/UserControls/UserDetailsForAdminMessage.ascx");
                panel.ContentTemplateContainer.Controls.Add(ctrl);
                UserControls_UserDetailsForAdminMessage details = (UserControls_UserDetailsForAdminMessage)ctrl;
                Literal lblFName = ((Literal)(details.FindControl("lblFName")));
                Literal lblLName = ((Literal)(details.FindControl("lblLName")));
                Literal lblCity = ((Literal)(details.FindControl("lblCity")));
                Literal lblEmailId = ((Literal)(details.FindControl("lblEmailId")));


                List<usp_SelectUsersResult> lst = new TemplateDomain().SelectRetailerDetails(hdnUserName.Value, "/MenUs.Web");
                lblFName.Text = lst[0].ContactFirstName;
                lblLName.Text = lst[0].ContactLastName;
                lblEmailId.Text = lst[0].CompanyEmail;
                lblCity.Text = lst[0].City;
                this.Load += new System.EventHandler(this.Page_Load);
-----------------------------------------------------------------
Regards,
Aditya
Aditya
Top achievements
Rank 1
 answered on 02 Feb 2012
1 answer
98 views
Hi,

Would like to get some sample using RadGrid + jQuery + ValidationSummary like display. Any Help would be appreciated.
Antonio Stoilkov
Telerik team
 answered on 02 Feb 2012
1 answer
79 views

I am having issues when using an edit template to create a new record. On insert, the same binding is assumed and does not work as there is nothng to bind to. For example, I have a date picker for which I have resricted the range from 2011 to 2050. On insert, there is no value being passed in and so an exception raised (Object cannot be cast from DBNull to other types.)
e.g.

<td>

 <asp:CheckBox ID="Critical_E" runat="server" Text="Critical" Checked='<%# DataBinder.Eval( Container, "DataItem.Critical" ) %>' />

 </td>


How do I either 1) disable the binding on insert, 2) create a separate insert template without having to create user controls?

Thanks,

Neil.

Veli
Telerik team
 answered on 02 Feb 2012
4 answers
514 views
Hi,

I have two related comboboxes here in Edit Form Template . and OnSelectedIndexChanged Loads the Items in the second ComboBox.

This Code works Fine on Insert Mode but on Edit Mode it Can't see the ComboBoxes ( return Nothing ):

Protected Sub CustomerName_SelectedIndexChanged(ByVal o As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs)
 
 
        Dim editedItem As GridEditFormItem = DirectCast(rgOpportunities.MasterTableView.GetItems(GridItemType.EditFormItem)(0), GridEditFormItem)
        
        Dim CustomerCombo As RadComboBox = DirectCast(editedItem.FindControl("rcbCustomerName"), RadComboBox)
        Dim ContactsCombo As RadComboBox = DirectCast(editedItem.FindControl("rcbContactName"), RadComboBox)
 
        If (CustomerCombo.DataSourceID IsNot Nothing) Then
            CustomerCombo.DataSourceID = String.Empty
        End If
        ContactsCombo.DataSource = LoadContacts(e.Value)
        'ContactsCombo.Items.Clear()
        ContactsCombo.OpenDropDownOnLoad() = True
        ContactsCombo.DataBind()
        If ContactsCombo.Items.Count > 0 Then
            Session("ContactID") = ContactsCombo.Items(0).Value
        Else
            Session("ContactID") = ""
        End If
 
 
    End Sub


--- > CustomerCombo and ContactsCombo Access the edit form and gets the RadComboBoxes and Works Fine in InsertMode
But in Edit Mode , Iam not able to Access The editform and get controls by this way or any other way !

Can anyone helps me in this Please ( Urgent ).
Mahmoud
Top achievements
Rank 1
 answered on 02 Feb 2012
1 answer
84 views
How to set colour for emptymessage and show the text in normal font?
Princy
Top achievements
Rank 2
 answered on 02 Feb 2012
11 answers
256 views
Hello Telerik,

I have seen all kinds of ways to code for changing up column types, setting data bound combos, etc. But what is the proper procedure for changing up a column in code-behind. In other words, which procedures are suppose to use for changing up things. 

Here is the scenario:

I have a grid with AutoGenerated fields from a code behind data tier that returns a data table for a grid. Now this data may need a mask, or a drop down combo, or a numeric text control for UI enhancements in the grid. Here would be a typical grid for this scenario in the mark-up:

<telerik:RadGrid runat="server" ID="RadGrid1" AllowMultiRowSelection="true" AllowMultiRowEdit="true" EnableViewState="true" ViewStateMode="Enabled">
 
<MasterTableView DataKeyNames="ProgramPhoneListId, ProgramId, IsPrimary, AliasName, PhoneNumber, Extension, PhoneTypeValuesId" ClientDataKeyNames="ProgramPhoneListId, ProgramId, IsPrimary, AliasName, PhoneNumber, Extension, PhoneTypeValuesId" NoMasterRecordsText="Please click the 'Add' button to add a phone number..." EditMode="InPlace" AutoGenerateColumns="true" TableLayout="Fixed">
 
<Columns>
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" CommandName="Select" />
</Columns>
 
</MasterTableView>
 
<ClientSettings EnableRowHoverStyle="true">
<Selecting AllowRowSelect="true" />
<Scrolling AllowScroll="true" UseStaticHeaders="true" />
</ClientSettings>
 
</telerik:RadGrid>

Now what events would be needed in the code-behind for changing things up to use the UI enhancements as I mentioned above. For instance: (in order of firing precedence)

DataBinding:
I use this for "EditIndexes" on the grid, no problems here with what is supposed to be here.

ColumnCreated:
Its works for changing the header, style, text, width, etc., but what if 'PhoneTypeValuesId' is just integers and needs another data table for its data. Do I need to change it to a GridBoundColumn in this event? If 'PhoneNumber' needs a mask to I change it to a RadMaskedColumn in this event and add the DisplayMask - "(###) ###-####" ? 

ItemCreated:
Ok, this is when the rows are created and gets fired for each row if I am not mistaken. So in this event you can cast GridItems to RadMaskedTextBox, RadNumericTextBox and others, but do you have to if you set the columns up in the ColumnCreated event? When I try to change the type to a RadMaskedTextBox it errors out unable to cast type of the TextBox to RadMaskedTextBox. Now is this because something else has to happen to the cell? What about the drop down in this event? Do you change the cell to a RadComboBox? 

ItemDataBound:
This event can fill in my GridDropDownColumn, but what needs to be setup before this? When the GetColumnEditor of the 'PhoneTypeValuesId' is trying to change the type to a GridDropDownColumnEditor it again fails on the cast object of type. I feel like something is supposed to be done before this tries to add the datasource, datatextfield, etc. to the GridDropDownColumnEditor, if it can't change the type this will not work. 

PreRender:
Basically I use this to change up the controls in the grid properties, width, borderstyle, etc. Also used to attach attributes for events to the TextBox for editing. No real issues here. 

Now I've been through the documentation and it wasn't in too much detail with different scenarios, it was a lot of mark-up usage which doesn't apply much to my situation.

Can someone please elaborate on this and maybe a small example of what should get put into each event? How to achieve the desired results in the grid. I really appreciate it!

SDI
Tsvetina
Telerik team
 answered on 02 Feb 2012
3 answers
96 views
I deployed the version 5. 812 of radeditormoss.wsp and it seems to deploy fine.  but when I go to my website that I deployed it to I get this following message.  Any suggestions?



This page has encountered a critical error. Contact your system administrator if this problem persists.
Stanimir
Telerik team
 answered on 02 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?