Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
81 views
Sir

I have a radscheduler and a rad calender , what i want is , i Have to highlight  all appointments dates  in the rad scheduler  to the calender

any one knws
Chinnu Prabhakar
Top achievements
Rank 1
 answered on 07 Oct 2009
4 answers
123 views

Hi All,

I have a custom web part which includes RAD Chart control.
Chart is created dynamically as per the web part configuration settings.

We have a data table as shown in below figure, which is used as chart's data source.

Status

ADMIN

ATL-API

BACKEND

DESKTOP

CLOSED

 

 

3

1

DEFERRED

 

2

12

NOT A BUG

1

12

23


I create a multiple series chart (Type - Bar).

For each column (column 1 and onward), a new series is created. Series name is same as column name.
Series DataYColumn is set as column name.

Name of first column is set in 'radChartObj
.PlotArea.XAxis.DataLabelsColumn' value.

Then data is bind with chart.

Please refer the following code for details:

***************************************************************************************************************************

// Set chart's skin

radChartObj.Skin = "Vista";

radChartObj.Width =  new Unit("600 px");

// Set Chart's attributes. 

radChartObj.AutoLayout = true;

radChartObj.IntelligentLabelsEnabled = true;
radChartObj.DefaultType
 = ChartSeriesType.Bar;

// Set chart's data source.

radChartObj.DataSource = chartingDataTable;
 

// Set chart's x-axis data labels column name. 
radChartObj.PlotArea.XAxis.DataLabelsColumn = chartingDataTable.Columns[0].ColumnName;

// For each column (column 1 and onward), add a new series.

for (int colIndex = 1; colIndex < chartingDataTable.Columns.Count; colIndex++)

{

        string columnName = chartingDataTable.Columns[colIndex].ColumnName;

       // Prepare chart series name.

        string seriesName = columnName;

         // Create chart series.

        ChartSeries chartSeriesObj = new ChartSeries(seriesName); 


       // Set chart series' type and its DataYColumn name.
        chartSeriesObj.Type = ChartSeriesType.Bar; 
       chartSeriesObj.DataYColumn = columnName;

        // Set chart series' tooltip.

        chartSeriesObj.ActiveRegionToolTip = "#SERIES: #Y";

        // Set chart series' empty value mode as 'Zero'. 

        chartSeriesObj.Appearance.EmptyValue.Mode = Telerik.Charting.Styles.EmtyValuesMode.Zero; 

        // Add chart series to chart object.
 

         radChartObj.Series.Add(chartSeriesObj);  

}

// Bind data with chart. 

radChartObj.DataBind();

***************************************************************************************************************************

If i create a multiple series chart for more values (like 12 series) i.e. data table has more than 10 columns.
Also, first column of data table has 8-9 values.
Then X-Axis labels overlap each other.

If i set 
radChartObj.AutoTextWrap = true, so that X-Axis labels do not overlap each other, then Web Part page in which my web part is added, takes too much time to load the page and finally, Request Timed Out error occurs.

If i increase the time out value, then page is loaded successfully but it takes a lot to load.
Page should not take more time to load.

Please suggest a solution and let me know why page takes too much time to load if data table size increases.

LJ
Top achievements
Rank 1
 answered on 07 Oct 2009
1 answer
768 views
I'm trying to fire the button click function while pressing enter on a text box. But the "delete" button in the grid fires instead of the link button. I tried using default button option, onkeypress event, but nothing works. Here is the code

  <script type="text/javascript">
     function KeyEnter(sender, eventArgs)
    {
       var c = eventArgs.get_keyCode();
       if (c == 13)
       {   
          __doPostBack('btnSearch.ClientID','');
       }      
    }
</script>

<asp:Panel ID="p1" DefaultButton="btnSearch" runat="server">
Search:  <telerik:RadTextBox ID="cbForms" runat="server">
                                          <ClientEvents OnKeyPress="KeyEnter" />
           </telerik:RadTextBox>
 <br/>                              
