Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views

Hi,

I am having a combobox like this,

 

<telerik:RadComboBox ID="txtDoctorId" runat="server" AutoPostBack="true" AllowCustomText="true"

 ExpandAnimation-Type="Linear" CollapseAnimation-Type="Linear" Width="300px" EnableLoadOnDemand="true"

 Filter="Contains">

 <HeaderTemplate>

 <table>

 <tr>  

<td style="width: 80px;">

 Code

</td>

 <td style="width: 220px;">

 Consultant Name

 </td>

 </tr>

 </table>

 </HeaderTemplate>

 <ItemTemplate>

 <table>

 <tr id="cmbRow">

 <td id="cellCode" style="width: 80px">

 </td>

 <td id="cellName" style="width: 220px">

  </td>

 </tr>

 </table>

 </ItemTemplate>

 </telerik:RadComboBox>

 I have to find the htmltablecell inside the itemtemplate during itemdatabound

plz help me..Thnx in advance....

Princy
Top achievements
Rank 2
 answered on 29 Feb 2012
1 answer
90 views
Hi all,

I have an aspx page with a windowmanager which contains 2 separate windows (window1 and window2). Window 2 is a lookup dialogue form containing values which the user can select to return values to the parent window. Both Windows can be opened directly from the aspx page.

Window2 can also be opened from Window1. Originally I put a new windowmanager in Window1 but I realised that this was not correct because when window2 was opened from window1, it opened inside window1 (and was only partially visible and restricted to window 1's borders) which is not correct. So as per the documentation (http://www.telerik.com/help/aspnet-ajax/window-programming-opening-from-within-dialog.html) I use the aspx forms window manager to open window2 from window1.

My problem is that I am using the onClientClose event for window2 to populate the aspx page with return values from window2. However I also need to populate window1 with return values from window2 when window2 is called from window1.

Does anybody know how I can (and should) achieve this?

Many Thanks

Mark
Marin Bratanov
Telerik team
 answered on 29 Feb 2012
1 answer
103 views
I am not sure this should actually be here in Grid or Ajax manager. I have a Grid and an Ajax manager control. I insert into the grid and, as expected, the whole page does not refresh yet the grid does. (Very Nice).

Now I have run into an issue where I have had to add a SQLDataSource and FormView on the page that needs to be updated after the insert into the Grid. I can force the page to refresh and have the FormView update but this sort of defeats the purpose of using the Ajax control to prevent a full page refresh.

I have tried to have the SQLDataSource and FormView refresh using both the Gridss ItemInserted and/or the Grid's SQLDataSource Inserted to force a rebind of the FormView. Niether worked.

Is there a way to have the FormView rebind/refresh after the Grid Insert has occured?

Here is my AJAX code:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript" language="javascript">
        function refreshGrid(arg) {
            if (!arg) {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
            }
        }
    </script>
</telerik:RadCodeBlock>


<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="RadCodeBlock1">
             <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="rgd_Labor" UpdatePanelHeight="" />
                 <telerik:AjaxUpdatedControl ControlID="rgd_Materials" UpdatePanelHeight="" />
             </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
    </telerik:RadAjaxManager>







Jayesh Goyani
Top achievements
Rank 2
 answered on 29 Feb 2012
3 answers
128 views
Hi.
I have a RadDateTimePicker in a grid.How i can compare SelectedDate(DateTime type!)  with today's date?
My code:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            RadDateTimePicker startDate = (RadDateTimePicker)item.FindControl("startDate");
 
            TableCell cell = (TableCell)start.Parent;
 
            CompareValidator CV1 = new CompareValidator();
            CV1.ErrorMessage = "*";
            CV1.ControlToValidate = startDate.ID;
            CV1.Operator = ValidationCompareOperator.GreaterThanEqual;
            CV1.ValueToCompare = DateTime.Now.ToString();
            cell.Controls.Add(CV1);
 
            }
      }
Please help,
Thanks.
xvikx
Top achievements
Rank 1
 answered on 29 Feb 2012
1 answer
183 views
I want to find the Setup Offline of RadControls For AspNet Ajax (Free Trial Q1 2012). Can you help me - show for me link download RadControls for aspnet ajax setup offline free trial Q1 2012?
Princy
Top achievements
Rank 2
 answered on 29 Feb 2012
2 answers
268 views
Hi,
     Am using Footer in Rad Grid for summing up my total column.
Now the total is showing for the entire datasource which i set for that grid.
All i needed is to display the summation , for the current page records alone (say for the current 10 records if i set to pagesize as 10).
Is there any way to implement this feature ?



Regards,
Karthikeyan G
Karthi Keyan
Top achievements
Rank 1
 answered on 29 Feb 2012
4 answers
284 views

I have a project with 2 types of users. I want only the Supervisors to be able to view the "User Management" page. This page is a child node of my rad menu and it seems that I can only hide the title node or I get this error:

