Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
118 views
Is it possible to take two text fields and total them up and show that total in another text field, but only show the total when both fields have a number? If so, how can you do that? But only do that for that row, so if i add another row, the same thing will happen but only to that row, and so on...Does anyone have an example on how to do something like that?
Princy
Top achievements
Rank 2
 answered on 01 Nov 2013
5 answers
120 views
Hi. I need to create telerik grid that creates its columns automatically. Some of the columns can have mixed columns like below:

Name                 Surname                              Info
                                                        Date                   Number
------------------------------------------------------------------------------
John                  White                     4.4.2011                  45
Tracey              Dapt                       5.4.2011                  70    

I try to create a table that  its view like above. Also, I will create headers dynamically. How can I achieve this? I searched a bit of GirdTemplateColumn and ITemplate. Can anyone give me an idea?
Thanks in advance...
Princy
Top achievements
Rank 2
 answered on 01 Nov 2013
1 answer
61 views
Hello,
Im using telerik on asp.net ajax
i face problem when usign Right to Lift Languages  in RadAsyncUpload in design of control
i found the same problesm in telerik demos as u see in in attachment
the uploading area become not visible also uploading button
you can add file just by clicking (Double Click ) on the position of the RadAsynUpload 
 
i hope that there is a solution for problem

Regards ,,,

Kate
Telerik team
 answered on 31 Oct 2013
1 answer
55 views
Hi all,


I need urgently help : I'm trying to add Rad panel loading that when I click on the save button it will show on the screen spinning image for couple of sec because I have a lot of data to load so please help me and show how to do it.


This is my Code:

function MyClientShowing(sender, eventArgs) {

eventArgs.get_loadingElement().style.border = "2px solid #000000";

eventArgs.set_cancelNativeDisplay(true);

$telerik.$(eventArgs.get_loadingElement()).show("slow");

}

function MyClientHiding(sender, eventArgs) {

eventArgs.get_loadingElement().style.border = "2px solid #000000";

eventArgs.set_cancelNativeDisplay(true);

$telerik.$(eventArgs.get_loadingElement()).hide("slow");

}

function saveUserNotification_Clicked(sender, eventArgs) {

var l_saveUserInfo = $find("<%=saveUserInfo.ClientID %>");

l_saveUserInfo.style.visibility = 'none';

}

 

</script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="LeftContent" runat="server">

<div class="elementHeader">

<span class="text"> <asp:Label ID="lblFilter" runat="server" Text=""></asp:Label></span>

</div>

<div id="filterWrapperDiv" runat="server" clientidmode="Static">

<div style=" border:0px solid red; padding:20px 0px 0px 10px">

<table>

<tr>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

</table>

</div>

</div>

<div class="elementFooter"></div>

</asp:Content>

<asp:Content ID="cphRight" ContentPlaceHolderID="RightContent" runat="server">

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackColor="gray" Transparency="30"

OnClientShowing="MyClientShowing" OnClientHiding="MyClientHiding">

<span style="background-color:#FFFFFF; margin-top:30px;">Saving Plese Wait...</span>

</telerik:RadAjaxLoadingPanel>

<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="Panel1">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="Panel1" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

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

<div class="form shadow" style="margin-left: auto; margin-right: auto; height:100%;">

<div class="elementHeader">

<span class="text"> <asp:Label ID="PageTitle" runat="server" Text="EDIT USER NOTIFICATION"></asp:Label></span>

</div>

<div id="gridWrapperDiv" runat="server" clientidmode="Static">

<div id="reportFieldsDiv" runat="server" clientidmode="Static">

<div class="GeneralFontShape">

<asp:Image ID="imgBack" runat="server" ImageUrl="~/Images/GoBack.png" />

<asp:LinkButton ID="lbToLocalAdmin" runat="server" Text="Go Back" OnClick="Cancel_Click" Visible="true" ></asp:LinkButton>

</div>

