Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
189 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
58 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
143 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
183 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
126 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
40 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
42 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
91 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
405 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
3 answers
170 views
I found this article which is a few years old which partially describes how to flatten data in the RadGrid:

http://www.telerik.com/community/forums/aspnet-ajax/grid/change-grid-structure-data-on-export-to-excel.aspx

However, based on what I can tell from the forum posting/thread, their implementation differs from my RadGrid structure.  I am specifically using the GridGroupBy fields rather than simply hiding columns in my RadGrid.

I essentially want to turn all of my GridGroupByFields into columns as well with their data aligned side by side with the detail columns when I export to Excel.  Is there some built in functionality that can accomplish this?  If not, is there a code sample someone can provide me with in order to accomplish this?

Below is my RadGrid code:

<telerik:radgrid id="gvStudentClassSchedule" runat="server"
                cellspacing="0" gridlines="None" skin="Outlook" showfooter="True" datasourceid="sqlDSClassRoster">
                <exportsettings excel-format="ExcelML" exportonlydata="true" ignorepaging="true" openinnewwindow="true" hidestructurecolumns="true" />
                <mastertableview autogeneratecolumns="False" datakeynames="CourseID" showgroupfooter="true" allowfilteringbycolumn="true" allowpaging="true" commanditemdisplay="Top">
                    <commanditemsettings showexporttoexcelbutton="true" showexporttocsvbutton="true" showaddnewrecordbutton="false" />
                    <rowindicatorcolumn filtercontrolalttext="Filter RowIndicator column">
                    </rowindicatorcolumn>
                    <expandcollapsecolumn filtercontrolalttext="Filter ExpandColumn column">
                    </expandcollapsecolumn>
                      <groupbyexpressions>
                        <telerik:gridgroupbyexpression>
                            <selectfields>
                                <telerik:gridgroupbyfield fieldalias="Name" fieldname="Name" />
                                <telerik:gridgroupbyfield fieldalias="Age" fieldname="Age" />
                                <telerik:gridgroupbyfield fieldname="Address1" fieldalias="Address" />
                                <telerik:gridgroupbyfield fieldname="City" />
                                <telerik:gridgroupbyfield fieldname="State" />
                                <telerik:gridgroupbyfield fieldname="Zip" />
                                <telerik:gridgroupbyfield fieldname="HomePhone" />
                                <telerik:gridgroupbyfield fieldname="CellPhone" />
                                <telerik:gridgroupbyfield fieldname="EmailAddress" />
                                <telerik:gridgroupbyfield fieldname="InvoiceNumber" fieldalias="InvoiceNumber" />
                            </selectfields>
                            <groupbyfields>
                                <telerik:gridgroupbyfield fieldalias="StudentID" fieldname="PersonID" sortorder="None" />
                                <telerik:gridgroupbyfield fieldname="Name" fieldalias="Name" sortorder="Ascending" />
                            </groupbyfields>
                        </telerik:gridgroupbyexpression>
                    </groupbyexpressions>
                    <columns>
                        <telerik:gridboundcolumn datafield="CourseID" datatype="System.Int32"
                            filtercontrolalttext="Filter CourseID column" headertext="CourseID"
                            readonly="True" sortexpression="CourseID" uniquename="CourseID" display="false">
                        </telerik:gridboundcolumn>
                        <telerik:griddatetimecolumn datafield="InvoiceDate" headertext="Transaction Date" allowfiltering="true" pickertype="DatePicker" dataformatstring="{0:d}" filtercontrolwidth="100px" uniquename="InvoiceDate" />
                        <telerik:gridboundcolumn datafield="CategoryDesc"
                            filtercontrolalttext="Filter AgeGroup column" headertext="AgeGroup"
                            sortexpression="AgeGroup" uniquename="AgeGroup">
                        </telerik:gridboundcolumn>
                          <telerik:gridboundcolumn datafield="SubjectDesc"
                            filtercontrolalttext="Filter Subject column" headertext="Subject"
                            sortexpression="Subject" uniquename="Subject">
                        </telerik:gridboundcolumn>
                        <telerik:gridboundcolumn datafield="Days"
                            filtercontrolalttext="Filter Days column" headertext="Days"
                            sortexpression="Days" uniquename="Days">
                        </telerik:gridboundcolumn>
                         <telerik:gridboundcolumn datafield="StartTime"
                            filtercontrolalttext="Filter StartTime column" headertext="StartTime"
                            sortexpression="StartTime" uniquename="StartTime">
                        </telerik:gridboundcolumn>
                        <telerik:gridboundcolumn datafield="EndTime"
                            filtercontrolalttext="Filter EndTime column" headertext="EndTime"
                            sortexpression="EndTime" uniquename="EndTime">
                        </telerik:gridboundcolumn>
                        <telerik:gridboundcolumn datafield="TermDesc"
                            filtercontrolalttext="Filter Term column" headertext="Term"
                            sortexpression="Term" uniquename="Term">
                        </telerik:gridboundcolumn>
                        <telerik:gridboundcolumn datafield="CourseLength" datatype="System.Int32"
                            filtercontrolalttext="Filter CourseLength column" headertext="Length (Weeks)"
                            sortexpression="CourseLength" uniquename="CourseLength">
                        </telerik:gridboundcolumn>
                        <telerik:gridboundcolumn datafield="Cost" datatype="System.Decimal"
                            filtercontrolalttext="Filter CostResident column" headertext="Cost"
                            sortexpression="CostResident" uniquename="CostResident" aggregate="Sum" dataformatstring="{0:C}" footeraggregateformatstring="Total Cost: {0:C}">
                        </telerik:gridboundcolumn>
                    </columns>
                    <editformsettings>
                        <editcolumn filtercontrolalttext="Filter EditCommandColumn column">
                        </editcolumn>
                    </editformsettings>
                </mastertableview>
                <filtermenu enableimagesprites="False">
                </filtermenu>
                <headercontextmenu cssclass="GridContextMenu GridContextMenu_Default">
                </headercontextmenu>
            </telerik:radgrid>


Please advise.

Thanks.
Daniel
Telerik team
 answered on 21 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?