Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
224 views
In the ApplyExpressions event, I need to iterate over the RadFilterApplyExpressionsEventArgs.Expressions collection.  It appears that to access specific values of each filter expression (field name, field type, view state, value, etc.), you need to cast each filter expression to its specific derived type.  The only property exposed at the RadFilterExpression base type level is FilterFunction.

Basically I'm looking for the best way to iterate over a collection RadFilterExpressions, and access the specific properties of each instance.  What makes this a little more complex that you'd expect is that each filter expression is composed of a number derived types - with the filter properties and values exposed by different types in the chain.  What's the best way to access the specific filter expression properties?

Can anyone point me to a code example? 
Brian Pratt
Top achievements
Rank 1
 answered on 21 Jun 2011
5 answers
191 views
I'm usig the clearfilter functionality as described in the below demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx
 You can see in the demo, type something in the filter box and before filtering(before clicking enter or tab) if you click on clear filter button, it is filtering the grid instead of clearing the filter text box as it is firing the filtercommand..Is there a way to fix this.
Iana Tsolova
Telerik team
 answered on 21 Jun 2011
1 answer
59 views
Hi All,

Can anyone tell me how can I implement Rad Binary Image control in sharepoint webparts?

A demo is given on this control in Telerik site where they used SQL server as backend to retrieve images.

But here I want to use Picture library path or Lists to retrieve Images.

Help me how can I integrate and get the result.

Regards
BRK
Tsvetoslav
Telerik team
 answered on 21 Jun 2011
1 answer
146 views
Hi,

I am using RadAjaxPanel in master page as shown below:


<
telerik:RadAjaxPanel ID="rapContents" runat="server" EnableAJAX="true" OnAjaxSettingCreating="rapContents_AjaxSettingCreating">

 

 

 

<asp:ContentPlaceHolder ID="phContents" runat="server">

 

 

 

</asp:ContentPlaceHolder>

 

 

 

</telerik:RadAjaxPanel>

 


And in the content page I used a radcombobox, the code is below:

 

 

<telerik:RadComboBox ID="rcbSP" runat="server" DataValueField="ID" DataTextField="Name"

 

 

 

EmptyMessage="None" HighlightTemplatedItems="true" AllowCustomText="true" Width="180"

 

 

 

OnClientDropDownClosed="onDropDownClosing"><ItemTemplate>

 

 

 

<div onclick="StopPropagation(event)" class="combo-item-template">

 

 

 

<asp:CheckBox runat="server" ID="chkSP" onclick="onCheckBoxClick(this, 'SP')" />

 

 

 

<asp:Label runat="server" ID="lblSP" AssociatedControlID="chkSP">

 

<%

 

# Eval("Name")%>

 

 

 

 

</asp:Label>

 

 

 

</div>

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadComboBox>

 


 

 

//Combobox Binding - only binding first time the page loads

 

 

 

this.rcbSP.DataSource = LU_ServerPurposeBLL.GetList(false);

 

 

 

 

this.rcbSP.DataBind();

 


Now my issue is, when I have a postback in the content page, the data (list items) in the combobox is lost and displaying "None" (the empty message).

Please help me in resolving the issue. Thanks in advance.

 

 

 

Kate
Telerik team
 answered on 21 Jun 2011
8 answers
185 views
Hi,

I wanted to populate a Treeview based upon a DataTable retrieved from the AdventureWorks database using a recursive CTE in a Stored Procedure. It is the good old recursive problem of components witin components within a product. The SP is:

