Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
139 views
Hi,
I am calling stored procedure with linq.i can bind radgird with these commands

mmsDataContext mms = new mmsDataContext();
RadGrid1.DataSource = mms.SP_WES_groupSelect(P1,P2);
RadGrid1.DataBind();

but i cant bind it with radlist.when i bind it show me "SP_WES_groupSelectResult" value in radlist.i am trying to bind like this.

mmsDataContext mms = new mmsDataContext();
RadListBox1.DataSource = mms.SP_WES_groupSelect(P1,P2);
RadListBox1.DataBind();
Teoman
Top achievements
Rank 1
 answered on 15 Jan 2010
1 answer
180 views
I cant seem to figure out how to force the grid to filter text fields as not case sensitive.  I see that you can specify the Grouping settings like so: <GroupingSettings CaseSensitive="False" />

But is there a way to do this for filtering?  For instance I have a column named "City".  The records though are sporadic,  for instance Atlanta has all three entries, "atlanta", "ATLANTA", and "Atlanta".

If I enter "atlanta" in the filter textbox and select "EqualTo" it ignores the others. 

Is there a way to work around this?
Daniel
Telerik team
 answered on 15 Jan 2010
1 answer
67 views
Hi Telerik team,

I have a requirement , the person in top level can view his/her sub-ordinates appointments.
So in this case a particular time slot may have as many appointments possible.
But in week view we can hardly see the appointments if its more than 2.
Please refer the screen shot in attachment
Can we have a possibility to show 'more...' link in week view as available in Monthly view?

My second query is,
Is it possible to remove the time slot only in weekview and retain in day view?

Regards,
Mike Taylor
Top achievements
Rank 1
 answered on 15 Jan 2010
3 answers
337 views
Hi

I am trying to find a reference to a control in nested radgrid nestedviewtemplate. What is the code to refer to the btnGo control in the nested RadGrid?

thanks

D

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
 
</head> 
<body class="BODY">  
    <form runat="server" id="mainForm" method="post">  
    <telerik:RadScriptManager runat="server" ID="ScriptManager1">  
    </telerik:RadScriptManager> 
    <!-- content start --> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" AutoGenerateColumns="False" 
        AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5" 
        GridLines="None" ShowGroupPanel="true">  
        <PagerStyle Mode="NumericPages"></PagerStyle> 
        <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="EmployeeID" AllowMultiColumnSorting="True">  
            <NestedViewTemplate> 
                <telerik:RadGrid runat="server" ID="nestedgrid"  ShowFooter="true" 
                    AllowSorting="true" EnableLinqExpressions="false">  
                    <MasterTableView ShowHeader="true" AutoGenerateColumns="true" AllowPaging="true" 
                        PageSize="7">  
                        <Columns> 
                            <telerik:GridEditCommandColumn> 
                            </telerik:GridEditCommandColumn> 
                   
                        </Columns> 
                        <EditFormSettings EditFormType="Template">  
                            <FormTemplate> 
                                <asp:Button ID="btngo" runat="server" Text="go" /> 
                            </FormTemplate> 
                        </EditFormSettings> 
                    </MasterTableView> 
                </telerik:RadGrid> 
            </NestedViewTemplate> 
            <Columns> 
                <telerik:GridBoundColumn SortExpression="FirstName" HeaderText="First Name" HeaderButtonType="TextButton" 
                    DataField="FirstName" UniqueName="FirstName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="LastName" HeaderText="Last Name" HeaderButtonType="TextButton" 
                    DataField="LastName" UniqueName="LastName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="Title" HeaderText="Title" HeaderButtonType="TextButton" 
                    DataField="Title" UniqueName="Title">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="BirthDate" DataFormatString="{0:MM/dd/yyyy}" 
                    HeaderText="Birth Date" HeaderButtonType="TextButton" DataField="BirthDate" UniqueName="BirthDate">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="City" HeaderText="City" HeaderButtonType="TextButton" 
                    DataField="City" UniqueName="City">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="Country" HeaderText="Country" HeaderButtonType="TextButton" 
                    DataField="Country" UniqueName="Country">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings AllowDragToGroup="true" /> 
    </telerik:RadGrid> 
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Employees" 
        runat="server"></asp:SqlDataSource> 
    <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
        ProviderName="System.Data.SqlClient"   
        runat="server"></asp:SqlDataSource> 
    <!-- content end --> 
    </form> 
</body> 
</html> 
 
