Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
97 views
Hi,
I want make this example to Entities
http://blogs.telerik.com/vladimirenchev/posts/08-09-09/how_to_telerik_radgrid_master_detail_client-side_data-binding_using_linq_to_sql_and_webservice.aspx
but I get empty Grid in Default.aspx

I change  in WebService.asmx :
IQueryable<Customer> customers = new DataClassesDataContext().Customers.AsQueryable<Customer>();
IQueryable<Order> orders = new DataClassesDataContext().Orders.AsQueryable<Order>();
to:
IQueryable<Customers> customers = new NORTHWINDModel.NORTHWINDEntities().Customers.AsQueryable<Customers>();
IQueryable<Orders> orders = new NORTHWINDModel.NORTHWINDEntities().Orders.AsQueryable<Orders>();
       
http://adek24.comlu.com/EntitiesMasterDetailClientSideDataBinding.zip



   
please help me



Tsvetoslav
Telerik team
 answered on 18 Sep 2009
3 answers
130 views
Hi,

Is there a way to centralize Telerik (and ASP.NET Ajax) scripts (like in aspnet_client directory) ?

We got multiple applications using Telerik, and we'd like to avoid downloading script when starting an application.
If a client already downloaded/cached the scripts with application A, why does it have to download them again with application B ? (both application uses the same Telerik version)

Thanks
B B
Top achievements
Rank 1
 answered on 18 Sep 2009
1 answer
134 views
Hi,
I have a simple pagelayout

<----------- PAGELAYOUT ----------->

<%@ Page language="C#"  ....
<%@ Register TagPrefix="Telerik" Namespace="Telerik.SharePoint.FieldEditor" Assembly="RadEditorSharePoint, Version=5.1.0.0, Culture=neutral, PublicKeyToken=1f131a624888eeed" %>

<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">

 <Telerik:RadHtmlField FieldName="PublishingPageContent" runat="server" InputFieldLabel="Body" id="RichHtmlField"/>

</asp:Content>
<----------- PAGELAYOUT ----------->

When in displaymode it works fine, but when i go in edit mode I get the following exception:
 The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
And the stack trace:

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.Add(Control child) +11013946
   Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control) +1116
   Telerik.Web.UI.RadEditor.OnPreRender(EventArgs e) +16
   Telerik.SharePoint.MOSSRadEditor.OnPreRender(EventArgs e) +54
   System.Web.UI.Control.PreRenderRecursiveInternal() +108
...

The solution deployment and feature activation is done without errors. Any ideas on what can cause this behavior?

Stanimir
Telerik team
 answered on 18 Sep 2009
3 answers
129 views
Dear Telerik,

I tried to install the visual studio extentions for Q2, however I couldn't find the installation files. Could you please tell me where to find it?

Thanks a lot,

Robert.
Andrey
Telerik team
 answered on 18 Sep 2009
1 answer
97 views
HI,
    i  am using telerik:RadAjaxLoadingPanel in the cristal report  page ,there report is not working in side the telerik:RadAjaxLoadingPanel .please any one help me
thanks
Chandruk

my code is

<

 

telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Transparency="30"

 

 

BackColor="#E0E0E0">

 

 

<asp:Image Style="margin-top: 10px" ID="Image1" runat="server" AlternateText="Loading..."

 

 

BorderWidth="0px" ImageUrl="~/images/loading.gif"></asp:Image>

 

 

</telerik:RadAjaxLoadingPanel>

 

 

<p class="caption">

 

 

<span>Search / List Contracts</span>

 

 

</p>

 

 

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

 

<

 

div class="boxbg aleft">

 

 

 

 

 

<p class="minicaption">

 

 

 

 

Search Criteria

 

</p>

 

 

 

 

 

<p class="note">

 

 

 

 

Enter Search Criteria and click Search button to list units. To list all units,

do not enter any search criteria.

 

</p>

 

 

 

 

 

<fieldset>

 

 

 

 

<%

-- ContractHolderName--%>

 

 

<label class="formlabel">

 

 

 

 

 

<span class="reqfld"></span>Contract Holder Name</label>

 

 

 

 

 

<telerik:RadComboBox ID="raddropdownlistContractHolder" runat="server" Width="300px"

 

 

 

 

 

