Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
164 views
Hi I have a problem with combo boxes and validation.

I just putted a combobox and a requiredfieldvalidator on my form.
when I try to submit my form without compiling the combobox the alert shows up, but when I try to select a value from my combobox the dropdrown list does not show up.
here you have my code
<telerik:radcombobox
                            id="CompanyId"
                            Runat="server"
                            Height="140px"
                            Width="250px"
                            DataTextField="Name"
                            DataValueField="Id"
                            Skin="Office2007"
                            AllowCustomText = "true"
                            MarkFirstMatch="True"
                            OnDataBound="RadComboBox1_DataBound"
                            DataSourceID="odsgetCompany"
                            TabIndex="1" />
                        <asp:RequiredFieldValidator ID="rfvCmpanyId" ControlToValidate="CompanyId" runat="server" Text="*" ErrorMessage="Company" CssClass="error"/>

thank you for help

Raphael
Atanas Korchev
Telerik team
 answered on 01 Oct 2008
3 answers
166 views
Hello.

I need to find a way to select a child node in a LoadOnDemand node.

I do a call to the server that returns me the full hierarchical path where the node is in the treeview. It actually returns me the ids of the nodes.
The problem is that the node is a LoadOnDemand node, in other words, I have to wait this node to load before I can actually select any child node and there might be a lot of subnodes.

For example:

I receive a message like this: "menuId=01|menuItem=22|menuItem=33"

The '01' node is one of the root nodes, so I can easily find it and expand it. Now I have to find a way to wait until the LoadOnDemand finishes loading up all nodes, expand the '22' menuItemchild node , wait the ajax call to finish again, so I can finally select the '33' menuitem.

Is there any way select a node inside a bunch of LoadOnDemandNode?

Thanks!

Atanas Korchev
Telerik team
 answered on 01 Oct 2008
0 answers
142 views
Hello All,

  I created a custom skin for the RadPanelBar. I have an image displayed when an item has children, but can't figure out if I can hide it for certain items. Specifically what I want to do is display the image (the arrow-expand gif from the Vista skin) ONLY for child items that have children. In other words, I do not want to display the arrow for the main root menu items. Is this possible? Please let me know if I'm not clear. I was going to paste a screen shot, but couldn't seem to do it.

Thanks,
Ben
Ben
Top achievements
Rank 1
 asked on 01 Oct 2008
3 answers
193 views
I have a tabstrip and a multipage and want to be able to have individual tabs clicked which show their individual relevant pages along with an All tab which, when clicked, shows all multipages. Then, if you click on a single page tab, it shows only that one page, etc etc.