<asp:Panel ID="Panel1" runat="server" Width="930px" Height="492px" BorderStyle="None">

<div style="float:left;width:455px; height: 100%; text-align: left; border: 0px solid red;">

<table style="width:435px; margin: 10px 0px 0px 10px; border:1px solid #CCCCCC">

<tr>

<td valign="top" colspan="2" class="GeneralFontShape" style="text-align:left; color:#CCCCCC;">

Automated Notification

</td>

</tr>

<tr>

<td valign="top" class="GeneralFontShape" style="text-align:left; width: 120px">

Editing User:

</td>

<td class="GeneralFontShape" style="text-align: left; width: 300px">

<asp:Label ID="lblName" runat="server" ></asp:Label>

</td>

</tr>

<tr>

<td valign="top" class="GeneralFontShape" style="text-align:left; width: 120px">

Notification by:

</td>

<td class="GeneralFontShape" style="text-align: left; width: 300px">

Email<asp:CheckBox ID="cbByEmail" runat="server" Checked="False"/> &nbsp;

SMS<asp:CheckBox ID="cbBySMS" runat="server" Checked="False"/>

</td>

</tr>

<tr>

<td class="GeneralFontShape" style="text-align: left; vertical-align:top;">Categories:<span class="validationClass">*</span>

<div>Total Selected: <asp:Label ID="lblTotal" runat="server"></asp:Label> </div></td>

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

<telerik:RadListBox ID = "rlbCategories" CheckBoxes="true" Width="290px" Height="170px"

AllowTransfer="true"

OnClientItemChecked="ShowTotalCheckedListbox"

OnTransferring="rlbCategories_Transferring"

AutoPostBackOnTransfer="true"

OnClientCheckAllChecked="ShowTotalCheckedListbox"

TransferToID=""

ShowCheckAll="true"

runat="server" >

<ButtonSettings TransferButtons="TransferAllFrom" AreaHeight="30" Position="Right" HorizontalAlign="Center" />

</telerik:RadListBox>

</td>

</tr>

<tr>

<td class="style16" valign="bottom">

</td>

<td class="style17" valign="bottom">

<telerik:RadButton ID="saveUserInfo" ValidationGroup="validateEditUser" OnClick="saveUserNotification_Click" OnClientClicked="saveUserNotification_Clicked" Width="70px" runat="server" Text="Save">

<Icon PrimaryIconCssClass="rbSave" PrimaryIconLeft="4" PrimaryIconTop="4" />

</telerik:RadButton>

<telerik:RadButton ID="btnCancel" runat="server" Text="Cancel" Width="70px" OnClick="Cancel_Click">

<Icon PrimaryIconCssClass="RadListBox1" PrimaryIconLeft="4" PrimaryIconTop="4"></Icon>

</telerik:RadButton>

</td>

</tr>

</table>

<div id ="divErrorMessage" class="divErrorMessage" runat="server" visible = "False" clientidmode="Static">

<asp:Label ID="lblErrorMessage" runat="server" ></asp:Label>

</div>

<div id ="divMessage" runat="server" class="divMessage" visible="False" clientidmode="Static">

<asp:Label ID="lblMessage" runat="server" ></asp:Label>&nbsp;&nbsp;

<asp:LinkButton ID="lbGoBack" runat="server" OnClick="Cancel_Click"><- Go Back</asp:LinkButton>

</div>

</div>

<div style="float:right; width:470px; height: 100%; text-align: left; border: 0px solid red;">

<table style="width:435px; margin: 10px 0px 0px 0px; border:1px solid #CCCCCC">

<tr>

<td valign="top" colspan="2" class="GeneralFontShape" style="text-align:left; color:#CCCCCC;">

Personal Notification - Phone

</td>

</tr>

<tr>

<td valign="top" class="GeneralFontShape" style="text-align:left; width: 120px">

Editing User:

</td>

<td class="GeneralFontShape" style="text-align: left; width: 300px">

