Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
89 views
Hello

When I added  

 <form id="form1" runat="server">

 

 

 

 

 <telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

 </telerik:RadScriptManager>

to the Masterpage because we can add only one instance of a ScriptManager  to a page, no items where shown in the RadTabStrip.

 Thanks


 

ahi10
Top achievements
Rank 1
 answered on 26 May 2010
1 answer
264 views
I'm using a radcombox for a custom filter on a column where  DataType="System.Int32". However, some rows are actually null.

How do I check for a possible null in the filter routine?

I've tried     tableView.filter("BoMID", null, "EqualTo");  without success.

Here's some non-working code:

   <telerik:GridTemplateColumn HeaderText="BoM" UniqueName="BoMID" FilterControlWidth="30px" 
                        AllowFiltering="true" DataType="System.Int32" DataField="BoMID" ReadOnly="True">  
                        <ItemTemplate> 
                            <asp:Literal ID="litBoM" runat="server" Text='<%#FormatBoMColumn(Eval("BoMID"))%>'></asp:Literal> 
                        </ItemTemplate> 
                        <FilterTemplate> 
                            <telerik:RadComboBox ID="ImportedFilter" runat="server"   
                                 AllowCustomText="false" DropDownWidth="70px" Width="15px">  
                                <Items> 
                                    <telerik:RadComboBoxItem Text="No Filter" Value="" /> 
                                    <telerik:RadComboBoxItem Text="Yes" Value="1" /> 
                                    <telerik:RadComboBoxItem Text="No" Value="0" /> 
                                </Items> 
                            </telerik:RadComboBox> 
                            <telerik:RadScriptBlock ID="RadScriptBlock12" runat="server">  
                                <script type="text/javascript">  
                                    function RethrownSelectedIndexChanged(sender, args) {  
                                                    var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");  
                                        var filterVal = args.get_item().get_value();  
 
                                        if (filterVal == null) {  
                                            tableView.filter("BoMID", filterVal, "NoFilter");  
                                        }  
                                        else if (filterVal == 1) {  
                                            tableView.filter("BoMID", 0, "GreaterThan");  
 
                                        }  
                                        else if (filterVal == 0) {  
                                            tableView.filter("BoMID", null, "EqualTo");  
                                        }  
                                    }     
                                </script> 
                            </telerik:RadScriptBlock> 
                        </FilterTemplate> 
                        <HeaderStyle Width="40px" Wrap="False" HorizontalAlign="Center" /> 
                        <ItemStyle Width="40px" Wrap="False" HorizontalAlign="Center" /> 
                    </telerik:GridTemplateColumn> 
Radoslav
Telerik team
 answered on 26 May 2010
1 answer
170 views
Hi,

I'm experiencing a problem with Telerik RadGrid v2010.1.309.35.

I have a control on which have two radgrids. For them I programmatically create columns with their properties. 
After initialization the control is showing correctly. Columns has their header text. But after I drag&drop items from one to another grid, the items has been dropped correctly, but the column headers has gone. I've try to solve this on many ways but I can't.

the html for my source grid is:
<telerik:RadGrid ID="rgSource" runat="server" AllowMultiRowSelection="true" ShowStatusBar="true" 
                          AutoGenerateColumns="false" EnableEmbeddedBaseStylesheet="true" ShowDesignTimeSmartTagMessage="true"  
                          EnableEmbeddedSkins="false" GridLines="None" Skin="TR" EnableAjaxSkinRendering="true"  
                          EnableEmbeddedScripts="false" EnableViewState="true" 
                          onneeddatasource="rgSource_NeedDataSource" onrowdrop="rgSource_RowDrop"  
                          onprerender="rgSource_PreRender"> 
                          <MasterTableView TableLayout="Fixed" Width="100%" runat="server"> 
                              <Columns> 
                                 
                              </Columns> 
                              <RowIndicatorColumn> 
                                  <HeaderStyle Width="20px" /> 
                              </RowIndicatorColumn> 
                              <ExpandCollapseColumn> 
                                  <HeaderStyle Width="20px" /> 
                              </ExpandCollapseColumn> 
                          </MasterTableView> 
                          <ClientSettings AllowRowsDragDrop="true"> 
                              <Selecting AllowRowSelect="True"/> 
                              <DataBinding EnableCaching="true"/> 
                              <Scrolling AllowScroll="true" UseStaticHeaders="true"/> 
                              <ClientEvents OnRowDropped="onRowDropping" /> 
                          </ClientSettings> 
                      </telerik:RadGrid> 

