Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
140 views
I have a project when one of the pages has several separate RadGrids.  Each grid is bound to a generis list of custom objects, has AutoGeneratedColumns set to false, and uses GridBoundColumns to show the data.

This worked great... until we upgraded from Telerik ASP.NET 2011.1 to 2012.1.

Now this page is showing the Expand column on all grids on the page (the Expand arrows don't do anything), and for the life of me I cannot get these columns to go away.  I've seen some hacks, attaching to events to remove the column or using CSS to hide the column... but the question is, why is RadGrid creating this column at all?

We've looked for properties on the RadGrid to force this off and there doesn't appear to be any.  (AutoGenerateHierarchy=false doesn't do anything to help either!)

Note that there are other pages on the same site that have similar setup... multiple separate RadGrids, same settings, and so forth, and they don't exhibit the problem.  I've tried to see what the difference is, and am having no luck.

Can anybody please shed some light on this question: What triggers the RadGrid to show the Expand column?

Any help is appreciated.
Daniel
Telerik team
 answered on 04 Sep 2012
2 answers
58 views

 

hi 
   I am using telerik 2012.2.724.35 and grid is not ajaxified. 

1)    I have a problem with exportToPDF and exportToCSV.  i have template column with checkboxes and when I export to PDF . it display no data but only headers.
2) When I export to CSV the hidden label also display and CSV looks like TrueTrue or FalseFalse ( one for label and one for checkbox) depending if column ticked or not. Please note that label in column is visible false and style to display none.

The grid html and 2 columns are pasted below.

Thanks
Best Regards
Rizwan Bashir

<telerik:RadGrid ID="radGridPermission" runat="server" Skin="Office2007" AutoGenerateColumns="false" AllowPaging="false" AllowSorting="true" Width="99%">
<GroupingSettings CaseSensitive="false" />
<ExportSettings OpenInNewWindow="true" >
<Pdf FontType="Link" PaperSize="A4" />
<Excel Format="Html" />
<Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" />
</ExportSettings>
<ClientSettings>
  <Scrolling AllowScroll="true" FrozenColumnsCount="2" UseStaticHeaders="true"/>
</ClientSettings>
  
<MasterTableView ShowHeader="true" AllowFilteringByColumn="false"
  
<PagerTemplate>
  
<uc1:gridFooter ID="gridFooter" runat="server" />
  
</PagerTemplate>
  
two sample colums are
  
<telerik:GridTemplateColumn HeaderStyle-Width="60px" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" DataField="IsActivator" SortExpression="IsActivator" FilterControlWidth="95%">
<ItemTemplate>
  <asp:CheckBox runat="server" ID="chkActivator" Checked="<%# ((SecurityTO)Container.DataItem).IsActivator %>" />
</ItemTemplate>
</telerik:GridTemplateColumn>
  
<telerik:GridTemplateColumn HeaderStyle-Width="60px" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" FilterControlWidth="95%" SortExpression="IsQuestionnaireManager" >
<ItemTemplate>
  <asp:CheckBox runat="server" ID="chkQuestionnaireManager" Checked="<%# ((SecurityTO)Container.DataItem).IsQuestionnaireManager %>" >
  <asp:Label runat="server" ID="lblQuestionnaireManager" Text="<%# ((SecurityTO)Container.DataItem).IsQuestionnaireManager %>" style='display:none' Visible="false" />
</ItemTemplate>
</telerik:GridTemplateColumn>
Daniel
Telerik team
 answered on 04 Sep 2012
7 answers
923 views
Hi Telerik team,

I have a Hierarchical grid implemented as follows
<telerik:RadGrid ID="radGridMaster" runat="server" AutoGenerateColumns="false" OnDetailTableDataBind="radGridMaster_OnDetailTableDataBind">
    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
    <ClientSettings>
        <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true"/>
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="false" DataKeyNames="Name1" Name="Master">
        <DetailTables>
            <telerik:GridTableView Name="Detail">
                <Columns>
                    <telerik:GridBoundColumn DataField="SubName1"  SortExpression="SubName1" UniqueName="SubName1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SubName2" SortExpression="SubName2" UniqueName="SubName2">
                    </telerik:GridBoundColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridBoundColumn DataField="Name1"  SortExpression="Name1" UniqueName="Name1">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Name2" SortExpression="Name2" UniqueName="Name2">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
