Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
84 views
q2 2009
vs2008

Hi,

When I add the radDecorator to my asp.net login control, There's a vertical line in my button.
This happens in both firefox and IE 8.

I assume that it's an issue with the skin, it happens with both web20 and outlook2007

Pease help.

Chris
Chris Yoker
Top achievements
Rank 1
 answered on 18 Nov 2009
2 answers
176 views
Hi All,

I am using rad combo in user control. This user control is being called as edit control in rad grid.
I successfully showing data from database in rad combo box on click of edit icon in grid.
But,
When i m updating, the data/text/value contained in the combo is not there and m unable to find value/test in it . Hence its passing NULL to stored procedure as parameter.

if (e.CommandArgument.ToString() == "Edit")  
                { 
                    UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID); 
                    RadTextBox txtOrderValue = userControl.FindControl("txtOrderValue") as RadTextBox; 
                    RadTextBox txtCostOfSale = userControl.FindControl("txtCostOfSale") as RadTextBox; 
                    RadComboBox ddlCurrency = userControl.FindControl("ddlCurrency") as RadComboBox; 
                    RadComboBox ddlReason = userControl.FindControl("ddlForReason") as RadComboBox; 
                     
 
                    //Prepare new row to add it into DataSource 
                    DataSet dsValidate = new DataSet(); 
                    int userID = Convert.ToInt16(hidUserId.Value); 
                  
                    Convert.ToSingle(txtOrderValue.Text); 
                    _Order.CostOfSale = Convert.ToSingle(txtCostOfSale.Text); 
                    _Order.Creator = Convert.ToInt16(hidUserId.Value); 
                     
                    _Order.CurrencyCode = ddlCurrency.SelectedValue.ToString(); 
                    _Order.Reason = ddlReason.SelectedValue.ToString(); 


Can anybody tell why this is happening? I am getting this problem with ddlCurrency and ddlReason both.


Thanks,
Awadh
Awadh .
Top achievements
Rank 1
 answered on 18 Nov 2009
2 answers
160 views
I can't seem to get the Automatic Updates to fire when I move an item from 1 listbox to another.  When I move an item from 1 listbox to another I need to insert that moved record into a table in my db.  Is this functionality even possible?

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShipmentForwardingVendorCrews.aspx.cs"

 

 

Inherits="Graebel.RITS.Web.Relocations.ShipmentForwardingVendorCrews" %>

 

<%

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

 

<%

@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

 

 

Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head runat="server">

 

 

<title>Shipment Forwarding Vendor Crews</title>

 

 

<link href="../Graebel.css" rel="stylesheet" />

 

</

 

head>

 

<

 

body>

 

 

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

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

</asp:ScriptManager>

 

 

<asp:Panel ID="PageContent" runat="server">

 

 

<h1>

 

Shipment Forwarding Vendor Crews

</h1>

 

 

<br />

 

 

<asp:DropDownList ID="ddlODAgent" runat="server" OnSelectedIndexChanged="ddlODAgent_SelectedIndexChanged"

 

 

AutoPostBack="True">

 

 

</asp:DropDownList>

 

 

<br />

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

 

 

<telerik:RadListBox ID="rlbIsNotCrewLeads" runat="server" Width="200px" Height="200px"

 

 

SelectionMode="Single" AllowTransfer="True" TransferToID="rlbAssignCrewLeads" AutoPostBackOnReorder="True"

 

 

EnableDragAndDrop="True" DataSourceID="UnassignedCrewLeadsDataSource" DataKeyField="VendorCrewId"

 

 

DataTextField="FirstName" DataValueField="VendorCrewId" Skin="Telerik" BorderColor="Black"

 

 

BorderStyle="Solid" BorderWidth="2px">

 

 

</telerik:RadListBox>

 

 

<telerik:RadListBox ID="rlbAssignCrewLeads" runat="server"

 

 

DataSourceID="AssignedCrewLeads" DataKeyField="VendorCrewId" DataTextField="FirstName"

 

 

DataValueField="VendorCrewId" Skin="Telerik" AllowAutomaticUpdates="True" Width="200px" Height="200px"

 

 

BorderColor="Black" BorderStyle="Solid" BorderWidth="2px">

 

 

</telerik:RadListBox>

 

 

<br />

 

 

</telerik:RadAjaxPanel>

 

 