Height="200px" Skin="Web20" DataTextField="Name" DataValueField="ID" AppendDataBoundItems="true"

 

 

 

 

 

EnableEmbeddedSkins="false" MarkFirstMatch="true">

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

<br />

 

 

 

 

<%

-- Site Name--%>

 

 

<label class="formlabel">

 

 

 

 

 

<span class="reqfld"></span>Site Name</label>

 

 

 

 

 

<telerik:RadComboBox ID="raddropdownlistSiteName" runat="server" Width="300px" Height="200px"

 

 

 

 

 

Skin="Web20" DataTextField="Name" DataValueField="ID" AppendDataBoundItems="true"

 

 

 

 

 

EnableEmbeddedSkins="false" MarkFirstMatch="true">

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

<br />

 

 

 

 

<%

--Specialty--%>

 

 

<label for="dropdownlistSpecialties" class="formlabel left">

 

 

 

 

Specialty

</label>

 

 

 

 

 

<telerik:RadComboBox ID="raddropdownlistSpecialties" runat="server" Width="300px"

 

 

 

 

 

Height="200px" Skin="Web20" DataTextField="DisplayName" DataValueField="DisplayID"

 

 

 

 

 

AppendDataBoundItems="true" EnableEmbeddedSkins="false" MarkFirstMatch="true">

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

<br />

 

 

 

 

<%

--Skills--%>

 

 

<label for="dropdownlistSkills" class="formlabel left">

 

 

 

 

Skills

</label>

 

 

 

 

 

<telerik:RadComboBox ID="raddropdownlistSkills" runat="server" Width="300px" Height="200px"

 

 

 

 

 

Skin="Web20" DataTextField="DisplayName" DataValueField="DisplayID" AppendDataBoundItems="true"

 

 

 

 

 

EnableEmbeddedSkins="false" MarkFirstMatch="true">

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

<%

--Report Type--%>

 

 

<label for="dropdownlistSkills" class="formlabel left">

 

 

 

 

Create Report as

</label>

 

 

 

 

 

<asp:RadioButtonList ID="radioReport" runat="server" CssClass="formlabel1" RepeatDirection="Horizontal">

 

 

 

 

 

<asp:ListItem Text="Adobe PDF" Value="pdf" Selected></asp:ListItem>

 

 

 

 

 

<asp:ListItem Text="Microsoft Excel" Value="xls"></asp:ListItem>

 

 

 

 

 

</asp:RadioButtonList>

 

 

 

 

 

</fieldset>

 

 

 

 

 

</div>

 

 

 

 

 

<div class="btnpnl">

 

 

 

 

 

<asp:ImageButton ID="buttonReport" runat="server" CausesValidation="false" OnClick="buttonReport_Click"

 

 

 

 

 

AlternateText="Report" ImageUrl="~/Images/report_btn.gif" OnClientClick="Javascript:Auto() ;" />

 

 

 

 

 

</div>

 

 

</telerik:RadAjaxPanel>

 

 

protected void buttonReport_Click(object sender, EventArgs e)

 