the html for the target grid is:
<telerik:RadGrid runat="server" ID="rgTarget" EnableEmbeddedScripts="false" 
                          AllowMultiRowSelection="true"  EnableEmbeddedBaseStylesheet="true" EnableViewState="true" 
                          EnableEmbeddedSkins="false" GridLines="None" Skin="TR" AutoGenerateColumns="false"  
                          onneeddatasource="rgTarget_NeedDataSource" onrowdrop="rgTarget_RowDrop1"  
                          onprerender="rgTarget_PreRender"> 
                          <MasterTableView TableLayout="Fixed" ShowHeadersWhenNoRecords="true" NoMasterRecordsText="" runat="server" > 
                                <Columns> 
                                  
                                </Columns> 
                        </MasterTableView> 
                        <ClientSettings AllowRowsDragDrop="True"> 
                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="false"/> 
                            <DataBinding EnableCaching="true"/> 
                            <Scrolling AllowScroll="true" UseStaticHeaders="true"/> 
                            <ClientEvents OnRowDropped="onRowDropping" /> 
                        </ClientSettings> 
                    </telerik:RadGrid> 


the code for programmatic creation of the column is:
    GridClientSelectColumn clientSelectColumn = new GridClientSelectColumn(); 
                    clientSelectColumn.HeaderText = "ChkColumn"; 
                    clientSelectColumn.UniqueName = "ChkColumn"; 
                    clientSelectColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left; 
                    clientSelectColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Left; 
                    //clientSelectColumn.HeaderStyle.Width = Unit.Pixel(25); 
                    rgSource.MasterTableView.Columns.Add(clientSelectColumn); 
                    GridClientSelectColumn client2SelectColumn = new GridClientSelectColumn(); 
                    client2SelectColumn.HeaderText = "Chk1Column"; 
                    client2SelectColumn.UniqueName = "Chk1Column"; 
                    client2SelectColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left; 
                    client2SelectColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Left; 
                    client2SelectColumn.HeaderStyle.Width = Unit.Pixel(25); 
                    rgTarget.MasterTableView.Columns.Add(clientSelectColumn); 
 
                    GridBoundColumn boundColumn = new GridBoundColumn(); 
                    boundColumn.DataField = "SoftwareID"; 
                    boundColumn.UniqueName = "Software1ID"; 
                    boundColumn.HeaderText = "SoftwareID"; 
                    rgSource.MasterTableView.Columns.Add(boundColumn); 
                    GridBoundColumn bound1Column = new GridBoundColumn(); 
                    bound1Column.DataField = "SoftwareID"; 
                    bound1Column.UniqueName = "Software2ID"; 
                    bound1Column.HeaderText = "SoftwareID"; 
                    rgTarget.MasterTableView.Columns.Add(bound1Column); 
 
                    GridBoundColumn bound3Column = new GridBoundColumn(); 
                    bound3Column.DataField = "SoftwareName"; 
                    bound3Column.UniqueName = "Software3Name"; 
                    bound3Column.HeaderText = "SoftwareName"; 
                    rgSource.MasterTableView.Columns.Add(bound3Column); 
                    GridBoundColumn bound4Column = new GridBoundColumn(); 
                    bound4Column.DataField = "SoftwareName"; 
                    bound4Column.UniqueName = "Software4Name"; 
                    bound4Column.HeaderText = "SoftwareName"; 
                    rgTarget.MasterTableView.Columns.Add(bound4Column); 
                
                    this.rgSource.MasterTableView.DataKeyNames =  new string[] { "SoftwareID", "SoftwareName" }; 
                    this.rgTarget.MasterTableView.DataKeyNames = new string[] { "SoftwareID", "SoftwareName" }; 

the drag and drop code is:

                            List<Entities.SoftwareEntities.Software> targetSoftwarelist = (List<Entities.SoftwareEntities.Software>)Session["TargetDataSet"]; 
                            List<Entities.SoftwareEntities.Software> sourceSoftwareList = (List<Entities.SoftwareEntities.Software>)Session["SourceDataSet"]; 
 
                            for (int i = 0; i < tmpNumber; i++) 
                            { 
                                 
                                Entities.SoftwareEntities.Software software = new Entities.SoftwareEntities.Software(); 
                                software.SoftwareID = e.DraggedItems[i].GetDataKeyValue("SoftwareID").ToString(); 
                                software.SoftwareName = e.DraggedItems[i].GetDataKeyValue("SoftwareName").ToString(); 
                                sourceSoftwareList.Add(software); 
 
 
                            } 
 
                            // Reorder the rows in both grids 
                            targetSoftwarelist.RemoveAll(item => sourceSoftwareList.Find(sourceItem => sourceItem.SoftwareID == item.SoftwareID) != null); 
                            sourceSoftwareList.Sort((first, second) => first.SoftwareID.CompareTo(second.SoftwareID)); 
 
                            Session["TargetDataSet"] = targetSoftwarelist; 
                            Session["SourceDataSet"] = sourceSoftwareList; 
                             
                            rgSource.MasterTableView.GetColumn("SoftwareID").HeaderText = "SoftwareID"; 
                            rgSource.MasterTableView.GetColumn("SoftwareName").HeaderText = "SoftwareName"; 
 
                            this.rgTarget.Rebind(); 
                            this.rgSource.Rebind(); 