I have two buttons above the grid two move items up and down. I was able to move up and down the rows inside the Master Grid. I need to achieve the same behavior in the Details Grid.
I need to know how to access:
- The selected element from the detail grid. In Master grid I got as follow: radGridMaster.SelectedItems[0]
- The parent row of the Detail grid in the Master grid.
- The DataSource of the Detail grid. In the Master grid is radGridMaster.DataSource

Thanks in advance,

L

L
Top achievements
Rank 1
 answered on 04 Sep 2012
4 answers
269 views
     Hello Please Help, i want to change colors of legend marker i mean the color of  rectangle, currently they are auto-generated.  
   Below is my code (6-series).

       rcScorecard.Series.Clear();
        rcScorecard.PlotArea.XAxis.Items.Clear();
        rcScorecard.PlotArea.YAxis.Items.Clear();

        rcScorecard.Skin = "Vista";
        rcScorecard.Series.Clear();
        rcScorecard.AutoLayout = true;

        rcScorecard.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 12, System.Drawing.FontStyle.Bold);
        rcScorecard.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 12, System.Drawing.FontStyle.Bold);

        //rcScorecard.PlotArea.YAxis.AutoScale = false;
        rcScorecard.PlotArea.YAxis.Step = 1;
        rcScorecard.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 12, System.Drawing.FontStyle.Bold);
        rcScorecard.PlotArea.YAxis.AxisLabel.Visible = true;
        rcScorecard.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Percentage (%)";

        rcScorecard.PlotArea.XAxis.AutoScale = false;
        rcScorecard.PlotArea.XAxis.AddItem(reportDate.AddMonths(-2).ToString("MMMM").Substring(0, 3) + reportDate.AddMonths(-2).Year.ToString());
        rcScorecard.PlotArea.XAxis.AddItem(reportDate.AddMonths(-1).ToString("MMMM").Substring(0, 3) + reportDate.AddMonths(-1).Year.ToString());
        rcScorecard.PlotArea.XAxis.AddItem(reportDate.ToString("MMMM").Substring(0, 3) + reportDate.Year.ToString());

        for (int count = 0; count < tblReport.Rows.Count; count++)
        {
            ChartSeries series = new ChartSeries();
            series.Name = tblReport.Rows[count][0].ToString();
            series.Type = ChartSeriesType.Line;
            rcScorecard.Series.Add(series);
            series.Items.Clear();
            for (int columnCount = 2; columnCount <= 4; columnCount++)
            {
                ChartSeriesItem item = new ChartSeriesItem();
                item.YValue = Convert.ToDouble(tblReport.Rows[count][columnCount]);
                series.Items.Add(item);
            }
        }
Sia
Telerik team
 answered on 04 Sep 2012
1 answer
53 views
Hi , 
how can i  enable / disable  RadAsyncUpload control  in client side ? 

with my way that disable / enable control but when enabled you can not select file to upload , the button not work . 

<telerik:RadAsyncUpload            Width="220px"
 EnableViewState="true"
 runat="server"
 ID="AUJustificatifEnfant"
 MaxFileInputsCount="1"
  Enabled="false"
 >
    <script type="text/javascript">
               function GetValue(sender, eventArgs) {
var AUJustificatifEnfant = document.getElementById('AUJustificatifEnfant');
  
 AUJustificatifEnfant.disabled = ! (chkAutreMotivation.checked || chkEnfantBasAge.checked);
    }
        </script>



Helen
Telerik team
 answered on 04 Sep 2012
1 answer
70 views
My client has complained about the small target area for the "next page" button.

We are currently using the Office2010 skin.

We do not have budget to create custom skins, rather we would like to know if it is possible to make the "next page" and "previous page" buttons wider.

These are used frequently, and we have plenty of horizontal space.

