Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
140 views
Hi,
here is what we are doing....we have a master page that opens two modal windows.
I am not having problems opening both...i am however wanting the behavor to be differnt if possible.

when the master page opens the two modal windows A & B,   and stacks them in that order with B being the topmost.
I would like A to be grayed out, or even invisible until modal B is closed. the problems is for A to reappear, i have to refresh the screen which i don't want to do...

is there a way to hide, or gray out modal A, while B is active...then when B closes, enable or show A?

Marin Bratanov
Telerik team
 answered on 10 Jul 2013
2 answers
205 views
Hi,

Have a Grid with EditMode ="InPlace" and AutoGenerateColumn= "true".

Need to reduce the size of the Textbox in EditMode.

<telerik:RadGrid ID="RadGridSingleClick" runat="server" Skin="Vista" AutoGenerateColumns="true"
                    OnNeedDataSource="RadGridSingleClick_NeedDataSource" OnPreRender="RadGridSingleClick_PreRender"
                    OnUpdateCommand="RadGridSingleClick_UpdateCommand" OnColumnCreated="RadGridSingleClick_ColumnCreated"  Height="250px" Width="1000px">
                    <%--OnItemDataBound="RadGridText_ItemDataBound" --%>
                    <MasterTableView HeaderStyle-CssClass="disable-highlight" Width="98%" HeaderStyle-HorizontalAlign="Center"
                        HeaderStyle-Wrap="true" DataKeyNames="MKTID" HeaderStyle-Width="100px" ItemStyle-Width="50px" EditMode="InPlace">
                        <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" ItemStyle-Width="60px" HeaderStyle-Width="60px"></telerik:GridEditCommandColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings Scrolling-AllowScroll="true" Resizing-AllowColumnResize="true" Scrolling-SaveScrollPosition="true"
                        Scrolling-FrozenColumnsCount="2" Scrolling-UseStaticHeaders="true">
                        <Selecting AllowRowSelect="true" />
                        <ClientEvents OnRowClick="RadGridSingleRowClick" />
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                    </ClientSettings>                    
                </telerik:RadGrid>

Have attached the screen shot too.

Thank You.

-Anto
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
 answered on 10 Jul 2013
1 answer
91 views
h
Pavlina
Telerik team
 answered on 10 Jul 2013
5 answers
117 views
Greetings,

I am using telerik scheduler to create a schedule for employees and the tasks assigned to them.
The dataset I have includes basicly engineer name, id and task (as well as start and end dates). I am using group resource feature to group Tasks under Engineer Names.
But the problem is I receive empty rows at the end of the schedule for engineers who has more than 1 entry in the dataset
For example the dataset : (the datasets are assigned to resources)
Employee ID --Employee Name---TASK
1                            John                 x
2                           Steve                y
2                           Steve                z

for john, there's no problem. But in the case of steve, There are two appointments under his name, but at the bottom, there's another row for steve which is empty. If steve has 4 appointments then it has 3 empty rows at the bottom.

I also have another question :
can I add appointments in the server side ? I want to an add appointment for each row in the dataset and group these appointments for each engineer ID. Is there an example for this ?
Kind regards
Plamen
Telerik team
 answered on 10 Jul 2013
3 answers
88 views
Hi
I downloaded trial version of ASP.net AJAX RadControls 2013 Q2 and I want to test it on my host/CDN but I can't find "CDN resource package"  anywhere. where is it?
Mahdi
Top achievements
Rank 1
 answered on 10 Jul 2013
3 answers
214 views
I've had this same code for years and it has always worked. Now with the latest release it is broken.  I'm not using any new features or anything like that. When this code runs the cells shift and become huge. So basically the cells become 5 times as big (in height) and the columns shift over (leaving a broken appearance). This code is abbreviated of course and called from the grid_prerender event during a post back. The grid is in an update panel. Also I'm using IE10. It works in 2013.1.417.45. As soon as i switch to the new dlls, it breaks.


