Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
88 views
I need to be able to know in NeedDataSource event what filter menu option was chosen by the user when filtering.  For example, if the user enters a phrase in the filter and then chooses "Contains", how do I know that the user chose "Contains".  I cannot find this anywhere in the forum or when I search the internet.
Shinu
Top achievements
Rank 2
 answered on 03 Apr 2012
1 answer
272 views
How can I retrieve a hidden asp:Label field when the OnClientSelectedIndexChanged event is raised?

javascript:
function OnClientSelectedIndexChanged(sender, eventArgs) {
    var item = eventArgs.get_item();
    if (item.get_text() == "Rejected") {
        var WorkItemId = [...]
        OpenReasonWindow(workItemId);
    }
}


markup:
<tr id="ctl00_PageContent_rtlRshItems_ctl04__2" class="rtlR rtlRL" style="background-color:Lavender;">
 
<td align="left" valign="middle" style="width:90px;">
    <div id="ctl00_PageContent_rtlRshItems_ctl04_rcbStatus" class="RadComboBox RadComboBox_Windows7">
        <table class="rcbFocused" style="border-width: 0pt; border-collapse: collapse;" summary="combobox">
            <tbody>
                <tr class="rcbReadOnly">
                    <td class="rcbInputCell rcbInputCellLeft" style="width:100%;">
                        <input id="ctl00_PageContent_rtlRshItems_ctl04_rcbStatus_Input" class="rcbInput" type="text" readonly="readonly" value="Submitted" name="ctl00$PageContent$rtlRshItems$ctl04$rcbStatus" autocomplete="off">
                    </td>
                    <td class="rcbArrowCell rcbArrowCellRight">
                        <a id="ctl00_PageContent_rtlRshItems_ctl04_rcbStatus_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a>
                    </td>
                </tr>
            </tbody>
        </table>
 
        <input id="ctl00_PageContent_rtlRshItems_ctl04_rcbStatus_ClientState" type="hidden" name="ctl00_PageContent_rtlRshItems_ctl04_rcbStatus_ClientState" autocomplete="off">
    </div>
</td>
 
<td class=" rtlCL" style="width:0px;">
    <asp:label id="lblWorkItemId" text="199" visible="false"> </asp:label>
</td>

I want to obtain the value of lblWorkItemId, how can I do this?
Princy
Top achievements
Rank 2
 answered on 03 Apr 2012
5 answers
222 views
I have a ListBox on my EditForm that is populated based on the CommandArgument from the ItemCommand. The data is being accessed, but when I go to add the data to the ListBox, the control isn't being found. Here's what I have: 

