Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
1.7K+ views

Hi support Team,

 In Kendo ui Grid ...I am Apply the Composite Filter ...But Problem with The ...Here in Filter ....I have some  "True" or "False"  Column ......Instead of Showing The "True"  ...."Y" and "False" ...."N"...So  I am Apply Following Logic For that 

 C# Code When User Gives  "Y" or "N"....based on That  .....setting True or False.

   private static void addFilter(XElement newFilter, FilterDescriptor firstFilter, string crmAttributeName, GetCrmColumnName getColumnInfo)
     {
            if (firstFilter.Member == "OnHold")
         {
                if (firstFilter.Value.ToString().ToLower() == "y")
                {
                    firstFilter.Value = true;
                }
                else if (firstFilter.Value.ToString().ToLower() == "n")
                {
                    firstFilter.Value = false;
                }
            }
                newFilter.Add(new XElement("condition",
                    new XAttribute("attribute", crmAttributeName),
                    new XAttribute("operator", getOperator(firstFilter.Operator, crmAttributeName)),
                    new XAttribute("value", String.Format(getOperatorFormat(firstFilter.Operator), firstFilter.Value.ToString().Trim()))));           
        }

 After Result Came I Need To ..Assign Same "Y" or "N"

So I Write The Following code

    foreach (var n in request.Filters)
            {           
                    if (((FilterDescriptor)(n)).Member == "OnHold")
                    {
                        if (((FilterDescriptor)(n)).Value.ToString().ToLower() == "true")
                        {
                            ((FilterDescriptor)(n)).Value = "y";
                        }
                        else
                        {
                            ((FilterDescriptor)(n)).Value = "n";
                        }
                    
                }          
            }

 

It Work Fine ....For Normal Filter ...When ...I suppose ....Use CompositeFilter Then  I got Problem....If ...Work with Composite Filter ..I need Display ...Not Empty or an error...

 

 

  foreach (var n in request.Filters)
            {
                if (n is CompositeFilterDescriptor==true)
                {
                    if (((CompositeFilterDescriptor)(n)).FilterDescriptors.Count() >= 2)
                    {
                     
                    }
                }
                else
                {       
                    if (((FilterDescriptor)(n)).Member == "OnHold")
                    {
                        if (((FilterDescriptor)(n)).Value.ToString().ToLower() == "true")
                        {
                            ((FilterDescriptor)(n)).Value = "y";
                        }
                        else
                        {
                            ((FilterDescriptor)(n)).Value = "n";
                        }
                    }
                }          
            }

Currently.....It  Work For Composite Filter also..But when .....we Include Filter Of "Y" or "N".....I got ...Problem....When User Give even Though ..."Y" or "N"...Columns in the Composite Filter.....We need to Display....matched Columns.....

 

 

Sairam
Top achievements
Rank 1
 answered on 09 Jun 2015
7 answers
240 views

Hi Team,

We are using Telerik Rad editor in our SharePoint 2013 environment and activated "Use RadEditor to edit HTML fields" feature to replace the default Rich Html editor with Rad Editor. When we edit a page and make any changes in Rad editor content and check in the page, sometimes Rad editor looses its content and blank page gets checked in.

Kindly suggest how can we resolve this issue.

Thanks & Regards,

Brijesh Patil

Ianko
Telerik team
 answered on 09 Jun 2015
1 answer
66 views

Hi There,

When looking for your client side documentation for RadComboBox today I notice that much of the API I am used to is not present. eg. set_text() and other accessors.

It appears there is only trackChanges and commitChanges listed as methods on the RadComboBox.

See http://docs.telerik.com/devtools/aspnet-ajax/controls/combobox/client-side-programming/objects/radcombobox-object

 

Just wondering where I can get access to this documentation online now.

 

Regards,

Daniel

Ivan Danchev
Telerik team
 answered on 09 Jun 2015
4 answers
837 views

Hi,

I am just wondering if there is full working example of a RadGrid with file download functionality anywhere?

My requirements are pretty simple - 

1. One of the grid columns will contain the actual name of the file (including extension) which I want to present as a clickable link (using asp:LinkButton maybe?).

2. Once the link is clicked the actual path to the physical file will have to be assembled in the code behind (don't want to expose file system details to the client apart from the file name).

3. The browser will allow the user to download the file in the normal way.

That's it. Just wondering if there is a good working example of this anywhere? Please let me know if any clarification is required. 

Thanks :)

Eyup
Telerik team
 answered on 09 Jun 2015
8 answers
1.4K+ views
Hello,