<asp:EntityDataSource ID="UnassignedCrewLeadsDataSource" runat="server" AutoGenerateWhereClause="True"

 

 

CommandText="SELECT value crew

 

FROM VendorCrew AS crew

WHERE NOT EXISTS(SELECT sfvc.VendorCrew.VendorCrewId

FROM ShipmentForwardingVendorCrew AS sfvc

WHERE sfvc.Shipments.ShipmentId = @ShipmentId)

AND crew.CompanyEntities.CompanyEntityId = @VendorId

AND crew.IsActive = true

AND crew.IsCrewLead = true"

 

ConnectionString="name=RITSNetEntities"

 

 

DefaultContainerName="RITSNetEntities" Include="ShipmentForwardingVendorCrew,CompanyEntities">

 

 

<CommandParameters>

 

 

<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />

 

 

<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId" PropertyName="SelectedValue"

 

 

Type="Int32" />

 

 

</CommandParameters>

 

 

</asp:EntityDataSource>

 

 

<asp:EntityDataSource ID="AssignedCrewLeads" runat="server" ConnectionString="name=RITSNetEntities"

 

 

DefaultContainerName="RITSNetEntities" EnableDelete="True" EnableInsert="True"

 

 

EnableUpdate="True" Include="VendorCrew" AutoGenerateWhereClause="True" EntitySetName="ShipmentForwardingVendorCrew"

 

 

Where="">

 

 

<InsertParameters>

 

 

<asp:SessionParameter Name="shipmentId" SessionField="10" DbType="Int32" />

 

 

<asp:SessionParameter DbType="Boolean" Name="IsOriginServicesVendor" SessionField="IsOrigin" />

 

 

<asp:ControlParameter ControlID="rlbAssignCrewLeads" DefaultValue="true" Name="IsCrewLead"

 

 

PropertyName="SelectedValue" DbType="Boolean" />

 

 

</InsertParameters>

 

 

<UpdateParameters>

 

 

<asp:SessionParameter Name="shipmentId" SessionField="10" DbType="Int32" />

 

 

<asp:SessionParameter DbType="Boolean" Name="IsOriginServicesVendor" SessionField="IsOrigin" />

 

 

<asp:ControlParameter ControlID="rlbAssignCrewLeads" DefaultValue="true" Name="IsCrewLead"

 

 

PropertyName="SelectedValue" DbType="Boolean" />

 

 

</UpdateParameters>

 

 

<WhereParameters>

 

 

<asp:SessionParameter Name="shipmentId" SessionField="10" DbType="Int32" />

 

 

<asp:SessionParameter DbType="Boolean" Name="IsOriginServicesVendor" SessionField="IsOrigin" />

 

 

</WhereParameters>

 

 

</asp:EntityDataSource>

 

<%

--<asp:EntityDataSource ID="UnassignedCrewDataSource" runat="server" AutoGenerateWhereClause="True"

 

CommandText="SELECT value crew

FROM VendorCrew AS crew

WHERE NOT EXISTS(SELECT sfvc.VendorCrew.VendorCrewId

FROM ShipmentForwardingVendorCrew AS sfvc

WHERE sfvc.Shipments.ShipmentId = @ShipmentId)

AND crew.CompanyEntities.CompanyEntityId = @VendorId

AND crew.IsActive = true" ConnectionString="name=RITSNetEntities"

DefaultContainerName="RITSNetEntities" Include="ShipmentForwardingVendorCrew,CompanyEntities">

<CommandParameters>

<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />

<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId" PropertyName="SelectedValue"

Type="Int32" />

</CommandParameters>

</asp:EntityDataSource>--

 

%>

 

<%

-- <asp:EntityDataSource ID="AssignedCrewDataSource" runat="server"

 

AutoGenerateWhereClause="True"

CommandText="SELECT value crew

FROM VendorCrew AS crew

WHERE EXISTS(SELECT sfvc.VendorCrew.VendorCrewId

FROM ShipmentForwardingVendorCrew AS sfvc

WHERE sfvc.Shipments.ShipmentId = @ShipmentId)

AND crew.CompanyEntities.CompanyEntityId = @VendorId

AND crew.IsActive = true"

ConnectionString="name=RITSNetEntities"

DefaultContainerName="RITSNetEntities"

Include="ShipmentForwardingVendorCrew,CompanyEntities">

