Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
141 views
Hi, 
I want to make sure that filter menu of search results overlays toolbar pane. When I click at the filter, the top most menu items are getting chopped (i.e not coming at its correct position but above the filter button). I want to know, how can I reposition the filter menu to its correct position, (i.e right next to filter button when I click it).

 

<

 

Rad:BackPanel ID="bpContent" runat="server" Width="100%" Height="0px" Header="Search Results"

 

 

style="position:absolute;" OnClientLoad="OnBPLoad" OnPaneResize="OnBPResize" >div id="divContentMain" style="position:absolute; width:100%; height:50px; top:34px; left:0px;" runat="server">

 

 

 

 

 

 

<rad:RadGrid ID="RadGridResults" runat="server" Style="position: absolute; left: 0px; top: 0px;" ShowStatusBar="true"><ClientSettings>

 

 

<ClientEvents OnGridCreated="GridCreated" OnRowDblClick="OnGridRowDblClick" OnColumnResized="ColumnResize" />
</ClientSettings>
<ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true" />

 

 

 

</rad:RadGrid>

 

 

 

<asp:Button ID="Button_RadGridResults_ExportToExcel" runat="server" Text="Export to Excel"

 

 

OnClientClick="ExportRadGridResultsToExcel();" />

 

 

<asp:Button ID="Button_RadGridResults_ExportToWord" runat="server" Text="Export to Word"

 

 

OnClientClick="ExportRadGridResultsToWord();" />

 

 

</div>

 

 

</Rad:BackPanel>

 

Sebastian
Telerik team
 answered on 23 Jul 2009
1 answer
99 views
Hi,
I use ajaxified grid and I want to implement Batch Updates and Insertions from code behind. I have GridDropDown columns and GridDateTime Column. But, when I try to obtain the updated values it only renders "null". It does not update with new values, old values are still displayed.

Here is my code:

 

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

if (e.CommandName == "UpdateAll")

 

{

 

foreach (GridEditableItem editedItem in RadGrid1.EditItems)

 

{

 

Hashtable newValues = new Hashtable();

 

e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);

 

int usr_id = int.Parse(newValues["usr_id"].ToString());

 

 

int sys_id = int.Parse(newValues["sys_id"].ToString());

 

 

int role_id = int.Parse((editedItem["role_id"].Controls[0] as DropDownList).SelectedItem.Value.ToString());

 

}
}
}

Please help..
Thanks,
RKS

Sebastian
Telerik team
 answered on 23 Jul 2009
3 answers
233 views
Hi

Please can you tell me the best/easiest way to  manually calculate aggregate fields in a grouped grid. I need to be able to reset the variable storing my running total when the grid group has changed. I don't know what is the easiest way to detect if a group has changed. Also the code i use should not crash if the grid is not grouped because the code will be present inside a function which will be called by grids that may or may not be grouped

This was the best i could think of

dim groupIndex as integer = 0 
dim runningTotal as integer = 0 
 
In item data bound event  
 
if e.item.OwnerTableView.groupExpressions = 0  'no grouping  
   runningTotalrunningTotal = runningTotal + column value  
else 'grid is grouped  
   if grid.groupIndex = groupIndex then 'same group as last time  
         runningTotalrunningTotal = runningTotal + column value  
    else 'group changed  
        groupIndex = grid.groupIndex
         runningTotal =  column value  
end if  
 
 
thanks
Peter
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
86 views

Greetings:

I'm trying to figure out how I should handle a drag/drop operation.  The source will be a RadTree node and the destination will be a WebGrid. 

Can anyone suggest the way I should go about this.  I'm using VB as the code-behind.  However, I get the feeling I'll need to do this with JAVA script.  I was reading this article which talks about ASP.NET AJAX and the 'Sys.Preview.UI._DragDropManager' class:

http://msdn.microsoft.com/en-us/magazine/cc135985.aspx

The article goes on to say,  "... the ' DragDropManager ' is the glue that binds drag sources and drop targets together. Without it, you'd be writing a ton of code to make drag-and-drop user interfaces work—especially if they had to work in a variety of browsers."

Any thoughts here??

Thanks!!

John
Top achievements
Rank 1
 answered on 23 Jul 2009