after drag and drop items, the column headers text  at both grids is gone. I've try to override the header text on drag and drop event but nothing happens. 

Also, after drag & drop the ColumItem Text doesn't render (Picture itemtext.png). This is big issue.

Actually guys, you have a bug on this forum, I've try to add new picture, the update mode gave me to, the picture has been uploaded but doesn't appear in attached files... ;) So you can't find the picture itemtext.png in attached files....

The screenshots are attached.

Regards,
Gjorgji Dimitrov


Rosen
Telerik team
 answered on 26 May 2010
1 answer
133 views
Hello,
I am trying to change the selected tab client side, but i am getting a javascript error  FindTabByText is not a function.

Here is my code: 

<telerik:RadCodeBlock ID="profileCodeblock" runat="server">
        <script type="text/javascript">
            function selecttab(text)
    {
       var tabStrip = $find('<%=rtsSteps.ClientID %>');
                var tab = tabStrip.FindTabByText(text);
                if (!tab)
                {
                    alert("There is no tab with text \"" + text + "\"");
                    return false;
                }
                
                tab.set_selected(true); //The same as tab.select();
                return false;
    }
        </script>
    </telerik:RadCodeBlock>
    
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        
       <script type="text/javascript">
            
            function onTabSelecting(sender, args)
            {
var $div = jQuery('#dvContainer');
   var clientid= '<%=GetClientID %>';
     var url = '';
    
     switch(args.get_tab().get_value())
     {
        case 'overview':
           var form = '<%=GetOverviewForm %>';
           url = 'clientsdialog/'+form+'?clientid='+clientid;
           break;
        case 'contacts':
            url = 'clientsdialog/clientcontactmain.aspx?clientid='+clientid;
            break;
                    case 'services':
                        url = 'clientsdialog/clientservicepreferences.aspx?clientid='+clientid;
                        break;
                    case 'agreements':
                        url = 'clientsdialog/clientsagreement.aspx?clientid='+clientid;
                        break;
                    case 'settings':
                        break;
     }
    
      
       $div.load(url);
            }
            
    
    
            
</script>
    </telerik:RadScriptBlock>
    
    
     
     <div id="qsfCodeTabs">
        
        <telerik:RadTabStrip ID="rtHome" runat="server" 
        CssClass="tabstrip"  CausesValidation="false" style="display:none;"
            SelectedIndex="0">
           
            
        </telerik:RadTabStrip>
    </div>
    
    <div style="float:left;width:250px;">
   
   <div class="tabheader">
      <p>Client Profile</p>
   </div>    
   <div id="progress">
       <span class="progressBar" id="spaceused1">25%</span>
   </div>
   <telerik:RadTabStrip ID="rtsSteps" Width="197px" SelectedIndex="0" 
                runat="server" Skin="Steps" EnableEmbeddedBaseStylesheet="false" 
                EnableEmbeddedSkins="false" OnClientTabSelected="onTabSelecting" CausesValidation="False" Orientation="VerticalLeft" >
                
                <Tabs>
                    <telerik:RadTab Text="Account Overview" Value="overview" style="cursor:pointer">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Contacts" Value="contacts" style="cursor:pointer">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Service Preferences" Value="services" style="cursor:pointer">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Agreements" Value="agreements" style="cursor:pointer">
                    </telerik:RadTab>  
                    <telerik:RadTab Text="Regional Settings" Value="settings" style="cursor:pointer">
                    </telerik:RadTab>          
                </Tabs>
       
</telerik:RadTabStrip>
    </div>
    <div id="dvContainer" style="width:700px;float:right;">
    </div>
    <div style="clear:both"><br /><br /></div>
    
    <input type="button" value="test" onclick="selecttab('services');" />

I am wondering if i am doing it correctly. As i have other functions in other pages that $find works well. 

Thanks,

JV
Yana
Telerik team
 answered on 26 May 2010
1 answer
180 views
Hi, I recently installed asp.Net Ajax control toolkit. But in my program files /telerik folder i didnt find RadTabStrip.Net2.dll. But i Have Telerik.Web.UI.dll and Telerik.Web.Design.dll. I just installed trail version. For trail version do we get RadTabStrip.Net2.dll. Please elt me know. Its urgent.