if (e.CommandName == "Edit") {
                GridEditFormItem item = (GridEditFormItem)(e.Item as GridDataItem).EditFormItem;
                ListBox lb = (ListBox)item.FindControl("lstMembers");

the ListBox is null, the control is named "lstMembers" (I already checked that) my suspicion is something in the previous line of code. When I put the same two lines in another block (different command name) it works fine, so I think it might have something to do with the fact that the control itself isn't loaded yet. Can someone confirm/clarify this for me, and if so give me a work around?
Shinu
Top achievements
Rank 2
 answered on 03 Apr 2012
3 answers
140 views
Hi

We're looking for a control that can elegantly display a graph (where nodes can have multiple parents) as opposed to a tree.

Currently we're using RadTreeView and where nodes have multiple parents, we make a copy of the node and place it under each parent. This is not ideal as it does not highlight to the user that they're dealing with a 'copy' and what and where the other parents are.

  • Is there a way to get RadTreeView to display nodes that have multiple parents?
  • Are there any other Telerik controls that are more adept to displaying this data?
  • If not, do you have any recommendations on how we could proceed?

Thanks
Clinton Smyth
Top achievements
Rank 1
 answered on 03 Apr 2012
1 answer
153 views
Hi, When I try to select file using rad asyncupload control in iPad, the open window does not appear. Need solution as soon as possible.....
Troy Clemons
Top achievements
Rank 1
 answered on 03 Apr 2012
2 answers
135 views
I'm starting to use the treeview control for the first time.  I have the following data coming out of a table

Parent ID Text
null      1   USA
null      2   CANADA
null      3   Mexico
1          4   FLORIDA
2          5   ONTERIO
3          6   MEXICO CITY
4          7   ORLANDO

This is my control definition

    <telerik:RadTreeView ID="RadTreeView1" runat="server" DataFieldID="ID"
      DataFieldParentID="PARENT" DataSourceID="SqlDataSource1" DataTextField="Text"
      DataValueField="ID"  >

My issue that i'm having is that the web page only shows the parent levels and there is no way to see the children levels. 
What other setting do I need to set to have the tree show USA then I click on a plus sign then see FLORIDA and then click again and see ORLANDO?

Thank you

jerry
Top achievements
Rank 1
 answered on 02 Apr 2012
1 answer
123 views
I have a radgrid using advanced databinding to connect to a linq to sql datasource.  The grid allows the user to edit the data stored in a table in a sql database.  One of the fields is a foreign key to another table.  The grid will properly catch invalid values when editing a row and not allow the invalid value to be written to the database, however the invalid value still appears in the radgrid until the user clicks the grid's refresh button.  This is a problem because the user see's invalid values saved to the grid even though they are not saved to the database.

Here is the code behind for the update command
Protected Sub RadGrid1_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
    Dim item As GridEditableItem = TryCast(e.Item, GridEditableItem)
    Dim ein = item.GetDataKeyValue("EIN").ToString()
    Dim distributor = DbContext.Distributors.Where(Function(n) n.EIN = ein).FirstOrDefault()
    item.UpdateValues(distributor)
    Dim channel = DbContext.Channels.Where(Function(n) n.ChannelId = distributor.ChannelId).FirstOrDefault()
    If channel Is Nothing Then
        displayError("Distributor was not updated. Please enter a valid channelId.")
        Else()
        Try
            DbContext.SubmitChanges()
        Catch ex As Exception
            displayError("Record cannot be updated")
 
        End Try
 
    End If
End Sub

The value that is causing the problem is the channelId.  I have written code to check if the channel exists and display a popup if the channel doesn't exist.  However, the grid still retains the invalid value.

Thanks in advance,
Jonathan Clark
Jonathan
Top achievements
Rank 1
 answered on 02 Apr 2012
2 answers
204 views

How to set the backcolor ... it comes out white no matter what I try...

<telerik:RadNotification ID="NotifyNotClockedIn" runat="server" AutoCloseDelay="10000"
       VisibleTitlebar="false" Width="95%" Animation="Slide" EnableRoundedCorners="true" BackColor="Black"
       OnCallbackUpdate="NotifyNotClockedIn_Update" OnClientUpdated="OnClientUpdated"
       Height="225px" Position="TopCenter" EnableShadow="true" Title="Not Clocked In"
       AnimationDuration="5000">
Ken
Top achievements
Rank 1
 answered on 02 Apr 2012
1 answer
118 views
Hi,

I added a previous and next button outside of the grid as I wrote in this thread:
http://www.telerik.com/community/forums/aspnet-ajax/grid/add-previous-and-next-button-outside-of-grid.aspx

The previous and next button's work great.  But if the grid visible area shows 10 records and your grids page size is 50 then you have to scroll down to see the next records.   The problem is that once I'm on the 10th record and I click on the next button I go to the next record, but the scroll bar does not move with the selected record.  Is there a way to make the scrollbar move with the selected record in the grid?

My rad grid:
<telerik:RadGrid  ID="radGrid1" runat="server"
    AllowPaging="True" AllowSorting="True" CellSpacing="0" GridLines="None"
    AllowCustomPaging="True" PageSize="50"  Width="100%"
    Skin="Outlook" onneeddatasource="radGrid1_NeedDataSource"
        AutoGenerateColumns="False"  OnItemCommand="radGrid1_ItemCommand" OnPreRender="radGrid1_PreRender">
    <ExportSettings HideStructureColumns="true" />
    <ClientSettings>
    <Selecting CellSelectionMode="None" EnableDragToSelectRows="True"></Selecting>
        <Scrolling SaveScrollPosition="false"  AllowScroll="True" UseStaticHeaders="true" ScrollHeight="300px" />
    </ClientSettings>
    <MasterTableView>
 
    <Columns>
         <telerik:GridBoundColumn Visible="false" UniqueName="id"
             HeaderText="id" DataField="id">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="name"
            SortExpression="name" HeaderText="Name" DataField="name">
        </telerik:GridBoundColumn>
         <telerik:GridBoundColumn UniqueName="Dob"
            SortExpression="Dob" HeaderText="DOB" DataField="Dob" DataFormatString="{0:MM/dd/yyyy}">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="Creation_date"
            SortExpression="Creation_date" HeaderText="Request Date" DataField="Creation_date" DataFormatString="{0:MM/dd/yyyy}">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="Status"
            SortExpression="Status" HeaderText="Test Status" DataField="Status">
        </telerik:GridBoundColumn>
    </Columns>
    </MasterTableView>
    <ClientSettings EnablePostBackOnRowClick="true"   Selecting-AllowRowSelect="true" AllowKeyboardNavigation="true"  />
</telerik:RadGrid>


Thank you,
-Hitesh
Hitesh
Top achievements
Rank 1
 answered on 02 Apr 2012
2 answers
109 views
Hi,

I'm trying to add a previous and next button outside of the grid. I'm having some problems doing that. Can somebody give me some direction on how this is done?

Functionality:
If next button is pressed, the next record after the selected record is picked.
If previous button is pressed, the previous record from the selected record is picked.

Thank you,
-Tesh
Hitesh
Top achievements
Rank 1
 answered on 02 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?