<asp:LinkButton ID="btnSearch" runat="server" CssClass="searchBtn"
                                                    Text="Search"  style="float:left" CausesValidation="true" onclick="btnSearch_Click"
                                                   ></asp:LinkButton>
                                                    <asp:LinkButton ID="btnClear" runat="server" CssClass=" cancelBtn" Text="Clear" style="float:right;margin-right:25px" OnClick="btnClear_Click"></asp:LinkButton>                                                  
                            </asp:Panel>

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1" >
                    <div >
                       <telerik:RadGrid ID="uxForms" runat="server" Skin="WebBlue"
                            AllowSorting="True" AutoGenerateColumns="False" GridLines="None"
                            onitemcreated="uxForms_ItemCreated"
                            ondeletecommand="uxForms_DeleteCommand"                    
                            onneeddatasource="uxForms_NeedDataSource"
                            OnItemDataBound="uxForms_ItemDataBound"
                            width="550px"
                            OnPageIndexChanged="uxForms_PageIndexChanged"
                            PageSize="5" AllowPaging="True" AllowCustomPaging="True"    
                                                 
                            >
                           <MasterTableView Name="Forms" DataKeyNames="FormID" CommandItemDisplay="Top" >                          

                               <RowIndicatorColumn>
                                   <HeaderStyle Width="25px" />
                               </RowIndicatorColumn>
                               <ExpandCollapseColumn>
                                   <HeaderStyle Width="25px" />
                               </ExpandCollapseColumn>
                               <CommandItemTemplate>
                                <div style="float:left;">
                                    <asp:Image ID="AddRecord" runat="server" ImageUrl="/admin/images/AddRecord.gif"  AlternateText="Add Record" />
                                    <asp:HyperLink ID="uxInsertLink" runat="server">Add New Form</asp:HyperLink>
                                </div>
                                
                            </CommandItemTemplate>

                               <Columns>
                                    <telerik:GridTemplateColumn UniqueName="TemplateEditColumn" ItemStyle-Width="30px" HeaderStyle-Width="30px">                                    
                                        <ItemTemplate>
                                            <asp:HyperLink ID="uxEditLink" runat="server"><asp:Image ID="EditRecord" runat="server" ImageUrl="/admin/images/Edit.gif" AlternateText="Edit Form" /></asp:HyperLink>
                                        </ItemTemplate>
                                        
                                        <ItemStyle Width="25px" />                                
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridBoundColumn DataField="FormID" UniqueName="FormID" Display="false" />                              
                                   
                                    <telerik:GridButtonColumn ConfirmText="Delete this form?" ButtonType="ImageButton" ImageUrl="/admin/images/Delete.gif" CommandName="Delete" Text="Delete Form" UniqueName="DeleteColumn">
                                        
                                        <ItemStyle HorizontalAlign="Center" />
                                        <ItemStyle Width="25px" />
                                    </telerik:GridButtonColumn>

                               </Columns>
                           </MasterTableView>
                           <FilterMenu EnableTheming="True" Skin="WebBlue">
                               <CollapseAnimation Duration="200" Type="OutQuint" />
                           </FilterMenu>
                           <PagerStyle Mode="Slider" />
                        </telerik:RadGrid>
                        
                    </div>
                </telerik:RadAjaxPanel>

      CS File:
protected void Page_Load(object sender, EventArgs e)
        {
 this.Page.Form.DefaultButton = btnSearch.ClientID;
}
            



Sebastian
Telerik team
 answered on 07 Oct 2009
2 answers
92 views
Guys,

I need to build a radgrid which has different levels of hierarchy for different parent rows. That is, I would not know at design time weather a particular parent grid item has a child or not. I don't even know how many levels of child grids a parent grid item has.

So basically my question is how do I create a grid with just a master view and then add child grid view items when the user tries to expand the grid item ? Note that the child itself might be expandable. The level of depth is unknown and the only way to reach the final depth is to keep drilling in until the child is not expandable.


See the attached image for details.

Thanks,
Pavan.
Iana Tsolova
Telerik team
 answered on 07 Oct 2009
1 answer
521 views
Hi,

I have radgrid. Inside grid i have radtabstrip. And also i have table bool field called  NewDoc. When a newdoc= True i want hide 2nd tab of tabstrip.

How can i do that?

lakmal
Princy
Top achievements
Rank 2
 answered on 07 Oct 2009