{

 

try

 

 

 

 

{

 

// this.FillBusinessObjects();

 

 

 

 

 

//IList<ClinicalUnit> clinicalUnits = ReportController.RetrieveUnitReportForSearchData();

 

 

 

 

 

// radgridUnits.DataSource = clinicalUnits;

 

 

 

 

 

// radgridUnits.DataBind();

 

 

 

 

 

 

DataSet dataSetUnit = new DataSet();

 

 

DataTable dataTableUnit = ConstructDataTableUnit();

 

 

this.FillBusinessObjects();

 

 

IList<ClinicalUnit> clinicalUnits = ReportController.RetrieveUnitReportForSearchData();

 

 

//radgridUnits.DataSource = clinicalUnits;

 

 

 

 

 

//radgridUnits.DataBind();

 

 

 

 

 

if (clinicalUnits.Count > 0)

 

{

 

for (int i = 0; i < clinicalUnits.Count; i++)

 

{

 

DataRow dataRowUnit = dataTableUnit.NewRow();

 

dataRowUnit[

"UnitID"] = clinicalUnits[i].ID.ToString();

 

dataRowUnit[

"UnitName"] = clinicalUnits[i].Name.ToString();

 

dataRowUnit[

"SiteName"] = clinicalUnits[i].Site.Name.ToString();

 

dataRowUnit[

"Status"] = clinicalUnits[i].StatusText.ToString();

 

dataRowUnit[

"Specialty"] = clinicalUnits[i].Specialty.Name.ToString();

 

dataRowUnit[

"Skills"] = clinicalUnits[i].Skill.Name.ToString();

 

dataRowUnit[

"Population"] = clinicalUnits[i].Population.Name.ToString();

 

dataRowUnit[

"AcceptGrad"] = clinicalUnits[i].IsGraduationText.ToString();

 

dataRowUnit[

"AcceptUnderGraduation"] = clinicalUnits[i].IsUnderGraduationText.ToString();

 

dataRowUnit[

"ServiceLearning"] = clinicalUnits[i].IsServiceLearningText.ToString();

 

dataRowUnit[

"NoOfStudents"] = clinicalUnits[i].NoOfStudent.ToString();

 

dataRowUnit[

"UnitContactName"] = clinicalUnits[i].ContactFirstName.ToString();

 

dataRowUnit[

"UnitContactPhone"] = clinicalUnits[i].ContactPhone.ToString();

 

dataRowUnit[

"UnitContactEmail"] = clinicalUnits[i].ContactEMail.ToString();

 

dataTableUnit.Rows.Add(dataRowUnit);

}

dataSetUnit.Tables.Add(dataTableUnit);

ExportReport(dataSetUnit);

}

 

else

 

 

 

 

ClientScript.RegisterStartupScript(

this.GetType(), "onclick", "<script language='javascript'>alert('No Records Found');</script>");

 

 

}

 

catch (SofturaException softuraException)

 

{

 

// throw softuraException;

 

 

 

 

}

 

catch (Exception exception)

 

{

 

// throw exception;

 

 

 

 

}

}

 

private DataTable ConstructDataTableUnit()

 

{

 

DataTable dtUnit = new DataTable("dataTableUnit");

 

dtUnit.Columns.Add(

"UnitID");

 

dtUnit.Columns.Add(

"UnitName");

 

dtUnit.Columns.Add(

"SiteName");

 

dtUnit.Columns.Add(

"Status");

 

dtUnit.Columns.Add(

"Specialty");

 

dtUnit.Columns.Add(

"Skills");

 

dtUnit.Columns.Add(

"Population");

 

dtUnit.Columns.Add(

"AcceptGrad");

 

dtUnit.Columns.Add(

"AcceptUnderGraduation");

 

dtUnit.Columns.Add(

"ServiceLearning");

 

dtUnit.Columns.Add(

"NoOfStudents");

 

dtUnit.Columns.Add(

"UnitContactName");

 

dtUnit.Columns.Add(

"UnitContactPhone");

 

dtUnit.Columns.Add(

"UnitContactEmail");

 

 

return dtUnit;

 

}

 

private void ExportReport(DataSet dataSetUnit)

 

{

 

string sReportType = radioReport.SelectedValue;

 

 

UnitReportXSD objUnits = new UnitReportXSD();

 

objUnits.Merge(dataSetUnit);

 

ReportDocument rdUnits = new ReportDocument();

 

rdUnits.Load(Server.MapPath(

"UnitReport.rpt"));

 

 

ExportOptions expOpt = new ExportOptions();

 

 

DiskFileDestinationOptions dskOpt = new DiskFileDestinationOptions();

 

rdUnits.SetDataSource(objUnits);

 

string sBaseURL = Request.PhysicalApplicationPath.ToString() + ConfigurationSettings.AppSettings["UnitReportPath"].ToString();

 

 

//FileInfo fileInfo = new FileInfo(sBaseURL + "UnitReport.xls");

 

 

 

 

 

FileInfo fileInfo = new FileInfo(sBaseURL + "UnitReport." + sReportType);

 

fileInfo.IsReadOnly =

false;

 

 

//dskOpt.DiskFileName = sBaseURL + "UnitReport.xls";

 

 

 

 

dskOpt.DiskFileName = sBaseURL +

"UnitReport." + sReportType;

 

expOpt = rdUnits.ExportOptions;

expOpt.ExportDestinationOptions = dskOpt;

expOpt.ExportDestinationType =

ExportDestinationType.DiskFile;

 

 

if (sReportType.ToUpper().Equals("PDF"))

 

expOpt.ExportFormatType =

ExportFormatType.PortableDocFormat;

 

 

else

 

 

 

 

expOpt.ExportFormatType =

ExportFormatType.Excel;

 

rdUnits.Export();

DownloadReport(sReportType);

}

 