foreach (GridDataItem item in grid.Items)
          {
              //Get the instance of the right type
              GridDataItem row = item as GridDataItem;
              try
              {
                  
                  string sColName = String.Empty;
                  string sValue = String.Empty;
                  string sValueField = String.Empty;
 
                  foreach (GridColumn col in grid.MasterTableView.Columns)
                  {
                      sColName = col.UniqueName;
 
                      if (sColName.Contains("String") && grid.MasterTableView.GetColumnSafe(sColName.Replace("String", "")) != null)
                      {
                          // If String is present we will use the numeric field equivalent without "String" for calculations
                          sValueField = sColName.Replace("String", "");
                      }
                      else
                      {
                          sValueField = sColName;
                      }
 
                      sValue = row[sValueField].Text.Replace("$", "").Replace(",", "").Replace("%", "").Replace("M", "");
 
                   
 
                      if (sValue.IsNumeric())
                      {
                           
                               
                              row[sColName].BackColor = ColorTranslator.FromHtml("#fce9b3");
                           
                      }
 
                      // Get rid of the border
                      row[sColName].BorderColor = Color.Transparent;
 
 
                       
                  }
              }

Also here is my markup in case you're interested:
<asp:UpdatePanel ID="upnlGridOverview" runat="server" UpdateMode="Conditional">
       <ContentTemplate>           
           <telerik:RadGrid ID="gridOverview" runat="server" AllowPaging="True" AllowSorting="True"
               AllowCustomPaging="True" ShowGroupPanel="false" AutoGenerateColumns="false" PageSize="10"
               MasterTableView-AllowCustomPaging="true" Skin="swExcel2010" EnableEmbeddedSkins="false"
               EnableEmbeddedBaseStylesheet="false" ShowFooter="false" OnNeedDataSource="gridOverview_NeedDataSource">
               <MasterTableView TableLayout="Fixed" OverrideDataSourceControlSorting="true" Width="100%"
                   Visible="true">
                   <PagerTemplate>
                       <uc1:GridPagerTemplate ID="GridPagerTemplate2" runat="server" />
                   </PagerTemplate>
                   <PagerStyle AlwaysVisible="true" />
                   <NoRecordsTemplate>
                       <uc2:GridNoRecordsTemplate ID="GridNoRecordsTemplate1" runat="server" />
                   </NoRecordsTemplate>
                   <Columns>
                       <telerik:GridBoundColumn UniqueName="Date" SortExpression="GroupDate" HeaderText="Date"
                           DataField="DateString" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Left"
                           FooterAggregateFormatString="Total Dates:  {0:#,0}" FooterStyle-HorizontalAlign="Right"
                           Aggregate="Count">
                           <HeaderStyle></HeaderStyle>
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn UniqueName="Visitors" DataFormatString="{0:#,0}" SortExpression="Visitors"
                           HeaderText="Visits" DataField="Visitors" HeaderStyle-HorizontalAlign="Right"
                           ItemStyle-HorizontalAlign="Right" FooterAggregateFormatString="Avg:  {0:#,0}"
                           FooterStyle-HorizontalAlign="Right" Aggregate="Avg">
                           <HeaderStyle></HeaderStyle>
                       </telerik:GridBoundColumn>
      
                   </Columns>
                   <SortExpressions>
                   </SortExpressions>
               </MasterTableView>
               <GroupingSettings GroupContinuesFormatString="" GroupContinuedFormatString="" />
           </telerik:RadGrid>
       </ContentTemplate>
   </asp:UpdatePanel>

Eyup
Telerik team
 answered on 10 Jul 2013
1 answer
241 views
Hi,

I'm trying to export a radgrid to PDF and set the alignment of the headers.
I've been through a lot of posts on this forum, but nothing I can find seems to work.

Right now I have this:

Private Sub rgLec_ItemCreated(sender As Object, e As GridItemEventArgs) Handles rgLec.ItemCreated
        If (bPrintReport And (TypeOf e.Item Is GridHeaderItem)) Then
            For Each cell As TableCell In e.Item.Cells
                cell.Style("text-align") = "left"
            Next
        End If
End Sub

However, this doesn't change anything. The header text is still centered.
Can anyone tell me what I'm doing wrong?

Cheers,
CJ
Princy
Top achievements
Rank 2
 answered on 10 Jul 2013
4 answers
322 views
Hi All,

is there any way to access a control like textbox present in nestedviewtemplate in onDataBound client side event of radgrid?
Jay
Top achievements
Rank 1
 answered on 10 Jul 2013
1 answer
134 views
Hi,

Is it possible to customise the header context menu on the RadGrid so that you can have filtering by a given set of values? I have a column that has 3 possible values so I would like to user to be able to select one of these from a list (so the list would contain All, Active, Inactive, & Pending).

If I switch on the column filtering it allows this, but as this is the only column that is filtered then having an extra row under the header looks a bit rubbish!

Thanks,

Dan.
Marin
Telerik team
 answered on 10 Jul 2013
7 answers
391 views
I am having a strange thing happen when I try to sort a RadGrid.  As soon as I do a sort, the RadComboBox options in my filter under "Market" disappear, and I can't figure out why.  Any thoughts by anybody??

<telerik:RadScriptManager runat="server" />
<telerik:RadAjaxManager runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="gridResults">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="gridResults" UpdatePanelRenderMode="Inline" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
  
<telerik:RadGrid runat="server" ID="gridResults" AutoGenerateColumns="false" AllowFilteringByColumn="true" AllowSorting="true" OnSortCommand="gridResults_OnSortCommand">
    <MasterTableView TableLayout="Fixed">
        <Columns>
            <telerik:GridBoundColumn HeaderText="Loan Number" DataField="LoanNumber" UniqueName="LoanNumber" />
            <telerik:GridBoundColumn HeaderText="FS Market" DataField="FSMarket" AllowFiltering="true" UniqueName="FSMarket">
                <FilterTemplate
                    <telerik:RadComboBox ID="drpdwnFSMarket" runat="server" Width="90" AllowCustomText="false" 
                                DataTextField="FSMarket" DataValueField="FSMarket" CheckBoxes="true"
                                AutoPostBack="true" DropDownWidth="250px" />
                </FilterTemplate>
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>



protected void Page_Load(object sender, EventArgs e)
{
     if (!IsPostBack)
     {
         BindGrid();
         BindGridDropdowns();
     }
 }
 protected void gridResults_OnSortCommand(object o, GridSortCommandEventArgs e)
 {
     BindGrid();
     BindGridDropdowns();
 }
 private void BindGridDropdowns()
 {
     DataTable dt = GetMarketDropdown();
     RadComboBox rcb = (RadComboBox)FindControl("drpdwnFSMarket", gridResults.MasterTableView.Controls);
     rcb.DataSource = dt;
     rcb.DataBind();
     dt.Dispose();
 }
 private void BindGrid()
 {
     DataTable dt = GetResults();
     gridResults.DataSource = dt;
     gridResults.DataBind();
     dt.Dispose();
 }
 private Control FindControl(string uniqueID, ControlCollection cc)
 {
     Control c = null;
     foreach (Control ctrl in cc)
     {
         if (ctrl.ID != null && ctrl.ID == uniqueID)
         {
             c = ctrl;
             break;
         }
         if (ctrl.HasControls())
         {
             c = FindControl(uniqueID, ctrl.Controls);
             if (c != null)
             {
                 break;
             }
         }
     }
     return c;
 }

This seems pretty forward to me?  I bind the grid and then the RadComboBox in the filter.  Everything looks fine.  I do the exact same thing after the sort, and the options are gone. 

Any help would be appreciated!!!

Viktor Tachev
Telerik team
 answered on 10 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?