Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
197 views
Hi,
  I have a asp.net page that has a grid on it.  This grid is refreshed peridodically via a RadXMLHttpPanel.  The problem is that I need this auto refresh to stop when session state ends and redirect to a login page...however the auto refresh mechanism keeps the session state alive.  I thought the Ajax controls bypassed part of page life cycle and session state would expire...but it appears to be doing a full postback?  How can I get a partial page update without keeping session state alive?...and ultimately once session state is dead then to redirect to another page...Below is my script code that starts the refresh based on a js timer...

//js script
function startWorklistRefresh() {
                if (wlIntervalId == 0) {
                    wlIntervalId = setInterval("reloadWorklist();", wlCtrlAutoRefreshRate);
                }
               }
 
            function reloadWorklist() {
                $find("<%= XmlGridPanel.ClientID %>").set_value("Reload");
            }
 
            function GridXmlPanel_OnResponseEnded(sender, args) {
                startWorklistRefresh();
            }
 
//aspnet markup...
 <telerik:RadXmlHttpPanel ID="XmlGridPanel" runat="server" OnServiceRequest="GridXmlPanel_OnServiceRequest"
            OnClientResponseEnded="GridXmlPanel_OnResponseEnded" EnableClientScriptEvaluation="true">
            <telerik:RadGrid id="GridWorklist" runat="server" SkinID="main" GridLines="None" style="outline: none;" OnItemCreated="GridWorklist_ItemCreated" OnItemDataBound="GridWorklistt_ItemDataBound">...
 
And the xml panel event on the server side...
 protected void GridXmlPanel_OnServiceRequest(object sender, RadXmlHttpPanelEventArgs e)
        {
            GridWorklist.DataSource = RadTechData.GetWorklist(AppUtils.CurrentFacilityID);
            GridWorklist.DataBind();
        }
Pero
Telerik team
 answered on 15 Sep 2011
1 answer
249 views
I've been following the instructions on this page to get Telerik controls working in a SharePoint WebPart. I'm getting an error on the following line in the OnInit method:
this.Page.Form.Controls.AddAt(0, scriptManager);
The error says:
"The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases."
I reckon the RadScriptManager could be added to the masterpage, but because it is a WebPart we're building we'd much prefer to keep it as a self-contained object. Anyway, it looks like the example code isn't really valid. Am I missing something?
Eraph
Top achievements
Rank 1
 answered on 15 Sep 2011
1 answer
462 views
In RadGrid control, you can add DetailTables.

By default, the html generated out of this added DetailTable contains <colgroup> and <thead> elements.

I'd need to remove these 2 elements and currently I'm using JQuery on the client side:

thisNestedTable.find('> thead,> colgroup').remove();

How to achieve this from the server side? Does GridTableView support this to exclude these 2 elements from the generated html?

I'd need this asap so would really appreciate it if you could respond quickly.
Galin
Telerik team
 answered on 15 Sep 2011
1 answer
72 views
Hi

I have a radscheduler in a weekday view. When the user clicks in the weekday name the radscheduler render all the appointments for that day, eg, if I click in "Tuesday" the form makes a postback and automatically displays the events only for "Tuesday". How can I detect this event? I wish to save in a state variable if the user is seeing the whole week or only one day


Thanks
Regula
Top achievements
Rank 1
 answered on 15 Sep 2011
1 answer
78 views
Hi,

I'm using the following codes to remove the some of the filter selections.  For some reason, it set the filters for all of the datetime columns to 'no filter'

 

 

GridFilterMenu menu = GridWellVent.FilterMenu;  

int i = 0; 

while (i < menu.Items.Count)

{

if (menu.Items[i].Text == "NoFilter" || menu.Items[i].Text == "Contains")

{

i++;

}

else

{

menu.Items.RemoveAt(i);

}

}

thanks,
Minh Bui

Andrey
Telerik team
 answered on 15 Sep 2011
5 answers
1.1K+ views
Hi,

I am trying to show vertical scrollbars on a RadGrid and on initial pageload column headers squeeze to the left and leave large empty space on right.  However, the columns render properly after postback.  How can I  render the coloumns correctly even on initail page load. Given below is my mark up.


<telerik:RadGrid ID="TicketsGrid" runat="server" 
                           EnableEmbeddedSkins="false"   AllowPaging="True" PageSize="20"
                           AllowFilteringByColumn="True" AllowSorting="True"    ShowGroupPanel="True"
                           ClientSettings-ClientEvents-OnRowClick="gridClick"
                           EnableHeaderContextFilterMenu="True" EnableHeaderContextMenu="True" 
                           GridLines="None" oncolumncreated="rgTicketsGrid_ColumnCreated"
                           ondatabound="rgTicketsGrid_DataBound"
                           ongroupschanging="rgTicketsGrid_GroupsChanging"
                           onsortcommand="rgTicketsGrid_SortCommand"
                           onpageindexchanged="rgTicketsGrid_PageIndexChanged"
                           onpagesizechanged="rgTicketsGrid_PageSizeChanged"     >
                          <mastertableview allowfilteringbycolumn="False" GroupLoadMode="Server"   Height="95%"   TableLayout="Auto" >
                          </mastertableview>  
                         <SortingSettings  EnableSkinSortStyles="false" />
                          
                          <clientsettings allowdragtogroup="True" allowrowsdragdrop="True"  enablerowhoverstyle="True"  >
                                 <selecting allowrowselect="True" />
                                 <clientevents onrowdropping="rowDropping" />
                                 <clientevents onrowcontextmenu="RowContextMenu" />
                                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true"   >
                                 </Scrolling>
                          </clientsettings>
                          <activeitemstyle borderstyle="Solid" font-bold="True" />
                          <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                          <GroupingSettings ShowUnGroupButton="true"    />
                          
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                        <AlternatingItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                   </telerik:RadGrid>