private void DownloadReport(string sReportType)

 

{

 

try

 

 

 

 

{

 

string sBaseURL = Request.PhysicalApplicationPath.ToString() + "Units\\UnitReport." + sReportType;

 

Response.ClearHeaders();

Response.AddHeader(

"content-disposition", "attachment; filename=UnitReport." + sReportType);

 

 

if (sReportType.ToUpper().Equals("PDF"))

 

Response.ContentType =

"application/force-download";

 

 

else

 

 

 

 

Response.ContentType =

"application/vnd.ms-excel";

 

Response.WriteFile(sBaseURL);

Response.End();

}

 

catch (Exception ex)

 

{

 

throw new Exception(ex.Message);

 

}

}

Sebastian
Telerik team
 answered on 18 Sep 2009
2 answers
546 views

 

Folks,

I have a nested GridTableView (DataSourceId: SqlDataSource2) in my RadGrid. In GridTableView I have a RadComboBox (SqlDatasourceId: SqlDataSource3). I would like to check for Duplicates if that Location is already exists for that person (i.e. Do not allow Duplicate entries for Update/Inserts). Below is my complete code as well as SqlDataSource2_Updating event (Is there any other event that can do the same also?).

Any Help will be appreciated. Thanks

GC_0620

_________________
<
telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True"

        AllowAutomaticInserts="True" AllowAutomaticUpdates="True"

        AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True"

        AutoGenerateColumns="False"  DataSourceID="SqlDataSource1" GridLines="None"

                Skin="Office2007" PageSize="8" EnableLinqExpressions="False"

                 OnInsertCommand="RadGrid1_InsertCommand"  OnUpdateCommand = "RadGrid1_UpdateCommand"

                >

 

<MasterTableView datakeynames="UserTablePrimaryKey" datasourceid="SqlDataSource1"  AllowFilteringByColumn = "true" CommandItemDisplay="TopAndBottom">

 

<DetailTables>

        <telerik:GridTableView runat="server" DataSourceID="SqlDataSource2" DataKeyNames="UserLocationsPrimaryKey"

                Width="100%" Skin="WebBlue"  CommandItemDisplay="Top" Name = "JobPerson"   AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true">

                <ParentTableRelation>

                <telerik:GridRelationFields DetailKeyField="UserTableForeignKey" MasterKeyField="UserTablePrimaryKey" />

                  

                 </ParentTableRelation>

                

            <RowIndicatorColumn>

                <HeaderStyle Width="20px" />

            </RowIndicatorColumn>

            <ExpandCollapseColumn>

                <HeaderStyle Width="20px" />

            </ExpandCollapseColumn>

            <CommandItemTemplate>

                   <div style="padding: 5px 5px;">

                        Custom command item template&nbsp;&nbsp;&nbsp;&nbsp;

                        <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# RadGrid1.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Edit.gif" /> Edit selected</asp:LinkButton>&nbsp;&nbsp;

                        <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Update.gif" /> Update</asp:LinkButton>&nbsp;&nbsp;

                        <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# RadGrid1.EditIndexes.Count > 0 || RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Cancel.gif" /> Cancel editing</asp:LinkButton>&nbsp;&nbsp;

                        <asp:LinkButton ID="LinkButton2" runat="server" CommandName="InitInsert" Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/AddRecord.gif" /> Add new</asp:LinkButton>&nbsp;&nbsp;

                        <asp:LinkButton ID="LinkButton3" runat="server" CommandName="PerformInsert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Insert.gif" /> Add this Location</asp:LinkButton>&nbsp;&nbsp;

<asp:LinkButton ID="LinkButton1" OnClientClick="javascript:return confirm('Delete all selected Person?')"

