Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
82 views
Hi All,
How can remove decimal number from y axis and just display integer numbers????
thanks All
ghadeer
Top achievements
Rank 1
 answered on 19 Sep 2011
1 answer
46 views
Sorry I could not work out where to post this as I dont understand telerik terminology well enough yet!!

I have a RadFilter and a RadGrid on my page.  If I set the DataSourceControls explicitly, it works fine..

 

 

 

 

<asp:EntityDataSource ID="EntityDataSource1" runat="server" 
            ConnectionString="name=Clarity2011Entities"  OrderBy="it.[DisplayName]"
            DefaultContainerName="Clarity2011Entities" EnableFlattening="False" 
            EntitySetName="tblMassMaintenanceFields" 
              
            Select="it.[FieldId], it.[DisplayName], it.[FieldName], it.[TableName], it.[NetDataType]" 
            EntityTypeFilter="tblMassMaintenanceField">
        </asp:EntityDataSource>
        <div class="filterDiv">
            <telerik:RadFilter runat="server" ID="RadFilter1" OnPreRender="RadFilter1_PreRender" DataSourceControlID="EntityDataSource1" FilterContainerID="RadGrid1" ShowApplyButton="false" />
            <asp:SqlDataSource ID="dtcRadGrid1" runat="server" ConnectionString="<%$ ConnectionStrings:BRINVConnectionString %>" CancelSelectOnNullParameter="False"   SelectCommand="Select  DisplayName FROM tblMassMaintenanceFields">
              </asp:SqlDataSource>
  
        </div>
        <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="False"   
            AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" 
            OnItemCommand="RadGrid1_ItemCommand" CellSpacing="0" GridLines="None">
            <MasterTableView IsFilterItemExpanded="false" CommandItemDisplay="Top" 
               >
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
  
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
  
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
  
                <Columns>
                    <telerik:GridBoundColumn DataField="FieldId" DataType="System.Int32" 
                        FilterControlAltText="Filter FieldId column" HeaderText="FieldId" 
                        ReadOnly="True" SortExpression="FieldId" UniqueName="FieldId">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="DisplayName" 
                        FilterControlAltText="Filter DisplayName column" HeaderText="DisplayName" 
                        ReadOnly="True" SortExpression="DisplayName" UniqueName="DisplayName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="FieldName" 
                        FilterControlAltText="Filter FieldName column" HeaderText="FieldName" 
                        ReadOnly="True" SortExpression="FieldName" UniqueName="FieldName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="TableName" 
                        FilterControlAltText="Filter TableName column" HeaderText="TableName" 
                        ReadOnly="True" SortExpression="TableName" UniqueName="TableName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="NetDataType" 
                        FilterControlAltText="Filter NetDataType column" HeaderText="NetDataType" 
                        ReadOnly="True" SortExpression="NetDataType" UniqueName="NetDataType">
                    </telerik:GridBoundColumn>
                </Columns>
  
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
                <CommandItemTemplate>
                    <telerik:RadToolBar runat="server" ID="RadToolBar1" OnButtonClick="RadToolBar1_ButtonClick">
                        <Items>
                            <telerik:RadToolBarButton Text="Apply filter" CommandName="FilterRadGrid" ImageUrl="<%#GetFilterIcon() %>"
                                ImagePosition="Right" />
                        </Items>
                    </telerik:RadToolBar>
                </CommandItemTemplate>
                  
            </MasterTableView>
  
<FilterMenu EnableImageSprites="False"></FilterMenu>
  
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid>

But when I write code to create the entitydatasource I get object not set to instance of an object when the page displays..
Here is the code:

EntityDataSource ClarityEntities = new EntityDataSource();
var conEntitiesString = ConfigurationManager.ConnectionStrings["Clarity2011Entities"];
string strConnEntitiesString = conEntitiesString.ConnectionString;
ClarityEntities.ConnectionString = strConnEntitiesString;
ClarityEntities.OrderBy = "it.[DisplayName]";
ClarityEntities.EnableFlattening = false;
ClarityEntities.DefaultContainerName = "Clarity2011Entities";
//ClarityEntities.ContextTypeName =
ClarityEntities.EntitySetName = "tblMassMaintenanceFields";
ClarityEntities.Select =  "it.[FieldId], it.[DisplayName], it.[FieldName], it.[TableName], it.[NetDataType]";
ClarityEntities.EntityTypeFilter = "tblMassMaintenanceField";
RadGrid1.DataSource = ClarityEntities;
RadGrid1.MasterTableView.DataSource = ClarityEntities;
I thought the above code was the equivalent of the entitydatasource I created in the tag above?  What is different?

Sorry I am a newbie so am probably missing something obvious

TIA
Mira
Telerik team
 answered on 19 Sep 2011
1 answer
54 views
I am having issues everyday with telerik controls  and have no more time to do research and find answers,
looks like we mistakenly thought that telerik controls are not just cool looking but also easy to use (well they are easy to use with datasource controls which we can not use). By some reason
our client still did not purchase controls and I am forced to use public forum for help, I am spending more time on user interface then on business side and we going down as deadline closing in, at the moment I can surely say that in the last two weeks I would have done 30% more in notepad/php and javascript and would get close on completion but clients insists on  "cool" and .net. I am going to halt development until I get access to premium support but would like to know how fast it is for paid customers, I can not wait for an answers all day.
Georgi Tunev
Telerik team
 answered on 19 Sep 2011
1 answer
56 views
I am using Linq queries as my datasource and using gridboundcolums on my radgrid. Whenever I go to sort or page the dataon the radgrid dissapears completely.


  <telerik:RadGrid ID="gridDpSummary" runat="server" CellSpacing="0"
  GridLines="None" EnableEmbeddedSkins="False" Skin="dpgrid" AllowSorting="True"
  AllowPaging="True" PageSize="20" onneeddatasource="gridDpSummary_NeedDataSource">
    <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
    <MasterTableView>
      <Columns>
        <telerik:GridBoundColumn FilterControlAltText="Filter columnVoyage column"
          HeaderText="Voyage" UniqueName="columnVoyage" DataField="voyageID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter columnStartDate column"
          HeaderText="Start Date" UniqueName="columnStartDate" DataField="date">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter columnEndDate column"
          HeaderText="End Date" UniqueName="columnEndDate">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter columnVessel column"
          HeaderText="Vessel" UniqueName="columnVessel" DataField="vesselName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter columnFacility column"
          HeaderText="Facility" UniqueName="columnFacility" DataField="facilityName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter columnDPType column"
          HeaderText="DP Type" UniqueName="columnDPType">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter columnTotalHours column"
          HeaderText="Total Hours" UniqueName="columnTotalHours">
        </telerik:GridBoundColumn>
      </Columns>
    </MasterTableView>
    <PagerStyle Mode="NextPrevAndNumeric" />
    <FilterMenu EnableTheming="true">
      <CollapseAnimation Duration="200" Type="OutQuint" />
    </FilterMenu> 
</telerik:RadGrid>

My NeedDataSource Event
protected void gridDpSummary_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) {
                int companyID = Convert.ToInt32(parameters.companyID);
                DateTime startDate = Convert.ToDateTime(parameters.startDate);
                DateTime endDate = Convert.ToDateTime(parameters.endDate);
                endDate = endDate.AddDays(1);
 
                var voyIDQuery = from vl in dc.lkpVoyageLegs
                                 join vc in dc.lkpVoyageCompanies on vl.voyageID equals vc.voyageID
                                 where vc.companyID == companyID
                                 && vl.aDateTime >= startDate
                                 && vl.aDateTime < endDate
                                 && vl.isEnd == true
                                 select vl.voyageID;
 
 
 
                var dpQuery = from vl2 in dc.lkpVoyageLegs
                              join dpt in dc.utlDPTypes on vl2.dpTypeID equals dpt.dpTypeID
                              join voy in dc.dtaVoyages on vl2.voyageID equals voy.ID
                              join ves in dc.dtaVessels on voy.vesselID equals ves.vesselID
                              join fac in dc.dtaFacilities on vl2.facilityID equals fac.facilityID
                              where voyIDQuery.Contains(vl2.voyageID)
                              select new { voyageID = vl2.voyageID, vesselName = ves.name, facilityName = fac.name, date = vl2.aDateTime };
 
                gridDpSummary.DataSource = dpQuery;
            }