<asp:Label ID="lblNamePhone" runat="server" ></asp:Label>

</td>

</tr>

<tr>

<td valign="top" class="GeneralFontShape" style="text-align:left; width: 120px">

User Type:

</td>

<td class="GeneralFontShape" style="text-align: left; width: 300px">

<telerik:RadComboBox ID="rcbUserType" EmptyMessage="Select User Type" runat="server" AutoPostBack="True" OnClientSelectedIndexChanged="UserTypeChangeAlert" OnSelectedIndexChanged="UserTypeChangeAlert_SelectedIndexChanged"></telerik:RadComboBox>

</td>

</tr>

<tr>

<td class="GeneralFontShape" style="text-align: left; vertical-align:top;">Categories:<span class="validationClass">*</span>

<div>Total Selected: <asp:Label ID="lblTotalPhone" runat="server"></asp:Label> </div></td>

<td style="text-align: left; padding-bottom: 35px">

<telerik:RadListBox ID = "rlbCategoriesPhone" CheckBoxes="true" Width="290px" Height="170px"

AllowTransfer="False"

OnClientItemChecked="ShowTotalCheckedListbox"

AutoPostBackOnTransfer="False"

OnClientCheckAllChecked="ShowTotalCheckedListbox"

ShowCheckAll="true"

runat="server" >

</telerik:RadListBox>

</td>

</tr>

</asp:Panel>

</table>

</div>

</div>

</div>

</div>


 
Eyup
Telerik team
 answered on 31 Oct 2013
3 answers
203 views
I found some code online that does most of what I want.

Im using something like this:

The 2 issues im having...
1) The delete button image sits to high and left on the tab.  Is there a way to format where this sits within the createcloseimage() or attachcloseimage() functions?

2) The deletetab() function will remove the tab but not the window associated with is.  The win variable get assigned the associated window but the removeWindow call doesn't seem to be working.
My call:
//create a new tab
                        var tab = new Telerik.Web.UI.RadTab();
                        //set the text of the tab
                        tab.set_text(itemText);
                        oWnd.correspondingTab = tab;
                        //add the tab to the tabstrip
                        tabStrip.get_tabs().add(tab);
                        AttachCloseImage(tab, "Images/close-md.png");
                        tabStrip.repaint();
                        tab.correspondingWnd = oWnd;
                        //tab.set_imageUrl(item.get_imageUrl());
                        tabStrip.commitChanges();
 
                        //Select this tab
                        tab.select();
 
           function CreateCloseImage(closeImageUrl) {
                var closeImage = document.createElement("img");
                closeImage.src = closeImageUrl;
                closeImage.border = "0";
                //closeImage.alt = "";
                return closeImage;
            }
 
            function AttachCloseImage(tab, closeImageUrl) {
                var closeImage = CreateCloseImage(closeImageUrl);
                closeImage.AssociatedTab = tab;
                closeImage.onclick = function (e) {
                    if (!e) e = event;
                    if (!e.target) e = e.srcElement;
 
                    deleteTab(tab);
 
                    e.cancelBubble = true;
                    if (e.stopPropagation) {
                        e.stopPropagation();
                    }
 
                    return false;
                }
                tab.get_innerWrapElement().appendChild(closeImage);
            }
 
            function deleteTab(tab) {
                var win;
                if (tab) {
                    win = tab.correspondingWnd;
                    tabStrip.trackChanges();
                    tabStrip.get_tabs().remove(tab);
                    tabStrip.commitChanges();
                    if (tabStrip._selectedIndex == -1) {
                        EnableDisableToolbarButtons();
                    }
                }
                //remove the corresponding window from the manager
                manager.removeWindow(win);
            }
Kent
Top achievements
Rank 1
 answered on 31 Oct 2013
26 answers
371 views
I have a web application using RadGrid and the data entry is done using in-line editing mode.

I would like to implement the following when the data entered is outside a predetermined range:
- pop up a warning message
or
- change the colour of the corresponding data entry cell