Thanks
Yana
Telerik team
 answered on 26 May 2010
7 answers
156 views
Hi,

Are there any plans on improving the functionality and appearance of the Telerik charts?  The focus seems to have switched to Silverlight with the ASP.Net side of things being left to stagnate somewhat.

One especially big hole in the package is for Gauges.

Also short of adding extras in I feel that much much more needs to be added to the demo section for Charts, show us how to do all kinds of custom views and tweaks.  Most of the Telerik controls have great documentation and demos while the charting side of it feels to me to be something of a tacked on backwater.

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 26 May 2010
1 answer
116 views
Hi There,

Is there a way to disable to disable some columns (but still show the values) while the row is in edit mode?

Thanks
Shinu
Top achievements
Rank 2
 answered on 26 May 2010
1 answer
133 views
Hi

I am new to Ajax and Telerik products in particular but I have a problem with a page I have created.

I have defined a grid such that updates and inserts are handled by the insertcommand, updatecommand methods etc.

Everything works (much to my surprise and delight) except that the methods fire twice for every update, insert and delete.  I can of course handle this programatically but I would really like to know what I may have done which has caused it to happen.  I suspect that it is a grid property which I have set (or not set) but I cannot find anything obvious.

My second question relates to InPlace editing.  If something goes wrong with the database update, is there a slick way of reporting this back to the user.  I would really like to post a message alongside the record being edited but nothing I have tried seems to work.

Many thanks

Bob
Martin
Telerik team
 answered on 26 May 2010
6 answers
209 views
Hi,
I'm building a survey management tool and I'm now in the phase of showing the survey result. Some of the survey questions have the matrix type, so I'm using a column radchart control within a datalist to show their results and the radchart consists of multiple series.
My aspx looks like the following
<asp:DataList ID="ResultDataList" runat="server" Width="100%" > 
<ItemTemplate> 
<table width="100%">  
<tr> 
<td> 
<%#Eval("Question")%> 
    <asp:HiddenField ID="QuestionIDField" runat="server" Value='<%#Eval("QuestionID") %>' /> 
</td> 
</tr> 
<tr> 
<td > 
<telerik:RadChart ID="RadChart1" runat="server" Width="500" Height="250" ChartTitle-Visible="false" CreateImageMap="false"   DataGroupColumn="ColumnText"> 
                  
                                 <PlotArea> 
                        <XAxis DataLabelsColumn="OptionText"> 
                </XAxis>  
                        
               </PlotArea> 
                 
                                 
                            </telerik:RadChart> 
</td> 
</tr> 
<tr><td><hr /></td></tr> 
</table> 
</ItemTemplate> 
</asp:DataList> 
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:SurveyDBConnectionString %>" 
            SelectCommand="select optiontext,text,isnull((select COUNT(resultid)  from SurveyResult where OptionID=SurveyOption.OptionID and ColumnID=ColumnOption.ColumnOptionID   group by OptionID ),'0') as RespondentCount from SurveyOption,ColumnOption  where  SurveyOption.QuestionID=ColumnOption.QuestionID and SurveyOption.QuestionID= @QID"> 
            <SelectParameters> 
                <asp:Parameter Name="QID" /> 
            </SelectParameters> 
        </asp:SqlDataSource> 
and my code behind page looks like this:
 Protected Sub ResultDataList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles ResultDataList.ItemDataBound 
        If (Not e Is Nothing) Then 
            Dim chart As RadChart = CType(e.Item.FindControl("RadChart1"), RadChart) 
            Dim h As HiddenField = CType(e.Item.FindControl("QuestionIDField"), HiddenField) 
 
            SqlDataSource2.SelectParameters(0).DefaultValue = h.Value 
            chart.DataSource = SqlDataSource2.Select(DataSourceSelectArguments.Empty) 
            chart.Legend.Appearance.GroupNameFormat = "ColumnText" 
           chart.DataBind() 
        End If 
    End Sub 
my problems are the following:
1) The legend take the value from XAxis DataLabelsColumn "OptionText" and I wanna show the series value "ColumnText"
2) the labels above the sries showed the YAxis value "RespondentCount" and I wanna show series value "ColumnText"

Any help please...
Thank's in advance..

Ves
Telerik team
 answered on 26 May 2010
1 answer
45 views
We have a requirement where we DO NOT want the 'checkbox' to be checked when the user clicks on any column of the row, except for the checkbox itself. Is there any way to achieve it?

FYI: We are using 2008.2.1001.35 version of Telerik. "UseClientSelectColumnOnly" is not an option to use.

Best Regards,
-sa
Shinu
Top achievements
Rank 2
 answered on 26 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?