Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
97 views

 HI

    I am having a RadGrid. For this RadGird I want to have a filter for only one single column let say column name as "UserName". And I want to bind a list to RadGrid as DataSource. I want to use RadComboBox in FilterTemplet . 

I have already gone through this link http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx.  But its not working for me
 How can i do this ?

 Will you please provide me a sample code?

 Thanks
 Srikanth gn
Pavlina
Telerik team
 answered on 02 Jul 2009
3 answers
178 views
Hello

Is is possible to set up the grid grouping expressions so that they group the rows in a grid based on just the date (and not the time) of a column of type Date?

I presume one option will be to solve the problem at the actual data source by creating a view which returned an extra column containing only the date part of the date/time data. I could then group on this field.

Is there any way I can achieve this with the grid itself?

thanks
Yavor
Telerik team
 answered on 02 Jul 2009
3 answers
147 views
I have a read editor that uses a toolbar from an xml - this works fine.  I am trying to display icons for the 2 tools I have created but cant get them to display properly - what am I doing wrong here?

Toolbar XML File:
 <tools name="Database" dockable="true" dockingZone="Top" enabled="true"> 
        <tool name="InsertImage" Text="Insert Dealer Image" value="[d_logo]" /> 
        <tool name="InsertDBColumns" type="dropdown"> 
            <item name="First Name" value="[first_name]"></item> 
            <item name="Last Name" value="[last_name]"></item> 
            <item name="Address" value="[address]"></item> 
            <item name="City" value="[city]"></item> 
            <item name="State" value="[state]"></item> 
            <item name="Zip Code" value="[zip]"></item> 
            <item name="Contact Person" value="[contact]"></item> 
            <item name="Contact Email Link" value="[email]"></item> 
            <item name="Contact Phone #" value="[phone]"></item> 
            <item name="Contact Phone Ext." value="[contact_ext]"></item> 
        </tool> 
    </tools> 

Styles From Page Header:
    <style type="text/css"> 
 
    .reToolbar.Sunset .InsertImage 
    { 
        background-image:url(../images/img_icon.gif);                                                                  
    }     
    .reToolbar.Sunset .InsertDBColumns 
    { 
        background-image:url(../images/db_icon.gif);                                                                  
    } 
 
    </style> 

EDITOR:
<telerik:RadEditor ID="editor_DBEDITS" runat="server" Height="400px"  
                                    Skin="Sunset"  
                                    ToolsFile="UserControls/EditorToolbar.xml" Width="700px" OnClientCommandExecuting="OnEditorExecuting"> 
                                    <Content> 
</Content> 
                                </telerik:RadEditor> 




Martin
Telerik team
 answered on 02 Jul 2009
4 answers
131 views
hello.
i have a grid and on page load i want to show only the column names of the grid and there is a link button inside the commanditem.
when i click on  the link button a popup opens and i chose a column data from that popup and press submit .that popup closes and on the close of that pop up i want  a new row should be added to the grid which contains the chosen item and other 5 columns with textbox,datepicker and checkbox with no data.

and also there should be hierarchy in the grid.
  please help me in this problem.
i will be highly obliged to you people.
thanks in advance.
DK
Top achievements
Rank 2
 answered on 02 Jul 2009
1 answer
74 views
I'm needing to write to the telerik editor. can this be done. If so, are there examples?
Princy
Top achievements
Rank 2
 answered on 02 Jul 2009
6 answers
326 views
Hi everyone.

As many of you already know, there is a temporary resizing of the rad windows before it is resized and centered. I have read that Telerik had included this for some future development.

Can someone please tell me if this is already available or how to use it?
btw, I am using Telerik 2009.1.311.35.

Thanks in advance.
YA
JEAN DAVID ELBAZE
Top achievements
Rank 1
 answered on 02 Jul 2009
8 answers
270 views
Hi,

I have implemented a scheduler and the schedules contains recurrence data.

Now I need to show these schedules created, in a telerik report.

My report page would not contain a scheduler. I just want to connect to the database, get the schedules data from the table and show it in a telerik report.

My question is, the recurrence field in the database, contains a string like this: 

 "DTSTART:20090106T150000Z  DTEND:20090106T190000Z  RRULE:FREQ=DAILY;COUNT=10;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU  ".

How to parse this and show it in the report ?

Should I follow this logic or is there a better way to do it ?

1. Read data from the database.