9 answers
155 views
Hi All,
I am facing an issue with radgrid. I have 2 radgrid in one of my page. The first grid will have only one row every time and only edit is enabled there. In the second grid I will have multiple rows and there add, edit and delete also will be possible. We are not using inline edit functionality of radgrid instead we are using the asp button to edit the details( the page will be redirected to another page with the row details; I know it is unorthodox way but our client wants like this). So I have following requirements.

1) If the user clicks on first grid only edit button should be enabled.
2) If the user clicks on second grid both edit and delete button has to enabled.
3) We should allow the user to select only one row at a time either from first grid or second grid.

We achieved this functioanlity by overriding some of the radgrid's script, but I need to know whether there is any other solution for achieving this without overriding.

PS: We need to implement this functionality in client side.

Thanks in advance,
Vinod.
Tsvetoslav
Telerik team
 answered on 07 Oct 2009
1 answer
66 views
Hello
I have a radgrid which I can add user in the detail table. In that edit form I have a dropdownlist. On a specific selected value I would like to put a default value in the next textbox.
Here is my radgrid.
 <telerik:RadGrid   
        ID="RadGrid1"   
        runat="server" 
        DataSourceID="SQLETAB" 
        Skin="Office2007"   
        GridLines="None" 
        autogeneratecolumns="false" 
        AllowAutomaticInserts="true"   
        AllowAutomaticUpdates="True"   
        AllowAutomaticDeletes="true" 
        HorizontalAlign=left 
         EditFormSettings-FormmaintableStyle-HorizontalAlign=Left 
         Width="98%" 
        > 
          
        <PagerStyle   
            NextPageText="Suivant" PrevPageText="Précédent" Mode="NextPrevAndNumeric"   
            NextPagesToolTip="Pages suivante"   
            NextPageToolTip="Page suivante"   
            PrevPagesToolTip="Pages précédente"   
            PrevPageToolTip="Page précédente"/>  
                 <HierarchySettings ExpandTooltip="Voir les usagers pour votre Ã©tablissement" CollapseTooltip ="Revenir Ã  votre Ã©tablissement" /> 
        <MasterTableView   
            Name="MTVUsager" 
            AllowAutomaticInserts=true 
            AllowAutomaticDeletes=true 
            AllowAutomaticUpdates=true 
            DataSourceID="SQLETAB" 
            DataKeyNames="NO_ETAB" 
            CommandItemSettings-AddNewRecordText="Ajouter un Ã©tablissement"   
            CommandItemSettings-RefreshText="Rafraichir" 
            EditFormSettings-EditColumn-CancelText="Annuler"   
            EditFormSettings-EditColumn-EditText="Modifier" 
            EditFormSettings-EditColumn-UpdateText="Mise Ã  jour" 
            HorizontalAlign=Left 
            CommandItemDisplay=Top 
            EditFormSettings-FormMainTableStyle-HorizontalAlign=Left 
            EditFormSettings-FormTableItemStyle-HorizontalAlign=Left 
             EditFormSettings-FormTableAlternatingItemStyle-HorizontalAlign=Left>      
                             
              
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
                 
            <Columns> 
              
                <telerik:GridBoundColumn   
                    SortExpression="TYPE_ECOLE"   
                    HeaderText="TYPE_ECOLE"   
                    DataField="TYPE_ECOLE"   
                    UniqueName="TYPE_ECOLE1"   
                    visible="false" 
                    readonly="true">  
                </telerik:GridBoundColumn> 
      
                      
                <telerik:GridBoundColumn   
                    SortExpression="NO_ORG"   
                    HeaderText="NO_ORG"   
                    DataField="NO_ORG"   
                    UniqueName="NO_ORG" Visible=false ReadOnly=true>  
                    <ItemStyle HorizontalAlign=Left /> 
                </telerik:GridBoundColumn> 
                  
                <telerik:GridEditCommandColumn   
                    ButtonType="ImageButton"   
                    UniqueName="EditCommandColumn" EditText="Modifier" > 
                </telerik:GridEditCommandColumn> 
                   
                 <telerik:GridButtonColumn   
                    ConfirmText="Supprimer cet Ã©tablissement?"   
                    ConfirmDialogType="RadWindow"   
                    ConfirmTitle="Supprimer"   
                    ButtonType="ImageButton" 
                    CommandName="Delete"   
                    Text="Supprimer"   
                    UniqueName="DeleteColumnEtab">  
                    <ItemStyle HorizontalAlign="Center"  /> 
                 </telerik:GridButtonColumn> 
                           
                <telerik:GridBoundColumn   
                    SortExpression="SIGLE"   
                    HeaderText="Unité administrative"   
                    DataField="SIGLE"   
                    UniqueName="SIGLE">  
                    <ItemStyle HorizontalAlign=Left /> 
                </telerik:GridBoundColumn> 
                  
                <telerik:GridBoundColumn   
                    SortExpression="DESCR"   
                    HeaderText="Nom de l'établissement"   
                    DataField="DESCR"   
                    UniqueName="DESCR">  
                    <ItemStyle HorizontalAlign=Left /> 
                </telerik:GridBoundColumn> 
            </Columns> 
            <DetailTables> 
                <telerik:GridTableView   
                    Name="DTVUSAGER" 
                    DataSourceID="SqlUSAGER" 
                    DataKeyNames="NO_IDENT" 
                    AllowAutomaticDeletes="True" 
                    AllowAutomaticInserts="true" 
                    AllowAutomaticUpdates="True" 
                    CommandItemDisplay="Bottom" 
                    CommandItemSettings-AddNewRecordText="Ajouter un usager"   
                    CommandItemSettings-RefreshText="Rafraichir"   
                    EditFormSettings-EditColumn-CancelText="Annuler"   
                    EditFormSettings-EditColumn-InsertText="Ajouter"   
                    EditFormSettings-EditColumn-EditText="Modifier"   
                    EditFormSettings-EditColumn-UpdateText="Mise Ã  jour"   
                     EditFormSettings-EditColumn-HeaderButtonType="PushButton" 
                          
                    NoDetailRecordsText="Il n'y a aucun usager pour cet Ã©tablissement."   
                    EditMode="EditForms" > 
                      
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                  
                    <ParentTableRelation> 
                        <telerik:GridRelationFields DetailKeyField="NO_ETAB" MasterKeyField="NO_ETAB" /> 
                    </ParentTableRelation> 
                      
                    <Columns> 
                      
                         <telerik:GridTemplateColumn UniqueName="Template3" HeaderText="Confirmer">  
                            <ItemTemplate> 
                                <asp:LinkButton ID="LlGenererMotDepasse" CommandName="RegenererMotPasse" runat="server">Regénérer mot de passe</asp:LinkButton>      
                            </ItemTemplate>   
                         </telerik:GridTemplateColumn> 
                  
                         <telerik:GridEditCommandColumn   
                            ButtonType="ImageButton"   
                            UniqueName="EditCommandColumn"   
                            EditText="Modifier">  
                         </telerik:GridEditCommandColumn> 
                           
                         <telerik:GridButtonColumn   
                            ConfirmText="Supprimer cet usager?"   
                            ConfirmDialogType="RadWindow"   
                            ConfirmTitle="Supprimer"   
                            ButtonType="ImageButton" 
                            CommandName="Delete"   
                            Text="Supprimer"   
                            UniqueName="DeleteColumnDomaine">  
                            <ItemStyle HorizontalAlign="Center"  /> 
                         </telerik:GridButtonColumn> 
                      
                     <telerik:GridBoundColumn   
                            SortExpression="NO_IDENT"   
                            HeaderText="NO_IDENT"   
                            DataField="NO_IDENT"   
                            UniqueName="NO_IDENT"   
                            ReadOnly=true   
                            Visible=false>  
                        </telerik:GridBoundColumn> 
                          
                        <telerik:GridBoundColumn   
                            SortExpression="NOM"   
                            HeaderText="Nom"   
                            DataField="NOM"   
                            UniqueName="NOM">  
                        </telerik:GridBoundColumn> 
                          
                        <telerik:GridBoundColumn   
                            SortExpression="CODE_COURRIEL"   
                            HeaderText="Code de courriel"   
                            DataField="CODE_COURRIEL"   
                            UniqueName="CODE_COURRIEL">  
                        </telerik:GridBoundColumn> 
                          
                         <telerik:GridBoundColumn   
                            SortExpression="COURRIEL"   
                            HeaderText="Courriel"   
                            DataField="COURRIEL"   
                            UniqueName="COURRIEL">  
                        </telerik:GridBoundColumn> 
                          
                         
                                                
                        <telerik:GridDropDownColumn   
                            DataSourceID="XmlDSType" 
                            ListTextField="Text"   
                            ListValueField="Value" 
                            UniqueName="Type" 
                            SortExpression="Type" 
                            HeaderText="Type"   
                            DropDownControlType="RadComboBox" 
                            DataField="TYPE">  
                        </telerik:GridDropDownColumn> 
                          
                         <telerik:GridBoundColumn   
                            SortExpression="PANIER_MAX"   
                            HeaderText="Panier max"   
                            DataField="PANIER_MAX"   
                            UniqueName="PANIER_MAX">  
                        </telerik:GridBoundColumn> 
                           
                        <telerik:GridTemplateColumn EditFormHeaderTextFormat=" " HeaderText="d!" Visible=false>  
                            <EditItemTemplate> 
                                <asp:Label ID="Label1" runat=server visible=true Text="Le mot de passe de l'usager sera générer automatiquement lors d'un ajout. Celui-ci sera envoyé Ã  la personne concerné par courriel."></asp:Label> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                          
                    </Columns> 
                </telerik:GridTableView> 
            </DetailTables> 
        </MasterTableView> 
    </telerik:RadGrid> 