4 answers
212 views
If one has a Rad Control in a User Control, is there a way of exposing the client-side evens of the RadControl, as client-side events of the user-control, and then handling these in the page that contains the user control. For instance, let's say I have a tree in a user control. Clicking on certain nodes performs one kind of client-side action (such as navigation), while clicking on others may do something else (like opening rad window dialogs) I can handle the rad tree click event in my container page (ie the page that holds the user control), however this is not a particularly good design, since then the container page must have knowledge of what the various tree nodes are and what should occur if they are clicked. A better design would be such that the tree node click is handled within the user control and then some sort of client-side event is raised within the user control which would be handled within the container page. So, in this scenario, the user control click handler decides which node does what and then raises one of two events... Navigate(sender, eventArgs) or OpenWindow(sender eventArgs). In both cases, the "sender" is the user control. In the first case, the eventArgs would have a property that specifies the url, and likely one that specifies the the target. In the second, the eventArgs would have a propety that specifies the url.

So my basic question is, how would one go about defining these client-side events within the user control that contains the Rad Control?
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
 answered on 23 Jul 2009
0 answers
132 views
Hello,

I created a upload system for my site and I need to provide custome error handling on the client side.  I saw an old forum post that says the RadUpload controls do not have the ability to check for timeout or file size limitations.  I have the proper code in my web.config file but I need to be able to display a custom error message when one of those events happens.  Is that any update on this matter?  Is it now possible to create custom error handling for these issues?

Kyle
Kyle Jones
Top achievements
Rank 1
 asked on 23 Jul 2009
0 answers
67 views

I pasted the page below.  Any kinds of modifications to this page takes one or two minutes to save in Visual Studio 2008 (sp1).   Other types of controls do no take so long (for instance, i played around with panelbars and other types of controls).   I also have Ankh installed...a Subversion source control provider plugin for Visual Studio.  Could that be the culprit?  Any other reports of such slowness in saving pages?

<%

@ Control Language="C#" AutoEventWireup="true" CodeBehind="MemberSearch.ascx.cs"

 

 

Inherits="FraudAdministration.Controls.MemberSearch" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" MultiPageID="RadMultiPage1">

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" Text="Search Criteria" Selected="True">

 

 

</telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="Results">

 

 

</telerik:RadTab>

 

 

</Tabs>

 

</

 

telerik:RadTabStrip>

 

<

 

telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="1">

 

 

<telerik:RadPageView ID="RadPageView1" runat="server" Height="392px" Selected="True">

 

 

<div>

 

 

<!--TODO Set tab order-->

 

 

<table>

 

 

<tr>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblEnrollmentStartDate" runat="server" Text="Enrollment Date Range"

 

 

AssociatedControlID="txtEnrollmentDateFrom"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadDateInput ID="txtEnrollmentDateFrom" runat="server" DateFormat="MM/dd/yyyy"

 

 

DisplayDateFormat="MM/dd/yyyy" ShowButton="True">

 

 

</telerik:RadDateInput>

 

 

</td>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblClient" runat="server" Text="Client" AssociatedControlID="txtClient"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<!--TODO need to make this a server control that caches the clients read from the data layer-->

 

 

<telerik:RadTextBox ID="txtClient" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="text-align: right">

 

 

</td>

 

 

<td>

 

 

<telerik:RadDateInput ID="txtEnrollmentDateTo" runat="server" DateFormat="MM/dd/yyyy"

 

 

DisplayDateFormat="MM/dd/yyyy" ShowButton="True">

 

 

</telerik:RadDateInput>

 

 

</td>

 

 

<td style="text-align: right">

 

 

</td>

 

 

<td>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblPackage" runat="server" Text="Package" AssociatedControlID="txtPackage"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<!--TODO need to make this a server control that caches the package codes read from the data layer for the selected client-->

 

 

<telerik:RadTextBox ID="txtPackage" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblMembershipNumber" runat="server" Text="Membership Number" AssociatedControlID="txtMembershipNumber"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtMembershipNumber" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblClientCode" runat="server" Text="Client Code" AssociatedControlID="txtClientCode"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtClientCode" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblMemberFirstName" runat="server" Text="First Name" AssociatedControlID="txtMemberFirstName"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtMemberFirstName" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblMemberLastName" runat="server" Text="Last Name" AssociatedControlID="txtMemberLastName"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtMemberLastName" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblMemberEmailAddress" runat="server" Text="Email Address" AssociatedControlID="txtMemberEmailAddress"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtMemberEmailAddress" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblMemberSSN" runat="server" Text="SSN" AssociatedControlID="txtMemberSSN"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtMemberSSN" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblMemberPhone" runat="server" Text="Phone Number" AssociatedControlID="txtMemberPhone"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtMemberPhone" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblMemberPostalCode" runat="server" Text="Postal Code" AssociatedControlID="txtMemberPostalCode"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtMemberPostalCode" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblOrderID" runat="server" Text="Order ID" AssociatedControlID="txtOrderID"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadTextBox ID="txtOrderID" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td style="text-align: right">

 

 