2. Create new instances of "Appointment" based on the data read from the database, for each row.

3. Use "RecurrenceRule" to parse the recurrence, if recurrence field is not empty.

4. Add the result to a datatable and bind it to the report.

Is the above logic the way to go ? Please advice.

Thanks in advance.

-Karthik Selvaraj


shashidhar
Top achievements
Rank 1
 answered on 02 Jul 2009
1 answer
119 views

Hi guys

I have added a web part in my sharepoint everything is up and running

But i have this particular problem

In my web part there a panalbar

In which  u all can imagine it like this

( on page load u all will see like this shown below where + is the expandable button )

Category A +
Category B +

(On click of the + sign u all will see like tat)

Category A -
Item 1
Item 2
Item 3
Category B +

The problem is when i click on either Category A or B the whole page will automatic scroll up to the top , to the very first Category
Imagine if in future i were to have 100 expandable item than if user choose the 99 item it will jump up to the top of the page after the item expand than it be troublesome for user to scroll all the way down again .It be messy too .

The attach is my CSS style sheet , Kindly advise . Thanks

.CompanyA_Department_Category  
{  
    background: #EEEEEE;  
}  
 
.CompanyA_Department_Alt_Odd_Level0  
{  
    background: #FF9900;  
}  
 
.CompanyA_Department_Alt_Even_Level0  
{  
    background: #FFD752;  
}  
 
.CompanyA_Department_Category .rpText  
{  
    margin-left: 3px;  
    font: bolder 8pt Arial;  
    color: black;  
}  
 
.CompanyA_Department_Course .rpText  
{  
    margin-left: 3px;  
    font: bold 8pt Arial;  
    color: orange;  
}  
 
.CompanyA_Department_CourseDescription .rpText  
{  
    margin-left: 3px;  
    font: 8pt Arial;  
    color: black;  
    cursor: default;  
}  
 
.CompanyA_Department_CourseURL .rpText  
{  
    margin-left: 3px;  
    font: 8pt Arial;  
    text-decoration: underline;  
    color: black;  
}  
 
.RadPanelBar_Default  
{  
    color: #232323;  
    background: #FFFFFF;  
}  
 
.RadPanelBar_Default ul.rpRootGroup  
{  
    border: none;  
    /*border: 1px solid #262626;*/ 
    padding: 20px 36px 28px 28px;  
}  
 
.RadPanelBar_Default_rtl ul.rpRootGroup  
{  
    padding: 20px 28px 28px 36px;  
    text-align: rightright;  
}  
 
.RadPanelBar_Default .rpLink  
{  
    border: none;  
    /*border-bottom: 1px solid #bfbfbf;*/ 
    overflow-x: hidden;  
}  
 
.RadPanelBar_Default .rpLink:hover  
{  
    border: none;  
    /*border-bottom: 1px solid #bfbfbf;*/ 
    text-decoration: none;  
    /*border-bottom-color: #fff;*/ 
}  
 
.RadPanelBar_Default .rpText  
{  
    height: 20px;  
    vertical-align: centre;  
    margin-right: 7px;  
    overflow-x: hidden;  
}  
 
.RadPanelBar_Default_rtl .rpText  
{  
    height: 20px;  
    vertical-align: centre;  
    margin-left: 7px;  
    margin-right: 0;  
}  
 
.RadPanelBar_Default .rpExpandable .rpText  
{  
    background: transparent url('/_layouts/images/School/Department/button_expand.gif') no-repeat rightright;  
}  
 
.RadPanelBar_Default .rpExpanded .rpText  
{  
    background: transparent url('/_layouts/images/School/Department/button_collapse.gif') no-repeat rightright;  
}  
 
.RadPanelBar_Default .rpGroup .rpExpanded .rpText,  
.RadPanelBar_Default .rpGroup .rpExpandable .rpText  
{  
    background-position: rightright 5px;  
}  
 
.RadPanelBar_Default_rtl .rpExpandable .rpText  
{  
    background: transparent url('PanelBar/arrow-right.gif') no-repeat left 9px;  
}  
 
.RadPanelBar_Default_rtl .rpExpanded .rpText  
{  
    background: transparent url('PanelBar/arrow-down.gif') no-repeat left 9px;  
}  
 
.RadPanelBar_Default_rtl .rpGroup .rpExpanded .rpText,  
.RadPanelBar_Default_rtl .rpGroup .rpExpandable .rpText  
{  
    background-position: left 5px;  
}  
 