"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"

How do I hide just some of the pages in the child nodes?


    <siteMapNode title="Users" roles="Supervisor" target="_blank">
        <siteMapNode url="UsersOnline.aspx" title="Users Online" target="_blank" />
        <siteMapNode url="UserManagement.aspx" title="User Management" target="_blank" />
    </siteMapNode>

    Protected Sub RadMenu1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles RadMenu1.ItemDataBound
        Dim node As SiteMapNode = TryCast(e.Item.DataItem, SiteMapNode)

        If Not String.IsNullOrEmpty(node("target")) Then
            e.Item.Target = node("target")
        End If
        If e.Item.Text = "User Management" AndAlso msUserType = "Standard" Then
            RadMenu1.Items.Remove(e.Item)
        End If
    End Sub

Princy
Top achievements
Rank 2
 answered on 29 Feb 2012
3 answers
67 views
hi,

I wanted to know hex code of Hay's hover and selected css class and I wanted to use it with forest skin. Right now Forest hover and selected color is Orange and I wanted to change that to Hay's green..

Where do I find the css file for Hay?
Princy
Top achievements
Rank 2
 answered on 29 Feb 2012
3 answers
255 views
I have tried all the demos and examples and nothing has worked!
Markup:
<telerik:RadGrid ID="grvUsers"   
                     runat="server"   
                     AutoGenerateColumns="False"   
                     GridLines="None" 
                     Skin="Office2007"   
                     OnNeedDataSource="grvUsers_NeedDataSource"   
                     OnUpdateCommand="grvUsers_UpdateCommand"   
                     AllowPaging="True"   
                     AllowSorting="True"   
                     ShowGroupPanel="True" OnItemCommand="grvUsers_ItemCommand" OnEditCommand="grvUsers_EditCommand">  
        <MasterTableView AllowAutomaticInserts="True" CommandItemDisplay="Top">  
            <RowIndicatorColumn Visible="False">  
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn Resizable="False" Visible="False">  
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridEditCommandColumn> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" UniqueName="LastName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" UniqueName="FirstName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UserLevel" HeaderText="User Rights" UniqueName="Rights">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Enabled" HeaderText="Enabled" UniqueName="Enabled">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UserInfoUID" UniqueName="UserInfoUID" Visible="False">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UserName" UniqueName="UserName" Visible="False">  
                </telerik:GridBoundColumn> 
            </Columns> 
            <EditFormSettings EditFormType="Template" CaptionFormatString="Edit the information for &lt;%# Bind('FirstName') %&gt; &lt;%# Bind('LastName') %&gt;" > 
                <EditColumn UniqueName="EditCommandColumn1"></EditColumn> 
                <FormTemplate> 
                    <table style="width: 568px">  
                        <tr> 
                            <td style="width: 131px">  
                                Last Name</td> 
                            <td style="width: 160px">  
                                <telerik:RadTextBox ID="txtEdit_LastName" runat="server" MaxLength="50" Text="<%# Bind('LastName') %>">  
                                </telerik:RadTextBox></td>  
                            <td> 
                                <asp:RequiredFieldValidator ID="rfvEdit_LastName" runat="server" ControlToValidate="txtEdit_LastName" 
                                    ErrorMessage="Please enter the users last name" ValidationGroup="Edit">*</asp:RequiredFieldValidator> 
                            </td> 
                            <td style="width: 174px">  
                                First Name</td> 
                            <td style="width: 156px">  
                                <telerik:RadTextBox ID="txtEdit_FirstName" runat="server" MaxLength="50" Text="<%# Bind('FirstName') %>">  
                                </telerik:RadTextBox></td>  
                            <td> 
                                <asp:RequiredFieldValidator ID="rfvEdit_FirstName" runat="server" ControlToValidate="txtEdit_FirstName" 
                                    ErrorMessage="Please enter the users first name" ValidationGroup="Edit">*</asp:RequiredFieldValidator></td>  
                        </tr> 
                        <tr> 
                            <td style="width: 131px">  
                                Username</td> 
                            <td style="width: 160px">  
                                <telerik:RadTextBox ID="txtEdit_Username" runat="server" Text="<%# Bind('Username') %>">  
                                </telerik:RadTextBox></td>  
                            <td> 
                                <asp:RequiredFieldValidator ID="rfvEdit_UserName" runat="server" ControlToValidate="txtEdit_Username" 
                                    ErrorMessage="Please enter the users 'Username'" ValidationGroup="Edit">*</asp:RequiredFieldValidator></td>  
                            <td style="width: 174px">  
                            </td> 
                            <td style="width: 156px">  
                            </td> 
                            <td> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td style="width: 131px; height: 27px">  
                                Password</td> 
                            <td style="width: 160px; height: 27px">  
                                <telerik:RadTextBox ID="txtEdit_Password" runat="server" InvalidStyleDuration="100" Text="<%# Bind('Password') %>" Width="125px" EmptyMessage="************" MaxLength="20" TextMode="Password">  
                                </telerik:RadTextBox></td>  
                            <td style="height: 27px">  
                            </td> 
                            <td style="width: 174px; height: 27px">  
                                Password</td> 
                            <td style="height: 27px; width: 156px;">  
                                <telerik:RadTextBox ID="txtEdit_ConfirmPassword" runat="server" InvalidStyleDuration="100" Text="<%# Bind('Password') %>" TextMode="Password" Width="125px" EmptyMessage="***********" MaxLength="20">  
                                </telerik:RadTextBox> 
                            </td> 
                            <td style="height: 27px">  
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
                                Rights</td> 
                            <td> 
                                <asp:DropDownList ID="cmbEdit_Rights" runat="server" Width="119px" SelectedValue='<%# Bind("UserLevel") %>'>  
                                    <asp:ListItem>User</asp:ListItem> 
                                    <asp:ListItem>Admin</asp:ListItem> 
                                </asp:DropDownList></td>  
                            <td> 
                            </td> 
                            <td> 
                                Enabled</td> 
                            <td> 
                                <asp:DropDownList ID="cmbEdit_Enabled" runat="server" Width="119px" SelectedValue='<%# Bind("Enabled") %>'>  
                                    <asp:ListItem Value="True">Yes</asp:ListItem> 
                                    <asp:ListItem Value="False">No</asp:ListItem> 
                                </asp:DropDownList></td>  
                            <td> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td colspan="6">  
                            </td> 
                        </tr> 
                        <tr> 
                            <td align="right" colspan="6">  
                                <asp:LinkButton ID="lnkEdit_Cancel" runat="server" CausesValidation="False" CommandName="Cancel" Text='<%# (Container is GridEditFormInsertItem) ? "Done" : "Cancel" %>' >Cancel</asp:LinkButton>&nbsp;  
                                &nbsp;<asp:LinkButton ID="lnkEdit_Done" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Save Changes" %>'></asp:LinkButton> 
                                &nbsp;  
                            </td> 
                        </tr> 
                        <tr> 
                            <td align="center" colspan="6">  
                                <asp:Label ID="lblUID" runat="server" Text="<%# Bind('UserInfoUID') %>" Visible="False"></asp:Label> 
                                <asp:Label ID="lblEdit_Message" runat="server"></asp:Label> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td align="center" colspan="6" style="height: 21px">  
                                <asp:ValidationSummary ID="vsEdit" runat="server" ValidationGroup="Edit" /> 
                            </td> 
                        </tr> 
                    </table> 
                </FormTemplate> 
                <PopUpSettings ScrollBars="None" /> 
            </EditFormSettings> 
            <CommandItemSettings AddNewRecordText="Add new user" /> 
            <PagerStyle AlwaysVisible="True" HorizontalAlign="Left" Mode="Slider" /> 
        </MasterTableView> 
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True">  
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 