Imports Telerik.Web.UI  
Imports System  
Imports System.Data  
Imports System.Data.SqlClient  
Imports System.Web.UI.WebControls  
Imports System.Configuration  
Partial Class _Default  
    Inherits System.Web.UI.Page  
 
    Dim ConnString As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString  
 
 
    Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemCreated  
 
        If TypeOf e.Item Is GridNestedViewItem Then  
            Dim rg As RadGrid = e.Item.FindControl("NestedGrid")  
            Dim btngo As Button = rg.MasterTableView.FindControl("btnGo")  
 
            rg.DataSource = myds()  
            rg.DataBind()  
        End If  
 
    End Sub  
    Public Function myds() As dataset  
        Dim conn As SqlConnection = New SqlConnection(ConnString)  
        Dim adapter As SqlDataAdapter = New SqlDataAdapter  
        adapter.SelectCommand = New SqlCommand("SELECT TOP 10 OrderID, ShipName, ShipAddress FROM Orders", conn)  
        Dim myDataSet As DataSet = New DataSet  
 
        conn.Open()  
        Try  
            adapter.Fill(myDataSet, "Orders")  
            adapter.SelectCommand = New SqlCommand("SELECT OrderID, Quantity FROM [Order Details]", conn)  
            adapter.Fill(myDataSet, "OrderDetails")  
        Finally  
            conn.Close()  
        End Try  
        Return myDataSet  
 
    End Function  
      
End Class  
 

Princy
Top achievements
Rank 2
 answered on 15 Jan 2010
1 answer
76 views
I am opening a RadWindow (with RadSplitter - 2 radpanes with 2 different pages.)  by clicking on a RadContextMenu.

oWnd = window.radopen(url,

null);

 

- I open my RadWindow in a nameless window .

I have to open a second level of RadWindow by clicking on a button in the second pane, which occupies the bottom 1/3rd of the page. By default, if I use the RadWindowmanager of my second pane page, the new radwindow opens within the bounds of that pane. When I try to open the new radwindow by using the RadWindowManager of the parent page, the new window does open but my page with the splitter becomes blank.

Can I open the second RadWindow properly outside the bound of the second pane? The page in the second pane has radTab, can I refresh the content of the second level RadWindow when the radPageView is clicked?

Thanks.
Fiko
Telerik team
 answered on 15 Jan 2010
1 answer
125 views
Hi,
How can i display pane header like interasoft web ui pane headers 
look at the attached image,here i'm using interasoft web UI pane
in first pane there is a page which contains RAD Tree and second Pane contains RAD Grid
i Have tried putting a div inside pane as header but its not working because i'm using ContentUrl for the panes

Thanks
Tsvetie
Telerik team
 answered on 15 Jan 2010
7 answers
133 views
Hi Rad Team,

we are using a RadComboBox in an RadAjaxPanel and we have some issues in Firefox 3. In IE7 the page works perfectly, but in FF3 after the SelectedItem changed and the ajax call comes back there is problem, the ComboBox freezes and (other possibly RadControls in the same Panel).

Firebug reported me following problem:

uncaught exception: The container of an boundary-point of a range is being set to either a node of an invalid type or a node with an ancestor of an invalid type. (NS_ERROR_DOM_RANGE_INVALID_NODE_TYPE_ERR)

It also states this exception happens in line 8340 of the follwong code:

8216//////////////////////// IE functionality for Mozilla/Netscape ///////////////////////////////
8217 // make Mozilla browsers emulate IE's node/element functionality
8218if (isNav) {
8219 Element.prototype.contains = function(element){
8220 var range=document.createRange();
8221 range.selectNode(this);
8222 return range.compareNode(element)==3;
8223 }
8224
8225 Element.prototype.applyElement = function(element, where){
8226 if(!element.splitText){
8227 element.removeNode();
8228 if(where && where.toLowerCase()=="inside"){
8229 for(var i=0;i<this.childNodes.length;i++){
8230 element.appendChild(this.childNodes[i])
8231 }
8232 this.appendChild(element)
8233 }else{
8234 var parent_Node=this.parentNode;
8235 parent_Node.insertBefore(element,this);
8236 element.appendChild(this);
8237 }
8238 return element;
8239 }
8240 }
8241
8242 Element.prototype.insertAdjacent=function(where, element){
8243 var parent_Node=this.parentNode;
8244 switch(where.toLowerCase()) {
8245 case "beforebegin":
8246 parent_Node.insertBefore(element,this);
8247 break;
8248 case "afterend":
8249 parent_Node.insertBefore(element,this.nextSibling);
8250 break;
8251 case "afterbegin":
8252 this.insertBefore(element,this.childNodes[0]);
8253 break;
8254 case "beforeend":
8255 this.appendChild(element);
8256 break;
8257 }
8258 }
8259
8260 Element.prototype.insertAdjacentText = function(where, text){
8261 var text_Node=document.createTextNode(text||"")
8262 this.insertAdjacent(where, text_Node);
8263 }
8264
8265 Element.prototype.insertAdjacentHTML = function(where, html){
8266 var range=document.createRange();
8267 range.selectNode(this);
8268 var fragment=range.createContextualFragment(html);
8269 this.insertAdjacent(where, fragment);
8270 }
8271
8272 Element.prototype.insertAdjacentElement = function(where,element){
8273 this.insertAdjacent(where,element);
8274 return a2;
8275 }
8276
8277// Node.prototype.removeNode = function (node){
8278// var parent_Node=this.parentNode;
8279// if(parent_Node && !node){
8280// var fragment=document.createDocumentFragment();
8281// for(var i=0;i<this.childNodes.length;i++){
8282// fragment.appendChild(this.childNodes[i])
8283// }
8284// parent_Node.insertBefore(fragment,this)
8285// }
8286// return parent_Node ? parent_Node.removeChild(this):this;
8287// }
8288
8289 Node.prototype.removeNode = function( removeChildren ) {
8290 var self = this;
8291 if ( Boolean( removeChildren ) )
8292 {
8293 return this.parentNode.removeChild( self );
8294 }
8295 else
8296 {
8297 var range = document.createRange();
8298 range.selectNodeContents( self );
8299 return this.parentNode.replaceChild( range.extractContents(), self );
8300 }
8301 }
8302
8303 Node.prototype.replaceNode = function (node){
8304 return this.parentNode.replaceChild(node,this)
8305 }
8306
8307 Node.prototype.swapNode=function(node){
8308 var parent_Node=node.parentNode;
8309 var next_Sibling=node.nextSibling;
8310 this.parentNode.replaceChild(node,this);
8311 parent_Node.insertBefore(this, next_Sibling)
8312 return this;
8313 }
8314
8315 // outerHTML implementation
8316 var _emptyTags = {
8317 "IMG": true,
8318 "BR": true,
8319 "INPUT": true,
8320 "META": true,
8321 "LINK": true,
8322 "PARAM": true,
8323 "HR": true
8324 };
8325
8326 HTMLElement.prototype.__defineGetter__("outerHTML", function () {
8327 var attrs = this.attributes;
8328 var str = "<" + this.tagName;
8329 for (var i = 0; i < attrs.length; i++)
8330 str += " " + attrs[i].name + "=\"" + attrs[i].value + "\"";
8331
8332 if (_emptyTags[this.tagName])
8333 return str + ">";
8334
8335 return str + ">" + this.innerHTML + "</" + this.tagName + ">";
8336 });
8337
8338 HTMLElement.prototype.__defineSetter__("outerHTML", function (sHTML) {
8339 var r = this.ownerDocument.createRange();
8340 r.setStartBefore(this);
8341 var df = r.createContextualFragment(sHTML);
8342 this.parentNode.replaceChild(df, this);
8343 });
8344
8345}

Do you have any idea for fixing this?

Thanks, Stefan



Andrea Doberstein
Top achievements
Rank 1
 answered on 15 Jan 2010
2 answers
150 views
Hi,

In your demo http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/default/defaultvb.aspx, when clicking " " the paging slider and info (page 1 of ....) becomes visible.
When I set "AllowPaging=true" only the slider is visible and not the information block.

I also set

RadFileExplorer1.Grid.PagerStyle.PagerTextFormat = "Change page: {4} | Displaying page {0} of {1}, items {2} to {3} of {5}."

but it doesn't help.

Marc



Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 15 Jan 2010
1 answer
140 views
Hi,

I have a fairly complex UI in my application and have decided to take the approach outlined in http://www.telerik.com/help/aspnet-ajax/ajxchangecursor.html

This approach works partially in that the hourglass does appear during the AJAX call;  however when the mouse is moved around during the AJAX call, the specified cursor is overridden whenever the mouse is positioned over asp:CheckBox or telerik:RadTextBox controls.

I was able to fix the situation for the checkboxes by dynamically changing/appending to the CSS class using http://stackoverflow.com/questions/195951/change-an-elements-css-class-with-javascript as inspiration but the RadTextBox controls ignore the new styles.

Is there a better approach to have the updated cursor apply to the body and all of it's child controls?

Thanks,

Dave
Dimo
Telerik team
 answered on 15 Jan 2010
6 answers
120 views
I've used the export to PDF from a simple grid and it works great.

My question pertains to using Export to PDF from a hierarchical grid with some additional complications.  I have a page (see attachment) which has not only a hierarchical grid but a summary section that sums data from the grid.  I'd like to throw all that info to a PDF.

Does the Grid based Export to PDF allow one to modify the contents of the output file by adding additional information such as I have here in my summary section?  I can't find any decent example in the help files.

If this is not a feasible solution, what would one do to build a PDF "report" in the middle of this page containing this grid plus summary information?

Thanks much,
JC
John Cooney
Top achievements
Rank 1
 answered on 15 Jan 2010
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?