runat="server" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="Images/Delete.gif" /> Delete selected Location</asp:LinkButton>&nbsp;&nbsp;

                        <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="Images/Refresh.gif" /> Refresh list</asp:LinkButton>

                    </div>

                   </CommandItemTemplate>

 

            <Columns>

        <telerik:GridBoundColumn DataField="UserLocationsPrimaryKey"

            DataType="System.Int32" HeaderText="UserLocationsPrimaryKey" ReadOnly="True"

            SortExpression="UserLocationsPrimaryKey" UniqueName="UserLocationsPrimaryKey"

                    Visible="False">

        </telerik:GridBoundColumn>

       

                <telerik:GridTemplateColumn DataField="Location" DataType="System.Double"

                    HeaderText="Location" SortExpression="Location" UniqueName="Location">

                  

                    <ItemTemplate>

                        <asp:Label ID="LocationLabel" runat="server" Text='<%# Eval("Location") %>'></asp:Label>

                    </ItemTemplate>

                </telerik:GridTemplateColumn>

                       

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

            SortExpression="Program" UniqueName="Program" >

        </telerik:GridBoundColumn>

        <telerik:GridBoundColumn DataField="UserTableForeignKey"

            DataType="System.Int32" HeaderText="UserTableForeignKey"

            SortExpression="UserTableForeignKey" UniqueName="UserTableForeignKey"

                    Display="False" ReadOnly="True" Visible="False">

        </telerik:GridBoundColumn>

    </Columns>

   

   <EditFormSettings EditFormType="Template">

    <FormTemplate>

    <table id="Table1a" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"

                            style="border-collapse: collapse; background: white;">

                            <tr class="EditFormHeader">

                                <td colspan="2" style="font-size:small;  z-index:0;  font-family:Bookman Old Style; color:#669999">

                                  

                                  <b>User Location</b></td>

                            </tr>

                           <tr>

                         <td></td>

                           </tr> <tr>

                        

                                <td>

                                </td>

                                <tr>

                                    <td>

                                        Location</td>

                                    <td>

                                        <telerik:RadComboBox ID="RadComboBoxLocation" runat="server"

                                            DataSourceID="SqlDataSource3" DataTextField="Program" DataValueField="Location"

                                            DropDownWidth="369px" Height="150px" HighlightTemplatedItems="true"

                                            MarkFirstMatch="true"

                                           SelectedValue='<%#Bind("Location") %>' Skin="Office2007" Width="320px"

                                           

                                            >

                                            <HeaderTemplate>

                                                <table cellpadding="0" cellspacing="0" style="width: 345px">

                                                    <tr>

                                                        <td style="width: 245px;">

                                                            Program</td>

                                                        <td style="width: 55px;">

                                                            Location</td>

                                                    </tr>

                                                </table>

                                            </HeaderTemplate>

                                            <ItemTemplate>

                                                <table cellpadding="0" cellspacing="0" style="width: 345px">

                                                    <tr>

                                                        <td style="width: 245px;">

                                                            <%# DataBinder.Eval(Container.DataItem, "Program") %>

                                                        </td>

                                                        <td style="width: 55px;">

                                                            <%# DataBinder.Eval(Container.DataItem, "Location") %>

                                                        </td>

                                                       

                                                    </tr>

                                                </table>

                                            </ItemTemplate>

                                                                                    

                                        </telerik:RadComboBox>

                                        <asp:RequiredFieldValidator ID="RadComboBoxLocationRequiredFieldValidator"

                                            runat="server" ControlToValidate="RadComboBoxLocation"

                                            ErrorMessage="! Required">

                                </asp:RequiredFieldValidator>

                                    </td>

                                    <td>

                                        Program</td>

                                    <td>

                                        <asp:TextBox ID="TxtProgram" runat="server" TabIndex="2"  ReadOnly="true"

                                            Text='<%# Eval( "Program") %>' Width="250px">

                                                </asp:TextBox>

                                      

                                    </td>

                                  

                                   

                                                                        </tr>

                                <tr>

                                    <td>

                                    </td>

                                    <td>

                                    </td>

                                    <td>

                                    </td>

                                    <td align="right" colspan="2">

                                        <asp:Button ID="btnUpdate" runat="server"

                                            CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'

                                            Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

                                           />

                                        &nbsp;

                                        <asp:Button ID="btnCancel" runat="server" CausesValidation="False"

                                            CommandName="Cancel" Text="Cancel" />

                                    </td>

                                </tr>

                        

                           </tr>

                        </table>

   

    </FormTemplate>

    </EditFormSettings>

   

        </telerik:GridTableView>

       

    </DetailTables>       

  