Now, heres where it works and doesn't. If I have this line (similar for the second drop down):
 <asp:DropDownList ID="cmbEdit_Enabled" runat="server" Width="119px" SelectedValue='<%# Bind("Enabled") %>'>  
                                    <asp:ListItem Value="True">Yes</asp:ListItem> 
                                    <asp:ListItem Value="False">No</asp:ListItem> 
                                </asp:DropDownList> 
when I go into edit mode, the drop downs are populated with the current values which is a project requirement.  But when I click the 'Add new user', I get this error:

'cmbEdit_Rights' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value

If I leave out the <%# Bind("UserLevel") %> I can insert and update, but I loose the requirement of displaying the current value which I need.


Please help asap!
Shinu
Top achievements
Rank 2
 answered on 29 Feb 2012
2 answers
338 views
Hello there,

I have a RadListView displaying data in pages of 4 using the RadDataPager:
              <telerik:RadDataPager ID="UnlocatedCasesPager"  
                                                      runat="server"  
                                                      PagedControlID="UnlocatedCasesListView"  
                                                      PageSize="4"
                                    <Fields> 
                                        <telerik:RadDataPagerButtonField FieldType="FirstPrev" /> 
                                        <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="3" /> 
                                        <telerik:RadDataPagerButtonField FieldType="NextLast" /> 
                                    </Fields> 
                                </telerik:RadDataPager> 

I cannot work out how to hide the pager when there are 4 or less items being displayed in my list view. I have tried using the FindControl method of the ListView to get hold of the pager and hide it if necessary in various places (OnDataBound event and when I actually assign the datasource of the ListView) but that always returns null. The pager is contained in the <LayoutTemplate>.

Thanks very much, Carl
Daryl
Top achievements
Rank 1
 answered on 29 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?