USE [AdventureWorks]
GO
/****** Object:  StoredProcedure [dbo].[CreateProductComponentHeirarchyForProduct]    Script Date: 05/18/2011 20:44:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 
ALTER PROCEDURE [dbo].[CreateProductComponentHeirarchyForProduct]
    @ComponentID int
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
 
    ; WITH BillOfMaterialsCTE
    (
        BillOfMaterialsID,
        ProductAssemblyID,
        ComponentID,
        Quantity,
        Level
    )
    AS
    (
        SELECT  bom.BillOfMaterialsID,
            bom.ProductAssemblyID,
            bom.ComponentID,
            bom.PerAssemblyQty,
            0 as Level
        FROM Production.BillOfMaterials bom
        WHERE bom.ComponentID = @ComponentID
         
        UNION ALL
         
        SELECT  bom.BillOfMaterialsID,
            bom.ProductAssemblyID,
            bom.ComponentID,
            bom.PerAssemblyQty,
            Level + 1
        FROM Production.BillOfMaterials bom
        INNER JOIN BillOfMaterialsCTE bomCTE
            ON bom.ProductAssemblyID = bomCTE.ComponentID
        WHERE bom.EndDAte IS NULL
    )
    SELECT 
        bomCTE.ProductAssemblyID,
        p.ProductID,
        p.ProductNumber,
        p.Name,
        p.Color,
        bomCTE.Quantity,
        bomCTE.Level
    FROM BillOfMaterialsCTE bomCTE
    INNER JOIN Production.Product p
        on bomCTE.ComponentID = p.ProductID
     
END

I used the following method to populate a RadTreeView on a page:

public void SetResults(DataTable results)
{
    this.ProductsRadTreeView.DataSource = results;
 
    this.ProductsRadTreeView.DataFieldID = "ProductAssemblyID";
    this.ProductsRadTreeView.DataFieldParentID = "ProductID";
    this.ProductsRadTreeView.DataTextField = "Name";
 
    this.ProductsRadTreeView.DataBind();
}

When it hits the DataBind() call, the error message is: These columns don't currently have unique values.

This is no surprise to me. I did not expect them to be unique It is a recursive algorithm where components can be used in more than one component/product, so of course there will be duplicates.

Can the RadTreeView display such a ResultSet?

Cheers
Nikolay Tsenkov
Telerik team
 answered on 21 Jun 2011
1 answer
129 views
Hello Telerik Experts,
I need my RadScheduler to a fixed size - width will be 380 pixels and height will be 300 pixels.
I need to have it such that there is no scrolling for the month view but the days of the week view will have scrolling.
For the month view, all of the months days should be viewable within the pixel size mentioned.

Thank you in advance.
Plamen
Telerik team
 answered on 21 Jun 2011
1 answer
46 views
Hi
iam working with radwindow i just wanna open rad window in my treeviewnodeContextMenu click i already tried with OpenerElementID Property but it doesnt work that to i need to open radwindow  with <ContentTemplate> in treeviewnodeContextMenu Clicking event is there any way to open radwindow with <ContentTemplate>  in javascript method.

Thank u
Marin Bratanov
Telerik team
 answered on 21 Jun 2011
1 answer
43 views
Hi There,

I am new to web development. Recently i have encountered a problem with my implementation where the tool tip does not appear as expected after the browser refresh.

Could any one of you let me know if this issue is specific to the browser.. I have seen this problem on Firefox, chrome and IE....

Thanks in advance..

Regards,
.\Robin.
Marin Bratanov
Telerik team
 answered on 21 Jun 2011
1 answer
96 views
Hello,

for any reason one of my thread has disapeared so i'm writing again on the same subject (Gimmik had begun to help me with that problem)

i've almost met my requirements for a demo with the telerik grid. The aim was to build a grid with a custom template inside and an edit custom pop-up.

I'm ok with that.
The only thing is that when i'm editing a row, every value is underlined in the grid. Is there a way to disable this style ?

here is my code
<telerik:RadGridID="RadGrid2"runat="server"AutoGenerateColumns="True"EnableViewState="True"
   OnNeedDataSource="RadGrid2_NeedDataSource"ShowHeader="False"Width="100%"OnDeleteCommand="test">
   <MasterTableViewTableLayout="Fixed"EditMode="PopUp">
     
      <ItemTemplate>
         <tablewidth="100%">
            <colwidth="50px"/>
            <colwidth="50px"/>
            <colwidth="*"/>
            <colwidth="*"/>
            <colwidth="*"/>
            <tr>
               <td>
                  <asp:ImageButtonrunat="server"ID="edit"CommandName="Edit"ImageUrl="http://localhost/imgftcarto/editicon.gif"/>
               </td>
               <td>
                  <asp:ImageButtonrunat="server"ID="delete"CommandName="Delete"CommandArgument='<%# Eval("Identifiant")%>' ImageUrl="http://localhost/imgftcarto/delete.gif"
                     OnClientClick="return confirm('Delete this user?');" />
               </td>
               <td>
                  <b>test <%# Eval("Identifiant")%></b>
               </td>
               <td>
                  <%# Eval("Nom")%>
               </td>
               <td>
               <asp:DropDownListrunat="server"ID="ddl">
               <asp:ListItemText="Mr"Value="Mr"></asp:ListItem>
               <asp:ListItemText="Mrs"Value="Mrs"></asp:ListItem>
               <asp:ListItemText="Ms"Value="Ms"></asp:ListItem>
               </asp:DropDownList>
               </td>
            </tr>
            <tr>
               <td>
                     
               </td>
               <td>
                     
               </td>
               <td>
                  <b>test2</b>
               </td>
               <td>
                  <%# Eval("Prenom")%>
               </td>
               <tdrowspan="2">
                  <asp:TextBoxrunat="server"ID="textplace"TextMode="MultiLine"Width="100%"></asp:TextBox>
               </td>
            </tr>
            <tr>
               <td>
                     
               </td>
               <td>
                     
               </td>
               <td>
                  <b>test3</b>
               </td>
               <td>
               <%# Eval("Inscription") %>
               </td>
            </tr>
         </table>
      </ItemTemplate>
      <EditFormSettingsCaptionDataField="Identifiant"EditFormType="Template"PopUpSettings-Width="700px"PopUpSettings-Height="200px"PopUpSettings-Modal="true">
         <FormTemplate>
            <tableid="Table1"cellspacing="1"cellpadding="1"width="100%"border="0">
               <tr>
                  <td>
                     Nom
                  </td>
                  <td>
                     <asp:TextBoxID="TextBox10"Text='<%# Bind("Nom") %>' runat="server">
                     </asp:TextBox>
                  </td>
               </tr>
               <tr>
                  <td>
                     Prenom
                  </td>
                  <td>
                     <asp:TextBoxID="TextBox1"Text='<%# Bind("Prenom") %>' runat="server">
                     </asp:TextBox>
                  </td>
               </tr>
               <tr>
                  <td>
                     Inscription
                  </td>
                  <td>
                     <telerik:RadDatePickerID="picker1"runat="server"DbSelectedDate='<%# Bind("Inscription") %>'>
                     </telerik:RadDatePicker>
                  </td>
               </tr>
            </table>
            <tablewidth="100%">
               <tr>
                  <tdalign="right"colspan="2">
                     <asp:ButtonID="Button1"Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                     </asp:Button>
                     <asp:ButtonID="Button2"Text="Cancel"runat="server"CausesValidation="False"CommandName="Cancel">
                     </asp:Button>
                  </td>
               </tr>
            </table>
         </FormTemplate>
      </EditFormSettings>
   </MasterTableView>
</telerik:RadGrid>
<telerik:GridNumericColumnEditorID="GridNumericColumnEditor1"runat="server"NumericTextBox-Width="40px"/>
<telerik:GridTextBoxColumnEditorID="GridTextBoxColumnEditor1"runat="server"TextBoxStyle-Width="200px"
   TextBoxStyle-BackColor="#FF6600"/>
<telerik:GridTextBoxColumnEditorID="GridTextBoxColumnEditor2"runat="server"TextBoxStyle-Width="200px"
   TextBoxStyle-BackColor="#666666"/>
<telerik:GridDateTimeColumnEditorID="GridDateTimeColumnEditor"runat="server"/>

I've added two picture to show what's wrong

Thanks for your help
Pavlina
Telerik team
 answered on 21 Jun 2011
5 answers
417 views
Hi,
    There must be some simple answer to this, but i am not yet been able to find it. I have a RadGrid and i want to change the forecolor of one of the GridHyperLinkColumn fields. I have tried using ItemStyle-CssClass, ItemStyle-ForeColor but they did not work. Following is the code:

<radG:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" Skin="None" DataSourceID="sdsBlogs" GridLines="None" AutoGenerateColumns="False">

<

MasterTableView DataSourceID="sdsBlogs" DataKeyNames="BLOG_ID">
<
Columns>

<radG:GridHyperLinkColumn DataNavigateUrlField="BLOG_ID" DataNavigateUrlFormatString=http://my.impactwrestling.com/Blog.aspx?ID={0} DataTextField="TITLE" HeaderText="Title" SortExpression="TITLE" UniqueName="TITLE">
</radG:GridHyperLinkColumn

>

<radG:GridHyperLinkColumn DataNavigateUrlField="UserId" DataNavigateUrlFormatString=http://my.impactwrestling.com/MyProfile.aspx?ID={0} DataTextField="UserName" HeaderText="User" SortExpression="UserName" UniqueName="column">
</radG:GridHyperLinkColumn>

<radG:GridBoundColumn DataField="POST_COUNT" HeaderText="# of Comments" SortExpression="POST_COUNT" UniqueName="column1">
</radG:GridBoundColumn>

<radG:GridTemplateColumn HeaderText="Last Post">
<ItemTemplate>
<asp:Label id="lblLocation" runat="server" Text='<%# LastPost((int)Eval("BLOG_ID")) %>'>
</asp:Label>
</ItemTemplate> </radG:GridTemplateColumn>
</
Columns>

<ExpandCollapseColumn Visible="False">
<HeaderStyle Width="19px" />
</ExpandCollapseColumn>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
</
MasterTableView>

</
radG:RadGrid>

I want to make forecolor of Bold n Underlined hyperlink column white

Ram
Top achievements
Rank 1
 answered on 21 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?