<asp:Label ID="lblActivityCode" runat="server" Text="Activity Code" AssociatedControlID="txtActivityCode"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<!--TODO need to make this a server control that caches the activity codes read from the data layer -->

 

 

<telerik:RadTextBox ID="txtActivityCode" runat="server">

 

 

</telerik:RadTextBox>

 

 

</td>

 

 

<td style="text-align: right">

 

 

</td>

 

 

<td>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

<div align="center">

 

 

<asp:Button ID="btnSearchMembers" runat="server" Text="Submit" />

 

 

</div>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView ID="RadPageView2" runat="server" Height="392px">

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None">

 

 

<MasterTableView>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"

 

 

ForceExtractValue="None" Groupable="False" HeaderButtonType="TextButton" HeaderText="Member Status"

 

 

Reorderable="False" Resizable="True" SortExpression="MemberStatus" UniqueName="MemberStatusImageColumn">

 

 

<ItemTemplate>

 

 

<asp:Image ID="Image1" runat="server" Height="16" ImageUrl="~/images/Active.png"

 

 

ToolTip="Active" Width="16"></asp:Image>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="MembershipNumber"

 

 

FilterListOptions="VaryByDataType" ForceExtractValue="None" Groupable="False"

 

 

HeaderButtonType="TextButton" HeaderText="File Status" Reorderable="False" Resizable="True"

 

 

SortExpression="MembershipNumber" UniqueName="MembershipNumberColumn" Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridDateTimeColumn CurrentFilterFunction="NoFilter" DataField="EnrollmentDate"

 

 

FilterListOptions="VaryByDataType" ForceExtractValue="None" Groupable="False"

 

 

HeaderButtonType="TextButton" HeaderText="Enrollment Date" PickerType="DateTimePicker"

 

 

Reorderable="False" Resizable="True" SortExpression="EnrollmentDate" UniqueName="EnrollmentDateColumn">

 

 

</telerik:GridDateTimeColumn>

 

 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="LastName" FilterListOptions="VaryByDataType"

 

 

ForceExtractValue="None" Groupable="False" HeaderButtonType="TextButton" HeaderText="Last Name"

 

 

Reorderable="False" Resizable="True" SortExpression="LastName" UniqueName="OriginalFileNameColumn">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="FirstName" FilterListOptions="VaryByDataType"

 

 

ForceExtractValue="None" Groupable="False" HeaderButtonType="TextButton" HeaderText="FirstName"

 

 

Reorderable="False" Resizable="True" SortExpression="FirstName" UniqueName="FirstNameColumn">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="SSN" FilterListOptions="VaryByDataType"

 

 

ForceExtractValue="None" Groupable="False" HeaderButtonType="TextButton" HeaderText="SSN"

 

 

Reorderable="False" Resizable="True" SortExpression="SSN" UniqueName="SSNColumn">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Address1" FilterListOptions="VaryByDataType"

 

 

ForceExtractValue="None" Groupable="False" HeaderButtonType="TextButton" HeaderText="Address1"

 

 

Reorderable="False" Resizable="True" SortExpression="Address1" UniqueName="Address1Column">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Address2" FilterListOptions="VaryByDataType"

 

 

ForceExtractValue="None" Groupable="False" HeaderButtonType="TextButton" HeaderText="Address2"

 

 

Reorderable="False" Resizable="True" SortExpression="Address2" UniqueName="Address2Column">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="PostalCode"

 

 

FilterListOptions="VaryByDataType" ForceExtractValue="None" Groupable="False"

 

 

HeaderButtonType="TextButton" HeaderText="PostalCode" Reorderable="False" Resizable="True"

 

 

SortExpression="PostalCode" UniqueName="PostalCodeColumn">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="HomePhone" FilterListOptions="VaryByDataType"

 

 

ForceExtractValue="None" Groupable="False" HeaderButtonType="TextButton" HeaderText="HomePhone"

 

 