<!-- Rest of Master Table Continues -->

 

<Columns>

 '

 '

    </Columns>

<EditFormSettings EditFormType="Template">

    <FormTemplate>

    '

    '

   

    </FormTemplate>

    </EditFormSettings>

</MasterTableView>

    <ClientSettings>

          '

          '

        </ClientSettings>

    </telerik:RadGrid>

 

 

 

<asp:Label ID="Msglabel" runat="server" Text="Label4"></asp:Label>

 

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

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

                 DeleteCommand="DELETE FROM [UserLocations] WHERE [UserLocationsPrimaryKey] = @UserLocationsPrimaryKey"

                 InsertCommand="INSERT INTO [UserLocations] ([Location], [Program], [UserTableForeignKey]) VALUES (@Location, @Program, @UserTableForeignKey)"

                 SelectCommand="SELECT [UserLocationsPrimaryKey], [Location], [Program], [UserTableForeignKey] FROM [UserLocations] WHERE ([UserTableForeignKey] = @UserTableForeignKey) ORDER BY [Program]"

                

                

                

                 UpdateCommand="UPDATE [UserLocations] SET [Location] = @Location, [Program] = @Program, [UserTableForeignKey] = @UserTableForeignKey WHERE [UserLocationsPrimaryKey] = @UserLocationsPrimaryKey" onupdating="SqlDataSource2_Updating"

               >

                 <SelectParameters>

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

 

                 </SelectParameters>

                 <DeleteParameters>

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

                 </DeleteParameters>

                 <UpdateParameters>

                     <asp:Parameter Name="Location" Type="Double" />

                     <asp:Parameter Name="Program" Type="String" />

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

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

                 </UpdateParameters>

                 <InsertParameters>

                     <asp:Parameter Name="Location" Type="Double" />

                     <asp:Parameter Name="Program" Type="String" />

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

                 </InsertParameters>

             </asp:SqlDataSource>

            

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

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

                 SelectCommand="SELECT * FROM [CCNS_All_Location_Codes] WHERE ([Location] IS NOT NULL) ORDER BY [Program]">

             </asp:SqlDataSource>

 

 

 


________________________________________________________ 

So Far I came up with this for Duplicate Checking but is not working. Any help will be appreciated..

 

 protected void SqlDataSource2_Updating(object sender, SqlDataSourceCommandEventArgs e)

    {

       RadComboBox combo = (RadComboBox)RadGrid1.MasterTableView.FindControl("RadComboBoxLocation");

       //RadComboBox combo1 = (RadComboBox)RadGrid1.MasterTableView.Items[0].FindControl("RadComboBoxLocation");

 

        

      

 

  //string strSelectedItem = combo1.SelectedItem.Text.ToString();

      

         SqlConnection conLocation = new SqlConnection(ConfigurationManager.

                 ConnectionStrings["HR_Payroll_AuthorizationConnectionString"].ToString());

       

            SqlCommand cmd = new SqlCommand("SELECT Count(*) FROM UserLocations  " +

                   "WHERE ([Location] = '" + combo.SelectedValue.ToString() + "'", conLocation);

               conLocation.Open();

             Object result = cmd.ExecuteScalar();

             if (result != null)

               {

                   Msglabel.Visible = true;

                   Msglabel.Text = "Duplicate Location for this Person - Can't proceed.."

                   e.Cancel = true;

               }

               conLocation.Close();

 

       

    }

Georgi Krustev
Telerik team
 answered on 18 Sep 2009
1 answer
126 views
Hi, I am trying to nest a vertical splitter into the bottom pane of a horizonlat splitter.. Just one split bar in each. Here is the code.

<

 

telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal"

 

 