.rpimage  
{  
    height: 50px;  
    width: 50px;  
}  
 
.RadPanelBar_Default .rpGroup  
{  
    overflow-x: hidden;  
    overflow-y: auto;  
}  
 
.RadPanelBar_Default .rpGroup .rpLink,  
.RadPanelBar_Default .rpGroup .rpLast .rpLink  
{  
    border: none;  
}  
 
.RadPanelBar_Default .rpGroup .rpLink:hover,  
.RadPanelBar_Default .rpGroup .rpLast .rpLink:hover  
{  
    border: none;  
    text-decoration: none;  
}  
 
.RadPanelBar_Default .rpLevel1 .rpLink .rpFirst  
{  
    border: none;  
    /*border-top: 1px solid #bfbfbf;*/ 
}  
 
.RadPanelBar_Default .rpLevel1 .rpLink .rpItem .rpFirst  
{  
    border: none;  
    /*border-top: 1px solid #626262;*/ 
}  
 
.RadPanelBar .rpLevel1  
{  
    border: none;  
    /*border-bottom:1px solid #BFBFBF;*/ 
}  
 
.RadPanelBar .rpLast .rpLevel1  
{  
    border: none;  
}  
 
.RadPanelBar_Default .rpLevel1 .rpLast .rpLink  
{  
    border: none;  
}  
 
.RadPanelBar_Default .rpLevel1 .rpLast .rpLink:hover  
{  
    border: none;  
}  
 
.RadPanelBar_Default .rpLevel1 .rpGroup .rpLast .rpLink,  
.RadPanelBar_Default .rpLevel1 .rpLast .rpGroup .rpLink  
{  
    border: none;  
    /*border-bottom-width: 1px;*/ 
}  
 
.RadPanelBar_Default .rpRootGroup .rpLink,  
.RadPanelBar_Default .rpRootGroup .rpTemplate  
{  
    font: normal 12px Arial, Verdana, Sans-serif;  
    color: #fff;  
}  
 
/* --  space between the top-level categories */ 
.RadPanelBar ul.rpRootGroup li.rpItem  
{  
    margin-top: 10px;  
    margin-bottom: 10px;  
}  
 
/* --  space between the items */ 
.RadPanelBar ul.rpGroup li.rpItem  
{  
    margin-top: 3px;  
    margin-bottom: 3px;  
}  
 
.RadPanelBar_Default .rpRootGroup .rpText  
{  
    padding: 6px 7px 6px 3px;  
}  
 
.RadPanelBar_Default_rtl .rpRootGroup .rpText  
{  
    padding: 6px 3px 6px 7px;  
}  
 
.RadPanelBar_Default .rpGroup .rpLink,  
.RadPanelBar_Default .rpGroup .rpTemplate  
{  
    font-size: 11px;  
}  
 
.RadPanelBar_Default .rpGroup .rpText  
{  
    padding: 1px 7px 0 0;  
}  
 
.RadPanelBar_Default_rtl .rpGroup .rpText  
{  
    padding: 1px 0 0 7px;  
}  
 
.RadPanelBar_Default .rpLevel1 .rpImage  
{  
    margin-left: 10px;  
}  
 
.RadPanelBar_Default .rpLevel2 .rpImage  
{  
    margin-left: 20px;  
}  
      
.RadPanelBar_Default .rpLevel3 .rpImage  
{  
    margin-left: 30px;  
}  
 
.RadPanelBar_Default .rpLevel1 .rpText  
{  
    padding-left: 10px;  
}  
 
.RadPanelBar_Default .rpLevel2 .rpText  
{  
    padding-left: 20px;  
}  
 
.RadPanelBar_Default .rpLevel3 .rpText  
{  
    padding-left: 30px;  
}  
 
.RadPanelBar_Default .rpLevel1 .CompanyA_ImageItem .rpText  
{  
    padding-left: 5px;  
}  
 
.RadPanelBar_Default .rpLevel2 .CompanyA_ImageItem .rpText  
{  
    padding-left: 5px;  
}  
 
.RadPanelBar_Default .rpLevel3 .CompanyA_ImageItem .rpText  
{  
    padding-left: 5px;  
}  
 
.RadPanelBar_Default_rtl .rpLevel1 .rpText  
{  
    padding-right: 10px;  
    padding-left: 0;  
}  
 