Can you please show me how to do this (or point me to the examples)?
Ida
Top achievements
Rank 1
 answered on 31 Oct 2013
8 answers
85 views
Hi
I am having some troubles with the Telerik radeditor.
When you make a link in the editor to a SharePoint page and afterwards moving the page to a different location, the link aren't automatically updated.
For an example; If I make a link that will point to \Testsite\test1.aspx, and moving test1.aspx to Testsite2, the link should then point to \Testsite2\test1.aspx instead of pointing to the old location, but it will still point to \Testsite\test1.aspx.

I know that MOSS own content editor web part is supporting it, so I was therefore wondering is there where any way to make radeditor do the same thing.

If it isn't possible at the moment, will it then be in a future version?

Thanks in Advance
/Tommy
Ianko
Telerik team
 answered on 31 Oct 2013
1 answer
47 views
Hi,

In a RadTabStrip if a Tab is already selected and there is a NavigateUrl associated withe the tab, So the the navigation will occur on the 1st click, but once it's get selected it should go to the NavigateUrl page till the Tab is selected.

How can this be done?

Plz Help!!!
Aneliya Petkova
Telerik team
 answered on 31 Oct 2013
1 answer
83 views
Hi guys.

I'm trying to implement the most basic version of virtual scrolling. (http://www.telerik.com/help/aspnet-ajax/grid-virtual-scrolling.html)

It works as intended, as long as I'm using a very small pagesize (no larger than 10 basically), or if I'm setting the height of the grid high enough, so that it basically displays all records (of the current page) with very little scrolling.

But that's the only time when it works correctly on my end. As soon as I increase the pagesize of the grid and keep the height of it "normal", it starts paging too early and "skipping" rows.

Let's say I'm binding 200 records to the grid, and using a pagesize of 100, sorting the grid desc by id.

I scroll down, but when I reach approximately the row with id of 140, the grid pages to the second page, and shows me correctly the second page of the grid.

But I can never access the rows between 100 and 140...

Any idea why this is happening?

Regards,
-DJ-


Konstantin Dikov
Telerik team
 answered on 31 Oct 2013
6 answers
174 views
Hello everyone, I've ha this problem for a few hrs now and still can't resolve it. I have a Master - Detail grid and one particular field in the detail grid does not get updated whereas the rest all get updated correctly. The field that is not gettting updated is the "PermissionID" field found in the 2nd level detail grid:

Here is the aspx code:

<telerik:RadGrid ID="gridCompanies" runat="server" AllowFilteringByColumn="True"

        AllowPaging="True" AllowSorting="True" DataSourceID="dsCompanies" GridLines="None"

        ShowGroupPanel="True" Skin="Office2007" ShowStatusBar="True"

        AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True">

       

        <AlternatingItemStyle BackColor="#E6E6E6" Font-Bold="False" Font-Italic="False"

        Font-Overline="False" Font-Strikeout="False" Font-Underline="False"

        Wrap="True" />

       

        <PagerStyle Mode="NextPrevAndNumeric" />

   

        <MasterTableView Name="Master" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" CommandItemDisplay="Top" AutoGenerateColumns="False" DataKeyNames="CompanyID" DataSourceID="dsCompanies">

           

            <RowIndicatorColumn>

            <HeaderStyle Width="20px"></HeaderStyle>

            </RowIndicatorColumn>

 

            <DetailTables>

                <telerik:GridTableView Name="Detail" CommandItemDisplay="Top" DataKeyNames="CompanyUserID"

                    DataSourceID="dsCompanyUsers" AllowPaging="true" AllowSorting="true"

                    AllowFilteringByColumn="False" AutoGenerateColumns="false" Width="100%"

                    AllowAutomaticDeletes="True" AllowAutomaticInserts="False" AllowAutomaticUpdates="True">

                    <RowIndicatorColumn>

                        <HeaderStyle Width="20px" />

                    </RowIndicatorColumn>

                    <ParentTableRelation>

                        <telerik:GridRelationFields DetailKeyField="CompanyUserID"

                            MasterKeyField="CompanyUserID" />

                    </ParentTableRelation>

                    <ExpandCollapseColumn>

                        <HeaderStyle Width="20px" />

                    </ExpandCollapseColumn>

 

                    <Columns>

                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn2">

                            <HeaderStyle Width="3%"></HeaderStyle>

                            <ItemStyle Width="3%"></ItemStyle>

                        </telerik:GridEditCommandColumn>

                        <telerik:GridBoundColumn DataField="CompanyID" DataType="System.Int32"

                            HeaderText="CompanyID" Display="false" ReadOnly="True" SortExpression="CompanyID" UniqueName="CompanyID">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="CompanyUserID" HeaderText="CompanyUserID"

                            SortExpression="CompanyUserID" Display="false" ReadOnly="True" UniqueName="CompanyUserID" DataType="System.Int32">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="UserID" HeaderText="UserID"

                            SortExpression="UserID" UniqueName="UserID" Display="False" ReadOnly="True" DataType="System.Int32">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="UserPermissionID" HeaderText="UserPermissionID"

                            SortExpression="UserPermissionID" UniqueName="UserPermissionID" Display="False" ReadOnly="True" DataType="System.Int32">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="CompanyUserFName" HeaderText="First Name"

                            SortExpression="CompanyUserFName" UniqueName="CompanyUserFName">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="CompanyUserLName" HeaderText="Last Name"

                            SortExpression="CompanyUserLName" UniqueName="CompanyUserLName">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="CompanyUserTitle"

                            HeaderText="Title" SortExpression="CompanyUserTitle"

                            UniqueName="CompanyUserTitle">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="CompanyUserEmail" HeaderText="Email"

                            SortExpression="CompanyUserEmail" UniqueName="CompanyUserEmail">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="CompanyUserTel"

                            HeaderText="Tel." SortExpression="CompanyUserTel"

                            UniqueName="CompanyUserTel">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="CompanyUserTelExt" HeaderText="Ext."

                            SortExpression="CompanyUserTelExt" UniqueName="CompanyUserTelExt">

                        </telerik:GridBoundColumn>

                        <telerik:GridBoundColumn DataField="CompanyUserCell" HeaderText="Cell"

                            SortExpression="CompanyUserCell" UniqueName="CompanyUserCell">

                        </telerik:GridBoundColumn>

                        <telerik:GridDropDownColumn DataField="PermissionID" DataSourceID="dsCompanyUsersPerms"

                            HeaderText="Permission" ListTextField="PermissionName" ListValueField="PermissionID"

                            UniqueName="PermissionID">

                        </telerik:GridDropDownColumn>

                        <telerik:GridCheckBoxColumn DataField="UserActive" HeaderText="Active"

                            SortExpression="UserActive" UniqueName="UserActive">

                            <HeaderStyle Width="5%"></HeaderStyle>

                            <ItemStyle Width="5%"></ItemStyle>

                        </telerik:GridCheckBoxColumn>

                    </Columns>

                </telerik:GridTableView>

            </DetailTables>

 

            <ExpandCollapseColumn>

            <HeaderStyle Width="20px"></HeaderStyle>

            </ExpandCollapseColumn>

           

            <Columns>

                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">

                    <HeaderStyle Width="3%"></HeaderStyle>

                    <ItemStyle Width="3%"></ItemStyle>

                </telerik:GridEditCommandColumn>

                <telerik:GridBoundColumn DataField="CompanyID" DataType="System.Int32"

                    HeaderText="CompanyID" ReadOnly="True" SortExpression="CompanyID"

                    UniqueName="CompanyID" Display="false">

                </telerik:GridBoundColumn>

                <telerik:GridDropDownColumn DataField="CountryID" DataSourceID="dsCountry"

                    HeaderText="Country" ListTextField="CountryName" ListValueField="CountryID"

                    UniqueName="CountryID">

                </telerik:GridDropDownColumn>

                <telerik:GridDropDownColumn DataField="ProvinceID" DataSourceID="dsProvince"

                    HeaderText="Province" ListTextField="ProvinceName" ListValueField="ProvinceID"

                    UniqueName="ProvinceID">

                </telerik:GridDropDownColumn>

                <telerik:GridBoundColumn DataField="CompanyName" HeaderText="Name"

                    SortExpression="CompanyName" UniqueName="CompanyName">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CompanyAddress" HeaderText="Address"

                    SortExpression="CompanyAddress" UniqueName="CompanyAddress">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CompanyCity" HeaderText="City"

                    SortExpression="CompanyCity" UniqueName="CompanyCity">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CompanyTel" HeaderText="Tel"

                    SortExpression="CompanyTel" UniqueName="CompanyTel">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CompanyTelAreaCode"

                    HeaderText="Tel Area Code" SortExpression="CompanyTelAreaCode"

                    UniqueName="CompanyTelAreaCode">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CompanyFax" HeaderText="Fax"

                    SortExpression="CompanyFax" UniqueName="CompanyFax">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CompanyFaxAreaCode"

                    HeaderText="Fax Area Code" SortExpression="CompanyFaxAreaCode"

                    UniqueName="CompanyFaxAreaCode">

                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="CompanyDomain" HeaderText="Domain"

                    SortExpression="CompanyDomain" UniqueName="CompanyDomain">

                </telerik:GridBoundColumn>

            </Columns>

 

            <EditFormSettings>

            <EditColumn UniqueName="EditCommandColumn1"></EditColumn>

            </EditFormSettings>

 

            <PagerStyle Mode="NextPrevAndNumeric" />

       

        </MasterTableView>

 

        <ClientSettings AllowDragToGroup="True">

        </ClientSettings>

 

        <FilterMenu EnableTheming="True" Skin="Office2007">

        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

        </FilterMenu>

       

    </telerik:RadGrid>

   

    <asp:SqlDataSource ID="dsCompanies" runat="server"

        ConnectionString="<%$ ConnectionStrings:VentrolSecurityConnectionString %>"

        InsertCommand="spCreateCompany" InsertCommandType="StoredProcedure"

        SelectCommand="spGetCompanies" SelectCommandType="StoredProcedure"

        UpdateCommand="spUpdateCompany" UpdateCommandType="StoredProcedure">

        <UpdateParameters>

            <asp:Parameter Name="CompanyID" Type="Int32" />

            <asp:Parameter Name="CountryID" Type="Int32" />

            <asp:Parameter Name="ProvinceID" Type="Int32" />

            <asp:Parameter Name="CompanyName" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyAddress" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyCity" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyTel" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyTelAreaCode" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyFax" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyFaxAreaCode" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyDomain" Type="String" ConvertEmptyStringToNull="true" />

        </UpdateParameters>

        <InsertParameters>

            <asp:Parameter Name="CountryID" Type="Int32" />

            <asp:Parameter Name="ProvinceID" Type="Int32" />

            <asp:Parameter Name="CompanyName" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyAddress" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyCity" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyTel" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyTelAreaCode" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyFax" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyFaxAreaCode" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyDomain" Type="String" ConvertEmptyStringToNull="true" />

        </InsertParameters>

    </asp:SqlDataSource>

   

    <asp:SqlDataSource ID="dsCompanyUsers" runat="server"

        ConnectionString="<%$ ConnectionStrings:VentrolSecurityConnectionString %>"

        SelectCommand="spGetCompanyUsers" SelectCommandType="StoredProcedure"

        UpdateCommand="spUpdateCompanyUser" UpdateCommandType="StoredProcedure">

        <SelectParameters>

            <asp:SessionParameter Name="CompanyID" SessionField="CompanyID" Type="Int32" />

        </SelectParameters>

        <UpdateParameters>

            <asp:Parameter Name="CompanyID" Type="Int32" />

            <asp:Parameter Name="UserID" Type="Int32" />

            <asp:Parameter Name="UserPermissionID" Type="Int32" />

            <asp:Parameter Name="CompanyUserID" Type="Int32" />

            <asp:Parameter Name="CompanyUserFName" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyUserLName" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyUserTitle" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyUserEmail" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyUserTel" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyUserTelExt" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="CompanyUserCell" Type="String" ConvertEmptyStringToNull="true" />

            <asp:Parameter Name="PermissionID" Type="Int32" />

            <asp:Parameter Name="UserActive" Type="Boolean" />

        </UpdateParameters>

    </asp:SqlDataSource>

   

    <asp:SqlDataSource ID="dsCompanyUsersPerms" runat="server"

        ConnectionString="<%$ ConnectionStrings:VentrolSecurityConnectionString %>"

        SelectCommand="spGetCompanyUsersPerms" SelectCommandType="StoredProcedure">

    </asp:SqlDataSource>

   

    <asp:SqlDataSource ID="dsProvince" runat="server"

        ConnectionString="<%$ ConnectionStrings:VentrolSecurityConnectionString %>"

        SelectCommand="spGetAllProvinces" SelectCommandType="StoredProcedure">

    </asp:SqlDataSource>

    <asp:SqlDataSource ID="dsCountry" runat="server"

        ConnectionString="<%$ ConnectionStrings:VentrolSecurityConnectionString %>"

        SelectCommand="spGetCountries" SelectCommandType="StoredProcedure">

    </asp:SqlDataSource>

    

    <telerik:RadAjaxManagerProxy ID="ajmProxy" runat="server" >

        <AjaxSettings>

            <telerik:AjaxSetting AjaxControlID="gridCompanies">

                <UpdatedControls>

                    <telerik:AjaxUpdatedControl ControlID="gridCompanies" />

                </UpdatedControls>

            </telerik:AjaxSetting>

        </AjaxSettings>

    </telerik:RadAjaxManagerProxy>