Width="1000px" BorderSize="0" Skin="WebBlue">

 

 

<telerik:RadPane ID="RadPane1" Runat="server" Width="1000px" Height="37px"><asp:Table ID="Table2" runat="server" Width="995px" CellPadding="0" CellSpacing="0" Height="37px">

 

 

<asp:TableRow >

 

 

 

<asp:TableCell Font-Names="Freestyle Script" Font-Size="XX-Large" ForeColor="#3F3F3F" Width="3%"></asp:TableCell>

 

 

<asp:TableCell Font-Names="Freestyle Script" Font-Size="XX-Large" ForeColor="#666666" Width="72%">(Portal)</asp:TableCell>

 

 

<asp:TableCell Font-Names="Arial" Font-Overline="False" Font-Size="Small" ForeColor="#24E6D6" Font-Underline="True" Width="10%">Welcome:</asp:TableCell>

 

 

<asp:TableCell ForeColor="#2A7CC1" Font-Names="Arial" Font-Size="Small" Width="15%"></asp:TableCell>

 

 

 

</asp:TableRow>

 

 

</asp:Table>

 

 

</telerik:RadPane>

 

 

 

<telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" />

 

 

 

<telerik:RadPane ID="RadPane2" runat="server" Width="1000px" Height="493px">

 

 

 

 

<telerik:RadSplitter ID="RadSplitter2" runat="server" Height="100%"

 

 

Width="100%">

 

 

<telerik:RadPane ID="RadPane3" runat="server">

 

 

</telerik:RadPane>

 

 

<telerik:RadSplitBar ID="RadSplitBar2" runat="server" />

 

 

<telerik:RadPane ID="RadPane4" runat="server">

 

 

</telerik:RadPane>

 

 

</telerik:RadSplitter>

 

 

 

</telerik:RadPane>

 

 

 

</telerik:RadSplitter>

with this setup I get scrollbars on the right and botom of what I think is the bottom horizontal panel of the first splitter. I would like a clean join onto the side of the splitter border.

I hope this is a quick one, Thanks in advance for your time and help

mike

 

Tsvetie
Telerik team
 answered on 18 Sep 2009
1 answer
86 views
I have read through this help thread and all links within it:  http://www.telerik.com/community/forums/aspnet-ajax/scheduler/104775-telerik-is-undefined.aspx

I have a page where I am getting 'Telerik' is undefined, this only happens when the page isn't cached though, so I am deleteing my cache to replicate the problem in order to try and fix it.  We are using version 2008.3.1125.35 controls. This is happening in both my local dev environment and our web server so I am pretty sure it isn't OS related, however I am on XP 32bit running VS2008.

Once the page has cached I don't get any problem at all and everything worksperfectly.  If I clear the cache I get the error and the update panel I have on the page fails to update correctly. 
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
                        <contentTemplate> 
                            <asp:Button ID="btnAddToList" runat="server" Text="Add to list"  
                                Visible="False" /> 
                            <asp:Button ID="btnClearList" runat="server" Text="Clear List"  
                                Visible="False" /> 
                            <table width="100%"> 
                                <tr> 
                                    <td valign="top" width="25%"> 
                                        <asp:RadioButtonList ID="rbnPickDetails" runat="server" AutoPostBack="True"> 
                                        </asp:RadioButtonList> 
                                        <asp:Label ID="lblSelectFromRadio" runat="server" Text="Select the contact you wish to merge all other contacts with and then click on 'Merge Contacts' button to proceed. " visible="false"></asp:Label> 
                                    </td> 
                                    <td valign="top" width="75%"> 
                                        <asp:Label ID="lblContactDetails" runat="server"></asp:Label> 
                                        <br /> 
                                        <asp:Button ID="btnViewContactDetails" runat="server"  
                                            Text="View Contact Details" Visible="False" /> 
                                        <asp:Button ID="btnMergeContacts" runat="server" Text="Merge Contacts"  
                                            Visible="False" /> 
                                        <br /> 
                                        <asp:Label ID="lblWarning" runat="server" ForeColor="Red"  
                                            Text="You must select more than one contact to be able to merge."  
                                            Visible="False"></asp:Label> 
                                    </td> 
                                </tr> 
                            </table> 
                         </contentTemplate> 
                        <triggers> 
                        <asp:AsyncPostBackTrigger ControlID="rbnPickDetails" EventName="SelectedIndexChanged" /> 
                        </triggers> 
                    </asp:UpdatePanel> 