.RadPanelBar_Default_rtl .rpLevel2 .rpText  
{  
    padding-right: 20px;  
    padding-left: 0;  
}  
 
.RadPanelBar_Default_rtl .rpLevel3 .rpText  
{  
    padding-right: 30px;  
    padding-left: 0;  
}  
 
.RadPanelBar_Default .rpSelected .rpText  
{  
    font-weight: bold;  
}  
 
 
.RadPanelBar_Default .rpDisabled .rpText  
{  
    cursor: default;  
    color: #bbb;  
}  
 
.RadPanelBar_Default .rpRootGroup .rpDisabled:hover  
{  
    border: none;  
    /*border-bottom-color: #bfbfbf;*/ 
    cursor: default;  
    text-decoration: none;  
}  
 
.RadPanelBar_Default .rpGroup .rpDisabled:hover  
{  
    border: none;  
    /*border-bottom: 1px solid #626262;*/ 
    cursor: default;  
    text-decoration: none;  
}  
 
/* -- Without Itemized Separators  */ 
.RadPanelBar_Default .rpGroup .rpItem .rpLink.rpExpandable.CompanyA_Department_Category,  
.RadPanelBar_Default .rpGroup .rpItem .rpLast .rpLink.rpExpandable.CompanyA_Department_Category  
{  
    border-top: none;  
}  
 
.RadPanelBar_Default .rpGroup .rpItem .rpLink.rpExpandable.CompanyA_Department_Category:hover,  
.RadPanelBar_Default .rpGroup .rpItem .rpLast .rpLink.rpExpandable.CompanyA_Department_Category:hover  
{  
    border-top: none;  
}  
 
.RadPanelBar_Default .CompanyA_Department_Category .rpGroup .rpItem.rpFirst .rpLink.CompanyA_Department_Course  
{  
    border-top: none;  
}  
 
.RadPanelBar_Default .CompanyA_Department_Category .rpGroup .rpItem.rpFirst .rpLink.CompanyA_Department_Course:hover  
{  
    border-top: none;  
}  
 
.RadPanelBar_Default .rpGroup .rpItem .rpLink.CompanyA_Department_Course,  
.RadPanelBar_Default .rpGroup .rpItem .rpFirst .rpLink.CompanyA_Department_Course,  
.RadPanelBar_Default .rpGroup .rpItem .rpLast .rpLink.CompanyA_Department_Course  
{  
    border-top: none;  
}  
 