<CommandParameters>

<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />

<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId"

PropertyName="SelectedValue" Type="Int32" />

</CommandParameters>

</asp:EntityDataSource>--

 

%>

 

 

</asp:Panel>

 

 

</form>

 

</

 

body>

 

</

 

html>

 

Mark Galbreath
Top achievements
Rank 2
 answered on 18 Nov 2009
1 answer
91 views
Dear telerik,

We're trying to add RTL support to our application that uses the Q3/2009 RadSplitter control, but we're getting an error in the javascript embedded resource file as follows:
a.RadSplitter._preInitialize=function(b){a.RadSplitterController.getInstance()._addSplitter(b);  
 
…  
 
}},_ensureItemsOrder:function(g,t){this._fixItemsIndeces(g);  
if(t){var o=this._splitters[g];  
var l=this._panes;  
var q=o.panes;  
var e=q?q.length:0;  
var r=o.splitbars;  
var p=r?r.length:0;  
var c=e+p;  
var f=[];  
for(var h=e-1;  
h>=0;  
h--){var d=q[h];  
f[f.length]=d;  
var n=l[d];  
n.indexInPanes=e-1-n.indexInPanes;  
n.index=(c-1-n.index);  
n.isLastPane=false;  
var j=n.prevSplitBarId;  
n.prevSplitBarId=n.nextSplitBarId;  
n.nextSplitBarId=j;  
}o.panes=f;  
var m=this._splitBars; //_splitBars is null, but _splitbars in not null  
var k=[];  
for(var h=p-1;  
h>=0;  
h--){var s=r[h];  
k[k.length]=s;  
var b=m[s]; //since m is null, m[s] is a problem  
…  
 
I added the above comments for clarity. Note that the error seems to be in the line var b=m[s] but m is null because it was assigned above as m=this._splitBars instead of _splitbars.

Can you please suggest a solution?

Salah A. Malaeb
TeknoBuild
Tsvetie
Telerik team
 answered on 18 Nov 2009
1 answer
244 views
I'm using a Telerik RadDatePicker and it gives me the attached (GUI Warning message) if I put in a date 30 years ago or more. If I put in November 1980 everything saves fine without any warning. If I put in November 1979 or later it gives me this warning message and doesn't save. I have attached my code. I've tried setting the MinDate property to 1900-01-01 and it made no difference. Any ideas? Am I missing a key property on my control? The reason I'm using the RadDatePicker is I need the month year format.


<table cellpadding="0" cellspacing="0" border="0">  
    <tr> 
        <td style="padding-right:10px;">  
           Date of diagnosis for this condition?  
        </td> 
        <td> 
           <telerik:RadDatePicker ID="txtDiagnosisDate" runat="server" SelectedDate='<%# Bind("DiagnosisDate") %>'>  
             <DateInput ID="DateInput1" DateFormat="MMMM yyyy" runat="server">  
             </DateInput> 
             <Calendar ID="Calendar1" runat="server">  
               <FastNavigationSettings TodayButtonCaption="current date" /> 
             </Calendar> 
           </telerik:RadDatePicker> 
        </td>                                         
    </tr> 
</table> 
Martin
Telerik team
 answered on 18 Nov 2009
1 answer
113 views

Is there a way to create a multi-column dropdown list in a comboBox using a webservice as a source?

Thanks so much for the help.
JC
(dangelesjc@yahoo.com)
Simon
Telerik team
 answered on 18 Nov 2009
1 answer
150 views

Hello All,

We have a ASP.NET AJAX based application which uses Modal RadWindow Popups.

Same application will run in different organizations and some organizations have small resolution monitors.

First I would asked that if Popup Window is quite big in small resolution monitor ant Window's caption is now shown, how can I move Window with using mouse? Are there any key combinations which would move Modal RadWindow?

Second question is that have any of you made scalable Popup Windows? Can it be done using Telerik's RadWindow?

Thanks,

Michael

Svetlina Anati
Telerik team
 answered on 18 Nov 2009
2 answers
126 views
The GridDropDownColumn is one of the most often used and yet I struggle (and many other as seen in the counless forum questions) with the fundamentls probably due to very weak documenatation and description of strategies and common approaches.

If the grid represents a data table tbl_A, then most likely the GridDropDownColumn will represent a value tbl_A_value that is taken from another list lets say tbl_B (tbl_B_value, tbl_B_description).  In the view mode, we want the grid to find description corresponding to tbl_A_value from tbl_B.  In the edit mode, we would want all the choices from tbl_B to appear in the drop down box.

I represent tbl_A and tbl_B through datasets and datatables.  Since, the tbl_B is virtually static and is the same for all the items in the collumn, I feel that there should be one place to initialize the internal GridDropDownColumn.  I really don't think that the ItemDataBound()  is the right place to do so.  I tried several approaches but none of them worked:

1) Defined  GridDropDownListColumnEditor in aspx and in PageLoad() defined its DataSource by assigning the appropriate DataTable.
2) Also in PageLoad(), I casted  grid column from MasterView to GridDropDownColumn and tried to assign appropriete values but don't know how to assign DataSource since only DataSourceID (string) is available to be set.

I guess I would like someone to post example on how to do GridDropDownColumn most efficiently using DataSet or DataTable solutions and no embedded SQL statements.

Chris

Christopher Borys
Top achievements
Rank 1
 answered on 18 Nov 2009
1 answer
90 views
When using the ImageManagerDialog (I also have a custom FileContentProvider) either from within Editor or standalone, the return value of src includes the http://server at the beginning, exactly like the href return value. I expected it to be the url from the FileBrowser which is also the save as the value or src within the outerHTML return value.

Is this the expected behaviour?

ex:

href = http://localhost/Handler.ashx?path=images/foo.jpg
outerHTML = <IMG style="WIDTH: 120px; HEIGHT: 90px" src="/Handler.ashx?path=images/foo.jpg">
src = http://localhost/Handler.ashx?path=images/foo.jpg

shouldn't src = /Handler.ashx?path=images/foo.jpg

Thanks.
Rumen
Telerik team
 answered on 18 Nov 2009
1 answer
362 views
Hello,
 
I've setup my radgrid to open a usercontrol in a popup when double clicking on a row for editing. If I edit the row using the control and save or if I cancel, all is fine. The save is being handled by an UpdateCommand event that is in my main page, the same one where the grid exist.

The UpdateCommand event function properly extracts the value, and updates the row within a beginedit/endedit pair. Right after the endedit, I call AcceptChanges on my dataset (the datasource is the business layer of a dataset that is bound using the needdatasource event).

The call to AcceptChanges triggers the grid Rowchanging event within which (on DataRowAction.Change) I call the update method of my business layer. My business layers validates the data, making sure it is ok to be updated in the database and updates the row in the database using dataadapter methods if all is ok.

This works great.

... Except when the business layer validation finds that the row is not ok. The way I have it setup is that it generates an exception with the error message (with throw new exception("error message")). This eventually goes up to the UpdateCommand function which traps it and creates a new label control to display the message at the top of the editform usercontrol and sets e.canceled to true. The label displays properly. Here is how I do it:

 

            catch (Exception ex)  
            {  
                changedRows[0].CancelEdit();  
                Label lc = new Label();  
                lc.Text="ERROR: "+ex.Message;  
                lc.ForeColor=Color.Red;  
                userControl.Controls.AddAt(0,lc);  
                e.Canceled=true;  
                e.Item.Edit = true;  
            }  
 

The problem: After this takes place, it seems that while the popup remains on the screen, the page has lost track of it. If I click my save button again then the updatecommand event is never called and the popup simply disappears. Other events defined in the user control also no longer take place.

It is probably something with radgrid not saving the usercontrol to viewstate. Any ideas how I can fix that?

-=-
On a somewhat related subject, while I'd very much like to find a solution to the above, I am also considering moving the editform to its own page. This is because when I double click on a row to open up the popup edit box with user control, radgrid implements that by a full postback that resends the whole grid (and page), this time including the popup right in the middle of the grid's generated html. The same thing takes place when I hit save or cancel in the edit popup. It has been suggested here that I should look at client-side databinding and editing but I'd like to avoid doing that. For now I see two options: 1) double-clicking on rows openup a new browser window with a new page or 2) I put my editform below the grid and load it and make it visible and jump to it when I double click on a row and put all of that in a radpanel so that this can be handled by an ajax request instead of a full post back.

Any thoughts on this and links to examples?

Regards,
 
Sylvain

 

Iana Tsolova
Telerik team
 answered on 18 Nov 2009
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?