Protected Sub btnAddToList_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAddToList.Click 
        For Each row As GridDataItem In uwgDuplicates.MasterTableView.Items 
            If row.Selected Then 
                If rbnContactType.SelectedValue = "investigators" Then 
                    If IsNothing(rbnPickDetails.Items.FindByValue(row.Item("PersonnelID").Text)) Then 
                        rbnPickDetails.Items.Add(New ListItem(row.Item("ContactName").Text, row.Item("PersonnelID").Text)) 
                    End If 
                ElseIf rbnContactType.SelectedValue = "funders" Then 
                    If IsNothing(rbnPickDetails.Items.FindByValue(row.Item("ContactID").Text)) Then 
                        rbnPickDetails.Items.Add(New ListItem(row.Item("ContactName").Text, row.Item("ContactID").Text)) 
                    End If 
                End If 
            End If 
        Next 
        If rbnPickDetails.Items.Count > 1 Then 
            lblWarning.Visible = False 
        Else 
            lblWarning.Visible = True 
        End If 
        lblSelectFromRadio.Visible = True 
    End Sub 

I have trawled through my web config but everything seems to be in order:

<httpHandlers> 
        <remove verb="*" path="*.asmx"/> 
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>  
    <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" /> 
      </httpHandlers> 

We aren't using IIS7 but I do have the <Handlers> section also set up.

I am at a loss now, is there anything else that could cause this?

Steve
Veselin Vasilev
Telerik team
 answered on 18 Sep 2009
2 answers
108 views
My goal is to have a horizontal splitter (top & bottom panes) with vertical style slidingzone (tabs are vertical on the side). I want tabs for the top pane and tabs for the bottom pane.  The RadSlidingPanes are added dynamically.

My approach is to have a horizontal Splitter/Pane embedding a Vertical Splitter/Pane with embedded SlidingPanes.

The problem is that when I expand the SlidingPane and try to dock it, it is collapsing instead of docking.

<telerik:RadSplitter ID="rsRightNav" Runat="server" Orientation="Horizontal">  
    <telerik:RadPane ID="rpTop" runat="server" MinHeight="100" MinWidth="100">  
        <telerik:RadSplitter ID="RadSplitter1" Runat="server" Orientation="Vertical">  
            <telerik:RadPane ID="rpTop_Content" runat="server" Scrolling="None" Width="100%">  
                <telerik:RadSlidingZone ID="rszTop" Runat="server" > 
                    <telerik:RadSlidingPane ID="rsp1" runat="server" Title="Pane1" EnableDock="true">Content of Pane1</telerik:RadSlidingPane> 
                    <telerik:RadSlidingPane ID="rsp2" runat="server" Title="Pane2" EnableDock="true">Content of Pane2</telerik:RadSlidingPane> 
                    <!-- Dynamically added RadSlidingPanes --> 
                </telerik:RadSlidingZone> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="rpTop_Content_rsb1" runat="server" /> 
        </telerik:RadSplitter> 
    </telerik:RadPane> 
    <telerik:RadSplitBar ID="rsb1" runat="server" CollapseMode="Both" /> 
    <telerik:RadPane ID="rpBot" runat="server" MinHeight="100" MinWidth="100">  
        <telerik:RadSlidingZone ID="rszBot" Runat="server">  
        </telerik:RadSlidingZone> 
    </telerik:RadPane> 
</telerik:RadSplitter> 
 

As you can probably see I have not nested the bottom panel yet and I went ahead and put static SlidingPanes in and still can't dock.
Tsvetie
Telerik team
 answered on 18 Sep 2009
6 answers
155 views
Hi
     I need to set the vertical alignment of the hirarchy grid image that shows when we make hierarchy grid, i have big data in its corresponding columns so the image is displayed vertical align middle but i want to show it at top, please help me how can i do this?

Thanks

Regards
Muzaffar Ali
Muzaffar
Top achievements
Rank 1
 answered on 18 Sep 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?