Tsvetina
Telerik team
 answered on 19 Sep 2011
4 answers
301 views
Hi sir,
          We are using Telerik RadGrid. We have  remove background image in header of the radgrid sir....

 We give the corresponding  Css  style  below sir....

div.RadGrid_Default .rgHeader , div.RadGrid_Default .rgHeader a
        {
           font-family:Trebuchet MS;
           font-size:14px;
           color:#575757;
           font-style:normal;
           background-image:none;
           background-color: #EEEEEE;        
        }

The above Css style which removed the background-image in the RadGrid header  while running in  Firefox browser and not work in Internet Explorer Browser sir....

 Our need is how to remove background-image in  RadGrid  header running in Internet Explorer Browser.....

we are waiting for your valuable answer sir....

Kindly reply soon sir....
Pavlina
Telerik team
 answered on 19 Sep 2011
3 answers
152 views
in RadNumericTextBox onkeypress in server side i have some function done,
After enter that RadNumericTextBox i have assign some fields in another textbox


Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 19 Sep 2011
6 answers
206 views
(I am using version 2011.1.519.40; I will try to get the Q2 release downloaded if that will allow me to get what I need. I see the new LoadOnDemand functionality in the documentation, which would definitely help us.)

I have the TreeList loading fine from a datatable.

I need to do just a few things which I expected were straightforward...

(1) When an item is selected, I need to get two of the bound data items (one of which displays and one of which doesn't--the one that doesn't is the "DataKeyNames" item). I then need to do server side actions depending on what I determine from those two data items.
         (a) I can't find any way to retrieve those data items (astonishingly to me).
         (b) There doesn't appear to be a server side event for Selected. So, what do you recommend for hitting a server method from a client-side event in this context?

Can you (I mean, Telerik support) or anyone provide a code snippet which would accomplish this?

(2) When an item is double-clicked, I need to get "DataKeyNames" item, and depending on what I determine from it, possibly expand the node.
         (a) I can't find any way to retrieve this data item (astonishingly to me).
         (b) There doesn't appear to be a server side event for Double-Click. So, what do you recommend for hitting a server method from a client-side event in this context?

Can you/anyone provide a code snippet which would accomplish this?

(3) I don't want to add/edit/delete data directly from the list. Can I add or delete programatically, rather than reloading the whole datatable and requerying? Is there a sample showing something like this?

Actually, I'm willing/just as happy to do any of this server-side, client-side or server-side, whichever...

Thanks.

Tsvetina
Telerik team
 answered on 19 Sep 2011
5 answers
198 views
Hello,
I am using a paging in Grid, it is default paging combo box to 10,20,50

How can I change to fill it with 50,100,200?

thanks,
Mohamed Taraman
dexter
Top achievements
Rank 1
 answered on 19 Sep 2011
2 answers
43 views
Hi,

I got an extremely similar example with this one: 
http://www.telerik.com/help/aspnet-ajax/grid-virtual-scrolling.html


As soon as the first request for another page happens the virtual scrollbar is lost and replaced with a regular one (basically it switches to the normal paging mechanism). Can you tell me what to do?

Thanks,
Cristian 
Mira
Telerik team
 answered on 19 Sep 2011
9 answers
212 views
Hello!
I have problem with function javascript  hideColumn
Function don't works in brower safari in IPAD
despite the fact that function works in safari in PC

Regards
Sveta

Svetlana
Top achievements
Rank 1
 answered on 19 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?