If I use  Fixed Table layout,  all columns  headers render properly and Fixed layout shows problem when you try to group records by field name. When grouped in fixed layout, edge of column headers and items do not align. In grouped mode, all records squeeze to left.

Any help is appreciated.

Thanks,
Prava
Pavlina
Telerik team
 answered on 15 Sep 2011
8 answers
163 views
I am using a RadBinaryImage to display images that have been previously uploaded into our database by dynamically setting its DataValue property.  While the control successfully renders the byte[] as an image, it fails to correctly render transparent gif colors as transparent.  For example:  Instead of rendering this transparent gif with transparent background, the RadBinaryImage control renders the gif like this.

Is this a bug in the RadBinaryImage control?  Or, is there a property that I missed that denotes image type?
Tsvetina
Telerik team
 answered on 15 Sep 2011
7 answers
155 views
Hi Guys, I have a RadScheduler that use a Datatable as Datasource.

DataTable Structure
 DataTable dtAppointments = new DataTable("Appointments");
            dtAppointments.Columns.Add("ItemID", typeof(int));
            dtAppointments.Columns.Add("Title", typeof(string));
            dtAppointments.Columns.Add("CalendarType", typeof(string));
            dtAppointments.Columns.Add("StartDate", typeof(DateTime));
            dtAppointments.Columns.Add("EndDate", typeof(DateTime));
            dtAppointments.Columns.Add("hasEndDate", typeof(bool));
            dtAppointments.Columns.Add("Description", typeof(string));
            dtAppointments.Columns.Add("Location", typeof(string));
            dtAppointments.Columns.Add("RecurrenceRule", typeof(string));
            dtAppointments.Columns.Add("RecurrenceParentID", typeof(string));
            dtAppointments.Columns.Add("IsRecurrence", typeof(bool));

Everything works great until I need to use the DataRecurrenceField field. I use the value "DTSTART:20110801T000000Z\r\nDTEND:20110802T000000Z\r\nRRULE:FREQ=WEEKLY;COUNT=20;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SU\r\n"
in the column RecurrenceRule as a string but when the calendar is loaded the item is add in all days of the month. What I did wrong?
 RadScheduler1.DataSource =Call the method that create the DataTable with the data.
  RadScheduler1.DisplayRecurrenceActionDialogOnMove = true;
                    RadScheduler1.DataSubjectField = "Title";
                    RadScheduler1.DataStartField = "StartDate";
                    RadScheduler1.DataEndField = "EndDate";
                    RadScheduler1.DataKeyField = "itemID";
                    RadScheduler1.DataRecurrenceField = "RecurrenceRule";
                    RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID";
RadScheduler1.DataBind();

I also used a static text that represent "Monday, 20 June 2011 12:00 AM - Friday, 31 January 2025 11:59 PM (Central Time Zone)
Repeat weekly every 5 weeks on Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday"

RecurrenceRule 
"DURATION:P1D\r\nDTSTART;VALUE=DATE:20110620\r\nRRULE:FREQ=WEEKLY;INTERVAL=5;BYDAY=SU,MO,TU,WE,TH,FR,SA;WKST=MO\r\n"

I need your help!!
Hank


Kalina
Telerik team
 answered on 15 Sep 2011
2 answers
93 views
We have just started to implement using the RAD Menu. On one of our pages, we have a div which we set with a css style (background:url('....'))

When using IE6, when the Rad Menu expands the menu appears behind the image, getting hidden. I have read the posts on the z-index on other parts of the telerik site and have manually set the z-index of the menu and the menu items, and set the div itself to have a z-index of 1. I have also set the position of the div to be relative. It still goes behind.

Are there any known fixes for this? It works fine in all other browsers, we unfortunately have to support IE 6 for some of our clients.

Thanks

Eric
Eric
Top achievements
Rank 1
 answered on 15 Sep 2011
7 answers
96 views
Hi, 
I am using rad rotator and have 7 item templates with a single image in every itemtemplate... When it rotates the image will scroll one by one.. working fine .. 
Now I have an scenario I have numeric buttons outside the rotator like with caption 1 2 3 4 5 6 7... I want to achieve that if the rotator is on image 3 just suppose and user click button with caption 7 then the rotator should rotate 4 images (4 images visibly slide) and stops at image 7... 


Can you help me how can I achieve this through Client Side API function, any routine or function .. 

Thanks in Advance .. 
Slav
Telerik team
 answered on 15 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?