.RadPanelBar_Default .rpGroup .rpItem .rpLink.CompanyA_Department_Course:hover,  
.RadPanelBar_Default .rpGroup .rpItem .rpLast .rpLink.CompanyA_Department_Course:hover  
{  
    border-top: none;  
 
 
Shinu
Top achievements
Rank 2
 answered on 02 Jul 2009
2 answers
312 views
I have added a RadAjaxManager to my page.  In my client-side javascript I initiate the call to the my AjaxRequest method.  After the server-side event is completed the returning response to the client generates an "Access is denied" message in the MicrosoftAjax.js file.

I have tried both an ASP.NET ScriptManager object and a RadScriptManager object with both producing the same error (it seems that the RadScriptManager uses the MicrosoftAjax.js file).

My ScriptManager is contained within a MasterPage, so my first thought was that I should move the RadAjaxManager to the MasterPage, also.  I am receiving the same error regardless of the location of the RadAjaxManager.

Here is my code to instantiate the Rad objects on the MasterPage:

 

<telerik:RadScriptManager runat="server" ID="masterScriptManager" ScriptMode="Auto">  

 

</telerik:RadScriptManager>  

 

<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest">  

 

</telerik:RadAjaxManager>

Here is my javascript on the contentpage to fire the event

 

//Initiate AJAX request to update the page  

 

 

var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");  

 

if (ajaxManager != null)  

ajaxManager.ajaxRequest();

 

 

Here is the javascript that receives the error in the MicrosoftAjax.js file:

 

Sys.Net.XMLHttpExecutor =

 

function Sys$Net$XMLHttpExecutor() {  

 

/// <summary locid="M:J#Sys.Net.XMLHttpExecutor.#ctor" />  

 

 

if (arguments.length !== 0) throw Error.parameterCount();  

Sys.Net.XMLHttpExecutor.initializeBase(

this);  

 

 

 

var _this = this;  

 

this._xmlHttpRequest = null;  

 

this._webRequest = null;  

 

this._responseAvailable = false;  

 

this._timedOut = false;  

 

this._timer = null;  

 

this._aborted = false;  

 

this._started = false;  

 

this._onReadyStateChange = (function() {  

 

if (_this._xmlHttpRequest.readyState === 4) {  

 

try {  

 

if (typeof (_this._xmlHttpRequest.status) === "undefined") {  

 

return; 

}

} 

 

catch (ex) { return; }

 

_this._clearTimer();

_this._responseAvailable =

true;

 

 

 

try { 

 

 

_this._webRequest.completed(Sys.EventArgs.Empty);

}

 

finally {              <-------------------------  Access Denied error received on this line  

 

if (_this._xmlHttpRequest != null) { 

_this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;

_this._xmlHttpRequest = n

ull;  

 

 

}

}

}

}); 

 

this._clearTimer = (function() {  

 

if (_this._timer != null) { 

window.clearTimeout(_this._timer);

_this._timer =

null;

 

 

}

}); 

 

this._onTimeout = (function() {  

 

if (!_this._responseAvailable) { 

_this._clearTimer();

_this._timedOut =

true;  

 

 

_this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;

_this._xmlHttpRequest.abort();

_this._webRequest.completed(Sys.EventArgs.Empty);

_this._xmlHttpRequest =

null;  

 

 

}

});

}

Other items of note in doing some research:

1.  There seems to be an underlying theme in the Google searches that this is a bug in the ASP.NET framework when you use frames or iframes on your webpages.  I am NOT using frames or iframes anywhere in my project.  I have also tried the modification to the MicrosoftAjax.js found at http://weblogs.asp.net/bleroy/archive/2007/01/31/how-to-work-around-the-quot-access-denied-quot-cross-domain-frame-issue-in-asp-net-ajax-1-0.aspx to no avail.

2.  Another underlying theme Google searches is cross domain issues.  Everything is running on my development workstation under the localhost domain.  This is done with the built-in web server in Visual Studio 2008.  I have also tried adjusting my security settings based on http://msdn.microsoft.com/en-us/magazine/cc301993.aspx to no avail.

3. I am using the ASP.NET 3.5 controls/framework.

4.  On the content page I have a RadGrid and RadScheduler.  Both of these have datasources that are datatables bound in the code-behind.

In summary, this issue only happens when I make a call to the AjaxRequest event attached to the RadAjaxManager.  It is very frustrating and dissappointing because the RadAjaxManager is a very powerful tool that will enhance our application, if it works properly.

Thanks in advance,

Christian

 

 

Monika
Top achievements
Rank 1
 answered on 02 Jul 2009
3 answers
143 views
Hi,

i have my radgrid and i put in there a RadGridColumn Type ImageButton. I handle its fired Event in code behind with following method:

private void GridCommand(object o, Telerik.Web.UI.GridCommandEventArgs e) 
{ 
            if (e.CommandName == "Delete") 
            { 
                try 
                { 
                    int rowNr = e.Item.ItemIndex; 
 
                    int startSS = radGrid.Items[rowNr].KeyValues.IndexOf("\"") + 1; 
                    int endSS = radGrid.Items[rowNr].KeyValues.IndexOf("\"", startSS); 
                    int id = Convert.ToInt32(radGrid.Items[rowNr].KeyValues.Substring(startSS, endSS - startSS)); 
 
                    string filepath = BLDocument.DeleteDocument(id); 
                     
                    if(File.Exists(filepath)) 
                        File.Delete(filepath); 
 
                    BindTo(); 
                } 
                catch (Exception ex) 
                { 
 
                } 
            } 
} 

That way i retrieve the id, delete the entity in my database and rebind the DataSource to the radgrid so it updates its state to the new database state.

Questions:

The radGrid.Items[rowNr].KeyValues give me this back "{id:\"3\"}". Is the so cause i gave the radgrid this property:
                                               <MasterTableView DataKeyNames="id">   ?

How would i be able to do it in another way retrieving this id?
I also have there a Invisible GridBoundColumn also holding the id. How would i be able to get that id?
Is there another way to actualize the radgrid (accept of my way or Rebind() which didnt work)?

Another attached handler method in the back wants to let the client download the chosen document, but i get following exception:

[System.Threading.ThreadAbortException] = {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}

I set EnablePostBackOnRowClick="true" but it didnt change anything. Is there a away to get that exception lost?





thx mario
Yavor
Telerik team
 answered on 02 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?