I have it all working fine, with six tabs with six corresponding pages and an 'All' tab as the seventh tab - here's the relevant javascript.
function ShowOneTabOrAll(sender, args) { 
    var multiPage = $find("<%=RadMultiPage1.ClientID %>"); 
    var i; 
    if (args.get_tab().get_text() == "All") { 
        for (i = 0; i < multiPage.get_pageViews().get_count(); i++) { 
            multiPage.get_pageViews().getPageView(i).show(); 
        } 
    } else { 
        for (i = 0; i < multiPage.get_pageViews().get_count(); i++) { 
            multiPage.get_pageViews().getPageView(i).hide(); 
        } 
        var tabIndex = args.get_tab().get_index(); 
        multiPage.get_pageViews().getPageView(tabIndex).show(); 
    } 

Currently, I have tab #0 and page #0 as the selected tab/page. When I click the All tab, all pages are shown.

However, the functionality I want is to start with All pages being shown and have the All tab being the selected tab and then have the user show each individual tab by clicking whatever tab they want.

I cannot work out what event to connect to. I've tried onClientLoad for the tabstrip but I could not find a way of indexing through each page in the multipage and calling show() for each of them - I'm not even sure the multipage was loaded/available...

Can someone help me with the event to hook into and code to get this done.

Thanks in advance, Steve
Paul
Telerik team
 answered on 01 Oct 2008
4 answers
219 views

Hi

I have a grid with a GridDropDownColomn and i tried to add a requiredFieldValidator to it, but it seems that i"m missing something.... First i use RadGrid1_ItemDataBound to add a "Please select item" in my RadComboBox, after that in the RadGrid1_ItemCreated, i'm looking for my radcombo and i associate the RequiredFieldValidator to it but it does'nt works. I assume that the requiredFieldValidator check for the selected text and not the value , so how i can make it works ? There is my code snippet :

Private Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound

If

TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then


    Dim Combo As RadComboBox = TryCast(e.Item.FindControl("RCB_ResponsibleID"), RadComboBox)

    Combo.Items.Insert(0,

New RadComboBoxItem(Resources.Resources.GRID_SELECT_RESPONSIBLE, Nothing)

End If

End Sub

Private Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated

If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then

Dim Combo As RadComboBox = TryCast(Item("ResponsibleID").FindControl("RCB_ResponsibleID"), RadComboBox)

Dim ResponsibleValidator As New RequiredFieldValidator

ResponsibleValidator.ControlToValidate = Combo.ID

ResponsibleValidator.InitialValue =

Nothing

ResponsibleValidator.SetFocusOnError = True

ResponsibleValidator.ErrorMessage = Resources.Resources.GRID_MUST_SELECT_RESPONSIBLE

Cell = Combo.Parent

Cell.Controls.Add(ResponsibleValidator)

End If

End Sub

Thanks in advance for your helps !

Dominic
Top achievements
Rank 2
 answered on 01 Oct 2008
1 answer
136 views
Hi,

my question is not directly related to RadGrid but maybe someone can help me anyway.
I am using a RadGrid which is bound to a LinqDataSource. The User is able to select/deselect items within the grid.
When the user clicks the submit button the selected items are saved. To achive this, the grid has an invidible column which holds the primary keys of the items listed in the grid. After submit a list with the selected keys is passed to a method which retrievs the corresponding objects via a Linq-Query and adds them to a relation.
Now, my question is: Is it possible to get the entity object from the LinqDataSource when the user clicks the select button in the grid? It would be much more convenient to work with the objects instead of id's.

Thank you in advance for your suggestions.
Robert
Sebastian
Telerik team
 answered on 01 Oct 2008
10 answers
257 views
Hi,

since some hours I try to implement my custom paging logic into the last release of RadGrid.

I set DataSource in OnNeetDataSource. Everything looks good, I set VirtualItemCount and so an. I definitely become a correct view of my data. 15 records, pagesize 10, so 2 pages, 10 and 5 records. The data is correct.

I set RadGrid1.DataSource = myview (custom BL).
When I browse to the page, this works only for the FIRST page of the grid. The second Page: Paging Footer is correct (Page 2of 2, 10-15 of 15) (!!!) But the grid is empty.

Why or how can I make sure that RadGrid will render and accept the NEW view. In the first Page (Page 1 of 1) Everything looks good !?

Thanks and Enjoy,
Chris
Rosen
Telerik team
 answered on 01 Oct 2008
1 answer
106 views
Hi,

I have a web page with a tab control.  There are 2 tabs, namely  Accounts and Communications.  Now each tab has grid control.

Here is a code section of the accounts grid control:

<EditFormSettings
  UserControlName="AccountDetail.ascx"
  EditFormType="WebUserControl">
  <EditColumn UniqueName="EditCommandColumn1">
  </EditColumn>
</EditFormSettings>


Here is a code section of the communications grid control:

<EditFormSettings
  UserControlName="CommunicationDetail.ascx"
  EditFormType="WebUserControl">
  <EditColumn UniqueName="EditCommandColumn1">
  </EditColumn>
</EditFormSettings>


When the Communications grid goes into edit mode, there is a dropdown that needs to be populated.  And this dropdown gets its values from the rows in the grid on the accounts tabe.  How do I access the the rows from the accounts grid and populated them with a cells value in the communication grid.  Just remember that I am working with tabs.

I hope that someone can help me.

Thanks
Brendan
Iana Tsolova
Telerik team
 answered on 01 Oct 2008
1 answer
143 views
I have 2 grids.  The one (RadGrid1) on the left is filled with data and the one on the right (RadGrid2) is empty.  When a row from RadGrid1 gets dragged to RadGrid2, the RadGrid1 Rowdrop event gets fired.  Usually I would check for e.DestDataItem if I am dropping in between rows, but I am not sure how to check if a row gets dropped on an empty grid.  Any advice would be great.  Thanks.
Rosen
Telerik team
 answered on 01 Oct 2008
0 answers
136 views
Hi,

I created the following table inside my database:

CREATE TABLE [Rooms]
(
   [ID]        INT                IDENTITY(1,1)   NOT NULL,
   [RoomName]  nvarchar(255)                    NOT NULL,
   CONSTRAINT [PK_Rooms] PRIMARY KEY CLUSTERED
   ([ID])
)
GO
CREATE TABLE [Users]
(
   [ID]        INT                NOT NULL,
   [UserName]  nvarchar(255)      NOT NULL,

   CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
   ([ID])
)
GO

CREATE TABLE [dbo].[Appointments] 

   [ID]                    INT IDENTITY(1,1)   NOT NULL, 
   [Subject]               nvarchar(255)       NOT NULL, 
   [Start]                 datetime            NOT NULL, 
   [End]                   datetime            NOT NULL,
   [RoomID]                INT                 NULL,
   [UserID]                INT                 NULL,
   [RecurrenceRule]        nvarchar(1024)      NULL, 
   [RecurrenceParentID]    INT                 NULL, 
   [Annotations]           nvarchar(50)        NULL, 

   CONSTRAINT [PK_Appointments] PRIMARY KEY CLUSTERED  
       ([ID]), 

   CONSTRAINT [FK_Appointments_ParentAppointments] FOREIGN KEY 
       ([RecurrenceParentID]) 
   REFERENCES 
       [Appointments] ([ID]),

   CONSTRAINT [FK_Appointments_Rooms] FOREIGN KEY 
       ([RoomID]) 
   REFERENCES 
       [Rooms] ([ID]),

   CONSTRAINT [FK_Appointments_Users] FOREIGN KEY 
       ([UserID]) 
   REFERENCES 
       [Users] ([ID]) 
Then, I created a SQLdatasource to access the Appointments table. The connexion is succeful.
In the smart tag of the controler, I defined the correct field for key, start time, end time, ect...

I also created a second SQLdatasource to access the Users table.

Then I did this :

Select the RadScheduler in the designer, and click the ellipsis button on the ResourceTypes property in the property pane.
In the Resource Type Collection Editor, add a new resource type and configure it to bind to the second SQLDataSource:
Problem is: I can't add any events in the scheduler. When I double click on the scheduler, I see the box to create a new event, but when i click on the icon to create the event, it just disappear...

What have I done wrong ?

Thx a lot for your help

Edited:
I didn't check the box generate update insert delete while creating the datasource...
Max
Top achievements
Rank 1
 asked on 01 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?