Yavor
Telerik team
 answered on 07 Oct 2009
1 answer
123 views
On ItemDataBound of the mastertable I am hiding the delete and edit columns for certains rows.
This part is working perfectly, except for when the detailtable is displayed. When the detailtable is displayed it rebinds the whole grid but does not call ItemDataBound for the mastertable so the delete and edit columns are displayed again.

protected void grdEvents_ItemDataBound(object sender, GridItemEventArgs e) 
        { 
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem) 
            { 
                GridDataItem item = (GridDataItem)e.Item; 
                if (e.Item.OwnerTableView.Name == "EventsGrid")//This is the mastertable 
                { 
                    ProtocolRegimenEvent preItem = (ProtocolRegimenEvent)e.Item.DataItem; 
                    TableCell td = item[grdEvents.Columns.FindByUniqueNameSafe("colDelete")]; 
 
                    if (preItem.EventTypeId != (int)Enums.EventTypes.Scheduled) 
                    { 
                        if (td != null && td.Controls.Count > 0) 
                        { 
                            td.Controls.RemoveAt(0); 
                            Label lbl = new Label(); 
                            lbl.Text = "-"
                            td.Controls.Add(lbl); 
                        } 
                        if (preItem.EventTypeId == (int)Enums.EventTypes.Unscheduled) 
                        { 
                            td = item[grdEvents.Columns.FindByUniqueNameSafe("colEdit")]; 
                            if (td != null && td.Controls.Count > 0) 
                            { 
                                td.Controls.RemoveAt(0); 
                                Label lbl = new Label(); 
                                lbl.Text = "-"
                                td.Controls.Add(lbl); 
                            } 
                        } 
                    } 
                } 
                else //This is a detailtable 
                { 
                     ProtocolRegimenEventForm preItem = (ProtocolRegimenEventForm)e.Item.DataItem;

                    TableCell td = e.Item.OwnerTableView.ParentItem[grdEvents.Columns.FindByUniqueNameSafe("colDelete")];

                    if (preItem.EventTypeId != (int)Enums.EventTypes.Scheduled)
                    { //remove buttons
}
                } 
            } 
        } 

I can remove the edit and delete buttons for the parentItem but not any of the other rows. How do I remove it from the other rows?


Yavor
Telerik team
 answered on 07 Oct 2009
1 answer
58 views
I am using a Menu control in conjunction with Splitbar. I used position:absolute in order to get the menu to display on top of the splitbar. However, now the child menu does not display with its offset, it displays on top of the parent menu. Is there a fix for this?
Paul
Telerik team
 answered on 07 Oct 2009
3 answers
105 views
hi,

i am applying css class to radgrid dynamically using .cssClass property. it works fine for all the postbacks. but if i reorder the column then page gets post back but css class does not get applied to grid. Please help me.
Dimo
Telerik team
 answered on 07 Oct 2009
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?