I'm having some trouble with getting the header column of the datagrid I'm exporting to excell to display what I want.  I have the grid display the header the way I want but when I export the grid the excel spread sheet has the header as the column names in my database table.  Can I change that so the spreadsheet headers say what I want?

Thanks,
Kirk
Eyup
Telerik team
 answered on 09 Jun 2015
2 answers
96 views

Hi,

I have developed an application with Telerik 2013 Q1. components. Previously the application was in .Net 3.5 . Now i have upgraded our application to .Net framework 4.0 and hosted our application in Win Server 2012 . The problem we are facing is, All the controls are working fine locally but after hosting. There is an issue with RadCombo. It is not rendering perfectly. or it became read only. we have dynamically populated the Radcombo.

RadCombo is not opening now.

Please help me, as we need this asap..

 

Thanks

Neel

Indranil
Top achievements
Rank 1
 answered on 09 Jun 2015
7 answers
177 views

I am using a radgrid to display data. I want to place a banner on the pdf file that gets downloaded.

this is my code:

<PageHeader>
<MiddleCell Text="<img src='Images/CME-Transcript-HeaderLong.jpg' />" TextAlign="Center" />

<RightCell TextAlign="Center" />
</PageHeader>

 

this inserts a small image in the center but I need it to be displayed as the same length as my radgrid on the pdf. How do I change the size of this image to make it a banner size?

 

Also, I am displaying some data generated dynamically in the middle of the header. I need to move it below the header but before the radgrid on the pdf. I need to display it in a horizontal line above the grid. How do I go about changing the position of data?

 

headerText += "<br /><span style='font-size:8px;font-family:Segoe UI;'>Report Date: " + DateTime.Now.Date.ToShortDateString() + "</span>" ;
headerText += "<br /><span style='font-size:8px; font-family:Segoe UI;'>" + lblParticipantName.Text + "</span>";
headerText += "<br /><span style='font-size:8px; font-family:Segoe UI;'>SDMS Member #: " + lblNo.Text + "</span>";

RadGrid1.ExportSettings.Pdf.PageHeader.RightCell.Text = headerText;

Thanks,

Kostadin
Telerik team
 answered on 09 Jun 2015
5 answers
280 views
i have use RadAutoCompleteBox control in asp.net. and  everything working fine but i have one problem.

when i type in autocomplete text both then its show me result in
dropdown and when i click out side of that dropdown (without select any
item from result) then first item automatically selected :(.

i don't need auto selection until i hit enter or click on item.

How can i do it?

Thanks,
Hiren Suthar
Plamen
Telerik team
 answered on 09 Jun 2015
5 answers
273 views
Hi,

I'm trying to setup a RadTreeList with a nested RadGrid in one of the columns using a TemplateColumn. I've had a look at some of the demo's on the Telerik site with nested grids but I haven't been able to figure out how to pass the Key Id of the TreeList row to the Grid so the correct data is loaded into the grid. I'm using a SQLDataSource like some of the examples on the telerik demo's which uses a session parameter but I haven't figured out how this is set? (no sessions are set in the code behind in the demo's)

Any help would be great,

Thanks,
JC
Angel Petrov
Telerik team
 answered on 09 Jun 2015
1 answer
99 views
First of all, my apologies for the length of this post.

Could you please advise me on this problem? When I click on the down
arrow shown in the image below:

I get the following error message:  Cannot find a cell bound to colunm name ‘EditColumn’

The MasterTable is populated by a stored
procedure and bound by an ItemDataBound subroutine in the vb codebehind. The
Detail Table is populated using a different stored procedure by the following
subroutine:

Protected Sub rgvObjective_DetailTableDataBind(source As Object, e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles rgvObjective.DetailTableDataBind

        Dim dataItem As GridDataItem = DirectCast(e.DetailTableView.ParentItem, GridDataItem)

        Dim poid = Integer.Parse(dataItem.GetDataKeyValue("PO_ID"))

        Dim dd As New CSREntities

        e.DetailTableView.DataSource =
dd.usp_ProjectIndicator_Get_Grid(poid)

   
End Sub

Both stored procedures bring back PO_ID.

 

Thank you,

Jerry Saunders

 

The code is as follows:

<telerik:RadGrid ID="rgvObjective" EnableEmbeddedSkins="false" Skin="MySkin" AllowSorting="True" OnDetailTableUpdateCommand="rgvObjective_DetailTableUpdateCommand"
AutoGenerateColumns="False" runat="server" CellSpacing="0" GridLines="None" PageSize="20" OnDetailTableDataBind="rgvObjective_DetailTableDataBind"

AllowPaging="true" PagerStyle-AlwaysVisible="true"

OnNeedDataSource="rgvObjective_NeedDataSource"  AllowResizeToFit="true"
OnUpdateCommand="rgvObjective_UpdateCommand" OnDeleteCommand="rgvObjective_DeleteCommand" OnInsertCommand="rgvObjective_InsertCommand">

<MasterTableView DataKeyNames="PO_ID" CommandItemDisplay="Top" EditMode="InPlace" Name="POID">

  <HeaderStyle Font-Bold="true" />

    <NoRecordsTemplate>

       <div class="emptyGrid">

          No objectives found.

       </div>

    </NoRecordsTemplate>

    <DetailTables>

      <telerik:GridTableView DataKeyNames="PI_INDICATOR" CommandItemDisplay="Top" EditMode="InPlace"    Name="PIINDICATOR">

      <ParentTableRelation>

         <telerik:GridRelationFields DetailKeyField="PO_ID" asterKeyField="PO_ID"></telerik:GridRelationFields>

      </ParentTableRelation>

        <Columns>

          <telerik:GridBoundColumn DataField="PO_ID" Display="false"></telerik:GridBoundColumn>

          <telerik:GridBoundColumn DataField="PI_ID" Display="false"></telerik:GridBoundColumn>

          <telerik:GridDropDownColumn UniqueName="PI_INDICATOR" DataField="PI_INDICATOR" ListDataMember="PI_INDICATOR" ListTextField="PI_INDICATOR" ListValueField="PI_INDICATOR"  HeaderText="Indicator" ></telerik:GridDropDownColumn>

          <telerik:GridBoundColumn UniqueName="PI_FIELD_SUFFIX" DataField="PI_FIELD_SUFFIX" HeaderText="Measurement" ></telerik:GridBoundColumn>

          <telerik:GridBoundColumn UniqueName="PI_CALC_DESC" DataField="PI_CALC_DESC" HeaderText="Measurement
Calculation" ></telerik:GridBoundColumn>

          <telerik:GridEditCommandColumn UniqueName="EditColumn1" ItemStyle-HorizontalAlign="Right"  ItemStyle-Width="50px"></telerik:GridEditCommandColumn>

<telerik:GridButtonColumn UniqueName="DeleteColumn" ConfirmText="Are you sure you want to delete this
Indicator?" ConfirmDialogType="Classic" CommandName="Delete" Text="Delete"></telerik:GridButtonColumn>

         </Columns>

       </telerik:GridTableView>

     </DetailTables>

     <Columns>

        <telerik:GridDropDownColumn UniqueName="POG_NAME"  DataField="POG_NAME" ListDataMember="POG_NAME" ListTextField="POG_NAME" ListValueField="POG_NAME" HeaderText="Project
Owner" DropDownControlType ="DropDownList" ></telerik:GridDropDownColumn>

        <telerik:GridDropDownColumn UniqueName="PC_NAME"  DataField="PC_NAME" ListDataMember="PC_NAME" ListTextField="PC_NAME" ListValueField="PC_NAME" HeaderText="Project
Category" DropDownControlType ="DropDownList" ></telerik:GridDropDownColumn>

        <telerik:GridDropDownColumn UniqueName="PBT_NAME"  DataField="PBT_NAME" ListDataMember="PBT_NAME" ListTextField="PBT_NAME" ListValueField="PBT_NAME" HeaderText="Project
Beneficiary" DropDownControlType ="DropDownList" ></telerik:GridDropDownColumn>

       <telerik:GridBoundColumn UniqueName="PO_OBJECTIVE"  DataField="PO_OBJECTIVE" HeaderText="Project Objective"></telerik:GridBoundColumn>

       <telerik:GridBoundColumn DataField="PO_ID" Display="false"></telerik:GridBoundColumn>

       <telerik:GridBoundColumn DataField="PO_PC_ID" Display="false"></telerik:GridBoundColumn>

       <telerik:GridBoundColumn DataField="PO_PBT_ID" Display="false"></telerik:GridBoundColumn>

       <telerik:GridEditCommandColumn UniqueName="EditColumn" ItemStyle-HorizontalAlign="Right"  ItemStyle-Width="50px"></telerik:GridEditCommandColumn>

       <telerik:GridButtonColumn UniqueName="DeleteColumn" ConfirmText="Are you sure you want to delete this
Objective?" ConfirmDialogType="Classic" CommandName="Delete" Text="Delete"></telerik:GridButtonColumn>

      </Columns>

      <CommandItemSettings  AddNewRecordText="Add New Objective"  ShowRefreshButton="false" />

    </MasterTableView>

    <GroupingSettings CaseSensitive="False" />

  </telerik:RadGrid>

</ContentTemplate>

 

Kostadin
Telerik team
 answered on 09 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?