Here are the stored procedures for the detail grid:

ALTER

PROCEDURE [dbo].[spUpdateCompanyUser]

-- Add the parameters for the stored procedure here
@CompanyID int,
@UserID int,
@UserPermissionID int,
@CompanyUserID int,
@CompanyUserFName nvarchar(50),
@CompanyUserLName nvarchar(50),
@CompanyUserTitle nvarchar(50),
@CompanyUserEmail nvarchar(50),
@CompanyUserTel nvarchar(50),
@CompanyUserTelExt nvarchar(50),
@CompanyUserCell nvarchar(50),
@PermissionID int,
@UserActive bit
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

-- Insert statements for procedure here
-- Update Company User
UPDATE tbl_secure_Company_User
SET CompanyUserFName = @CompanyUserFName,
CompanyUserLName = @CompanyUserLName,
CompanyUserTitle = @CompanyUserTitle,
CompanyUserEmail = @CompanyUserEmail,
CompanyUserTel = @CompanyUserTel,
CompanyUserTelExt = @CompanyUserTelExt,
CompanyUserCell = @CompanyUserCell
WHERE CompanyUserID = @CompanyUserID

-- Update Company User Permission
EXEC spUpdateUserPerm @UserPermissionID,@PermissionID
END

------------------------------------------------------------

ALTER

PROCEDURE [dbo].[spUpdateUserPerm] -- Add the parameters for the stored procedure here
@UserPermissionID int,
@PermissionID int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

-- Insert statements for procedure here
UPDATE tbl_secure_User_Permission
SET PermissionID = @PermissionID
WHERE UserPermissionID = @UserPermissionID
END

When I execute the stored procedures from within SQL management studio it all works fine.

Please if any one can help me it would be fantastic.

Thanks in advance, much appreciation.

Reda.

Christopher Lee
Top achievements
Rank 1
 answered on 31 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?