Another aspect of this issue is that the buttons shift around, depending on the values of the page buttons. 1-9 is narrower than 10-19, for example, and it is not possible to click through multiple pages without moving the mouse to compensate. A wider button would provide more "wibble room".
Kostadin
Telerik team
 answered on 04 Sep 2012
4 answers
110 views
Hi,

We have our page loading the data for the panel bar items using an AJAX call, then creating the RadPanelItems dynamically using the result. We seem to be having an issue where the items don't appear to be expandable because the "arrow" icon doesn't show. This scenario works BEAUTIFULLY, with the exception that a user can't tell if root items can be opened or not ...

When we do the same thing, but completely server side, there is no issue and we see the icons correctly.

Please advise,
Kori
Geoff
Top achievements
Rank 1
 answered on 04 Sep 2012
5 answers
135 views
Hi guys,

I've come across an issue and I was hopnig you could let me know if I'm doing something wrong or if there is a problem here.

I have a radgrid all set-up correctly. In a javascript function I need to obtain the values of the selected row, this works fine for all columns except for a column which isn't visible.

Is there a different way to retrieve values from columns where the visibility is set to false?

Grid
<telerik:RadGrid runat="server" ID="rgLzHits" AutoGenerateColumns="False">
                    <MasterTableView PagerStyle-Mode="NumericPages" EditMode="EditForms" DataKeyNames="displayid">
                        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>                                               
                        <Columns>                                                    
                            <telerik:GridBoundColumn DataField="displayid" HeaderText="displayid"
                                    UniqueName="displayid" visible="False" ReadOnly="true" ItemStyle   Width="300px">
                             </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="displayname" HeaderText="Landing Zone"
                                    UniqueName="displayname" visible="True" ReadOnly="true" ItemStyle-Width="300px">
                             </telerik:GridBoundColumn>  
                             <telerik:GridBoundColumn DataField="totalhits" HeaderText="Total"
                                    UniqueName="totalhits" visible="True" ReadOnly="true" ItemStyle-Width="300px">
                             </telerik:GridBoundColumn
                            <telerik:GridBoundColumn DataField="distincthit" HeaderText="Distinct"
                                    UniqueName="distincthit" visible="True" ReadOnly="true" ItemStyle-Width="50px">
                            </telerik:GridBoundColumn>       
                            <telerik:GridBoundColumn DataField="distinctpercent" HeaderText="Distinct %"
                                    UniqueName="distinctpercent" visible="True" ReadOnly="true" ItemStyle-Width="50px">
                            </telerik:GridBoundColumn>       
                            <telerik:GridBoundColumn DataField="AvgRating" HeaderText="Avg Rating"
                                    UniqueName="AvgRating" visible="True" ReadOnly="true" ItemStyle-Width="100px">
                            </telerik:GridBoundColumn>                                                                                                                                                                                                                                                                                                                                                                                                                 
                            <telerik:GridBoundColumn DataField="CatName" HeaderText="Category Name"
                                    UniqueName="CatName" visible="True" ReadOnly="true" ItemStyle-Width="100px">
                            </telerik:GridBoundColumn
                        </Columns>
                        <DetailTables>
                            <telerik:GridTableView runat="server" Name="LZHitsContacts" AutoGenerateColumns="false" NoDetailRecordsText="No results exist for this contact">
                                <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>     
                                <Columns>    
                                    <telerik:GridBoundColumn DataField="Firstname" HeaderText="First Name"
                                            UniqueName="Firstname" visible="True" ReadOnly="true">
                                    </telerik:GridBoundColumn>       
                                    <telerik:GridBoundColumn DataField="Lastname" HeaderText="Last Name"
                                        UniqueName="Lastname" visible="True" ReadOnly="true">
                                    </telerik:GridBoundColumn>       
                                    <telerik:GridBoundColumn DataField="EmailLogin" HeaderText="Email Address"
                                        UniqueName="EmailLogin" visible="True" ReadOnly="true">
                                    </telerik:GridBoundColumn>    
                                    <telerik:GridBoundColumn DataField="eventdate" HeaderText="Event Date"
                                        UniqueName="eventdate" visible="True" ReadOnly="true">
                                    </telerik:GridBoundColumn>  
                                    <telerik:GridBoundColumn DataField="contactrating" HeaderText="Contact Rating"
                                        UniqueName="eventdate" visible="True" ReadOnly="true">
                                    </telerik:GridBoundColumn>  
                                    <telerik:GridBoundColumn DataField="SocialMedia" HeaderText="Social Share"
                                        UniqueName="SocialMedia" visible="True" ReadOnly="true">
                                    </telerik:GridBoundColumn>                                                
                                </Columns>
                            </telerik:GridTableView>
                        </DetailTables
                    </MasterTableView>   
                    <ClientSettings EnableRowHoverStyle="True">
                        <Selecting AllowRowSelect="True"></Selecting>
                    </ClientSettings>   
                </telerik:RadGrid>