Reorderable="False" Resizable="True" SortExpression="HomePhone" UniqueName="HomePhoneColumn">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"

 

 

ForceExtractValue="None" Groupable="False" HeaderButtonType="TextButton" HeaderText="Record Pending"

 

 

Reorderable="False" Resizable="True" SortExpression="RecordPending" UniqueName="RecordPendingImageColumn">

 

 

<ItemTemplate>

 

 

<asp:Image ID="Image1" runat="server" Height="16" ImageUrl="~/images/Active.png"

 

 

ToolTip="Active" Width="16"></asp:Image>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="PackageLabel"

 

 

FilterListOptions="VaryByDataType" ForceExtractValue="None" Groupable="False"

 

 

HeaderButtonType="TextButton" HeaderText="PackageLabel" Reorderable="False" Resizable="True"

 

 

SortExpression="PackageLabel" UniqueName="PackageLabelColumn">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"

 

 

ForceExtractValue="None" Groupable="False" HeaderButtonType="TextButton" HeaderText="ITM"

 

 

Reorderable="False" Resizable="True" SortExpression="RecordPending" UniqueName="ITMImageColumn">

 

 

<ItemTemplate>

 

 

<asp:Image ID="Image1" runat="server" Height="16" ImageUrl="~/images/Active.png"

 

 

ToolTip="Active" Width="16"></asp:Image>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</telerik:RadPageView>

 

</

 

telerik:RadMultiPage>

 

<

 

telerik:RadWindowManager ID="RadWindowManager1" runat="server">

 

</

 

telerik:RadWindowManager>

 

<

 

telerik:RadWindow ID="RadWindow1" runat="server">

 

</

 

telerik:RadWindow>

 

Gene Mangrum
Top achievements
Rank 1
 asked on 23 Jul 2009
1 answer
94 views
Hi,

When i try to bind my grid setting the datasource to a datattable in a radgrid, I'm getting radgrid as null and getting the message "object reference not set"  I'm cuurently having some assembly problem . ( i already have posted in forums telerik[a] cannot be cast into telerik[b]). Is it because of that?

Usually i never get radgrid as null when i try to set datasource.
Any help would be really appreciated.

Thanks,
ZR
Daniel
Telerik team
 answered on 23 Jul 2009
6 answers
263 views
Hi,

I have a calendar with 4 columns and 3 rows to display a whole year.
Setting focused date to the 1st Jan of the current year brings what I need to show.
A year starting 1.1 - and ending 31st Dez.
My problem - if I use fastnavigation and choose (for an example) Today (or a month) I get a view which shows
12 months beginning with the selected one.
My approach - it should display the year (of the selected date) but again 1st Jan to 31st Dez,
I tried to handle DefaultViewChanged - but the code does nothing more then setting the fast navigation properties.
So what I get is a correct (showing jan to dec) fast navigation.
My calendar still displays 12 calendars starting with the selected month instead of Jan what I need.
Here my code
protected void rcYear_DefaultViewChanged(object sender, Telerik.Web.UI.Calendar.DefaultViewChangedEventArgs e) {  
    DateTime dtSel= e.NewView.ViewStartDate;  
    e.NewView.ViewStartDate = new DateTime(dtSel.Year, 1, 1);  
    e.NewView.ViewEndDate = new DateTime(dtSel.Year, 12, 31);  
    e.NewView.ParentCalendar.CalendarView.ViewStartDate=new DateTime(dtSel.Year, 1, 1);  
    e.NewView.ParentCalendar.CalendarView.ViewEndDate = new DateTime(dtSel.Year, 12, 31);  
    e.NewView.ParentCalendar.FocusedDate = new DateTime(dtSel.Year, 1, 1);  
    rcYear.FocusedDate = new DateTime(dtSel.Year, 1, 1);  
}  
 
I know this a bit too much - but I tried to set everything I could find :)

Regards

Manfred
Dimo
Telerik team
 answered on 23 Jul 2009
1 answer
132 views
I have a RADGrid that is databound upon page load. I have a button that initiates the Export to ExcelML.

The problem I have is this. When I rebind the RADGrid so that it contains new data, when I click the Export to ExcelML button, the data that is exported is the data that was originally bound when the page first loaded. In essence, the RADGrid is displaying new information but the export is still exporting the old information.

I am using a sqldatasource to bind the RADGrid.

Any ideas?
Daniel
Telerik team
 answered on 23 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?