Javascript

var grid = $find("<%=rgLzHits.ClientID %>");
      var MasterTable = grid.get_masterTableView();
      var selectedRows = MasterTable.get_selectedItems();
 
     if(selectedRows != -1)
      {
          for (var i = 0; i < selectedRows.length; i++) {
           var row = selectedRows[i];
          var  SearchValue = MasterTable.getCellByColumnUniqueName(row, "displayid");            
          var PageTitle = MasterTable.getCellByColumnUniqueName(row, "displayname");             
         }
         alert(SearchValue);
         alert(PageTitle);

The alert of the pagetitle returns the object fine where as the seachvalue always returns null.

Thanks.
Jibber4568
Top achievements
Rank 1
 answered on 04 Sep 2012
5 answers
97 views

I upgrade to the latest version of Telerik (2012.2.607.40) and now my code no longer works. My control is below...

<telerik:RadDatePicker ID="RadDatePicker1" runat="server" Culture="English (United States)" >
    <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" ShowRowHeaders="false">
        <SpecialDays>
            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BorderColor="Blue">
            </telerik:RadCalendarDay>
        </SpecialDays>
    </Calendar>
    <DatePopupButton HoverImageUrl="" ImageUrl="" ToolTip="Calendar Search" />
    <DateInput ID="DateInput1" runat="server" DateFormat="MM/yyyy"
        DisplayDateFormat="MM/yyyy">
        <ClientEvents OnFocus="Focus" OnBlur="Blur" OnValueChanging="ValueChanging" OnValueChanged="ValueChanged">
        </ClientEvents>
    </DateInput>
</telerik:RadDatePicker>


This is the start of my ValueChanging function...

function ValueChanging(sender, args) {
 
    var enteredValue = args.get_newValue(); //Retrieves value as string entered or selected in calendar.
    enteredValue = enteredValue.replace(/-/g, '/'); // In case user enters hyphen, change it to backslash.

After selecting a date from the calendar, the code now crashes on the replace function because get_newValue returns Wed Jun 6 00:00:00 CDT 2012, which is not a string, so it doesn't have a replace function. This used to work. Also, while digging for answers at the link below, I tried get_newDate() which I would expect to return that value instead, but it is now undefined and no longer a valid function.
Jeremy Yoder
Top achievements
Rank 1
 answered on 04 Sep 2012
5 answers
76 views

Hello Telerik team, please help with below. Thanks!
I have a question about catch error message on radscheduler Edit form when update a single appointment (RecurrenceState is Exception) in RecurrenceExceptionCreated block:
protected void RadScheduler1_RecurrenceExceptionCreated(object sender, Telerik.Web.UI.RecurrenceExceptionCreatedEventArgs e)

{

.........
else          / / catch ovelap
e.Cancel = true;       
  Label overLapMessage= (Label)((RadScheduler)sender).Controls[1].Controls[0].FindControl("errMessage");
  errMessage.Text = "A scheduling conflict has occurred.";
}
After click Save button, the Edit Form go away.

But I can catch the message on Edit Form in update block for appointment that is NotRecurring.

 

 

protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)

 

{

same code as above
}
Plamen
Telerik team
 answered on 04 Sep 2012
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?