Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
128 views
Hello,

I have a radgrid for which scrolling occurs when the item count is beyond 15.

The grid has been availed with the feature to drag and drop  the items with in the grid.

Now when the scrolling occurs, I feel uneasy to drop the rows at the position where it needs scrolling.

Can auto-scrolling be achieved while drag and drop of rows in the radgrid?

If so, please help me for doing the same.


Thanks in advance!

Prasad.
Shinu
Top achievements
Rank 2
 answered on 20 Jan 2012
3 answers
231 views
How do I add hours to the current time on the RadTimePicker control?

Currently my 'End' RadTimePicker automatically defaults to the 'Start' time RadTimePicker when the user selects the Start time. My desired output is for the End RadTimePicker to automatically default the the Start time RadTimePicker, plus one hour, when the user selects the Start time.

Thanks for any help :)
Vasil
Telerik team
 answered on 20 Jan 2012
2 answers
86 views
Hi,

Currently am working on the GridAttachment Column ,I placed the Rad Grid inside the Update Panel, On the Item Command event am d,i have written the download attachment code.But after clicking on Attachment item link in the Rad Grid amd getting Javascript Parser exception.

Please cgo thtough the below code,suggest me if am doing wrong

Aspx

 

 

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

 

 

 

</asp:ScriptManager>

 

 


<

 

 

asp:UpdatePanel ID="upd" runat="server">

 

 

 

 

<ContentTemplate>

 


<

 

 

telerik:RadGrid ID="RadGrid2" AllowPaging="True"

 

 

 

ShowFooter="true" runat="server" AutoGenerateColumns="False" AllowSorting="True"

 

 

 

PageSize="3" GridLines="None" OnItemCommand="RadGrid2_ItemCommand" CellPadding="0" AllowAutomaticInserts="true"

 

 

 

AllowAutomaticUpdates="true">

 

 

 

<ClientSettings AllowRowsDragDrop="true"></ClientSettings>

 

 

 

<MasterTableView DataKeyNames="Id" AutoGenerateColumns="false" CommandItemDisplay="Top">

 

 

 

 

<Columns>

 

 

 

 

<telerik:GridAttachmentColumn DataSourceID="Id"

 

 

 

MaxFileSize="1048576"

 

 

 

EditFormHeaderTextFormat="Upload File:"

 

 

 

HeaderText="Download"

 

 

 

AttachmentDataField="BinaryData"

 

 

 

AttachmentKeyFields="Id"

 

 

 

FileNameTextField="AttachmentFile"

 

 

 

DataTextField="AttachmentFile"

 

 

 

UniqueName="AttachmentFile">

 

 

 

</telerik:GridAttachmentColumn >

 

 

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

 

</telerik:RadGrid>

 

 

 

</ContentTemplate>

 

 

 

</asp:UpdatePanel>

 


CS

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

if (!IsPostBack)

 

{

 

RadGrid2.DataSource =

 

TestData.GetEmployeeData();

 

RadGrid2.DataBind();

}

}


 

 

protected void RadGrid2_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

 

//upd.Update();

 

 

 

if (e.CommandName == "DownloadAttachment")

 

{

 

 

LinkButton btn = e.CommandSource as LinkButton;

 

 

 

 

 

string fileName1 = "images\\about.png";

 

 

 

/*

 

For testing purpose we took only a test image

* you can look at the e.CommandSource to know which row was clicked by

* checking the linkbutton.Text property(LinkButton btn = e.CommandSource as LinkButton;)

*/

 

 

FileInfo file = new FileInfo(Server.MapPath(fileName1));

 

 

 

NameValueCollection imageExtensions = new NameValueCollection();

 

imageExtensions.Add(

 

".jpg", "image/jpeg");

 

imageExtensions.Add(

 

".gif", "image/gif");

 

imageExtensions.Add(

 

".png", "image/png");

 

 

 

MemoryStream ms = new MemoryStream();

 

 

 

 

if (imageExtensions.AllKeys.Contains(file.Extension))

 

{

Response.Clear();

Response.ContentType = imageExtensions.Get(file.Extension);

Response.AppendHeader(

 

"Content-Disposition", "attachment; filename=" + file.Name);

 

Response.TransmitFile(file.FullName);

Response.End();

}

}

}

Sreekanth
Top achievements
Rank 1
 answered on 20 Jan 2012
5 answers
451 views
I have a radtreeview inside radpageview to give outlook style. The problem is, when there are lots of items inside the radtreeview, the user looses focus navigating down, as there are not scrollbars visible for the treeview. The only scrollbars visible is for the radpageview so it is not able to understand which node item to set focus to.

Code for RadTreeView is :

This radTreeView is placed inside

<telerik:RadSplitter runat="server" Height="100%" Width="100%" Orientation="Horizontal">
        <telerik:RadPane runat="server" Scrolling="X" Width="100%" >
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" BackColor="White">
                <telerik:RadPageView ID="RadPageView1" runat="server" Style="border-style: none;">
                    <telerik:RadTreeView Width="100%"
    PersistLoadOnDemandNodes="false" ClientIDMode="Static" EnableViewState="false"
    ID="archiveTree" runat="server" OnClientNodeClicked="NodeClick" AccessKey="T"
    TabIndex="1" EnableEmbeddedSkins="false" Skin="Default">
    <WebServiceSettings Path="~/Test.svc" Method="GetNodesData" />
</telerik:RadTreeView> 
                </telerik:RadPageView>
            </telerik:RadMultiPage>
        </telerik:RadPane>
        <telerik:RadSplitBar runat="server" CollapseMode="Backward" EnableResize="false" ID="navigationPaneSplitBar">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="RadPane1" runat="server" Height="125px" Scrolling="None">
            <telerik:RadPanelBar OnClientItemClicking="OnClientItemClicking"
                ID="NavigationItems" runat="server" ExpandMode="FullExpandedItem" Visible="true"
                AccessKey="N" Height="100%" Width="100%" EnableEmbeddedSkins="false" Skin="Default" TabIndex="2">
            </telerik:RadPanelBar>
        </telerik:RadPane>
    </telerik:RadSplitter>

Is there any way to allow navigaiting of items inside radtreeview without loosing focus of that item ?
mirang
Top achievements
Rank 1
 answered on 20 Jan 2012
2 answers
127 views
hi i have WebBlue RadGrid Control, everything is ok but whem viewing it in mozilla firefox there is a little space at the rgHeader at left, i've tried to style it in CSS using this snippet:

.RadGrid_WebBlue .rgHeader:first-child
{
    border-left-width: 1px;
}

but my style wasn't set and overrided by this CSS Style:
border-left-width: 0;

can any one help me please ?
Rasheed
Top achievements
Rank 1
 answered on 20 Jan 2012
3 answers
118 views
In our project scenario, we have two tabs in a tab strip. A rad popup window is to be displayed when user navigates from one tab to another through tab click. But a javascript error stating radwindow is undefined is displayed. 

We have mentioned the RadTab as "runat="server"". Also mentioned the tab id in the ajax update panel.

Please let us know if we need to add any other configuration to rad tab for using the rad window.
Princy
Top achievements
Rank 2
 answered on 20 Jan 2012
1 answer
244 views
I am unable to manage the padding (space inside the control) for Rad Grid and Rad Combobox. Please refer the attached image displaying space (marked red) inside row of Rad Grid control.

Any suggestions?

Princy
Top achievements
Rank 2
 answered on 20 Jan 2012
1 answer
146 views
i am using vs2010.
i need to add rad combo box dynamically using java script.
i already add some html controls dynamically in java script.
my code is below.
if (!objPropertyInsp.hasOwnProperty("sctid"))
           {
               contentHTML += "<tr><td>sctid</td><td><input type='text' style='width:100%;' id='txtsctid'" + "' value ='' /><td><div id='dvcombo'></div><img src='Images/find.png' alt='Pick' width='16px' height='16px' onclick='openSearchAttributes(); ' /> </td></td></tr>";
           }
           else if (objPropertyInsp.hasOwnProperty("sctid"))
           {           
                   contentHTML += "<tr><td>sctid</td><td><input type='text' style='width:100%;' id='txtsctid' value ='" + objPropertyInsp["sctid"] + "' /><td><img src='Images/find.png' alt='Pick' width='16px' height='16px' onclick='openSearchAttributes();' /></td></td></tr>";                                                     
           }
i added two td in table. i need to add rad combo next to text box.

how to add radcombo box and how to bind the values to radcombo.

thanks,
uma
Shinu
Top achievements
Rank 2
 answered on 20 Jan 2012
0 answers
109 views
Hi,


I have created one webapplication to insert items in sharepoint site i added sharepoint dll also but wen i debug it showing error that is

Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Stack Trace is

[BadImageFormatException: Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
   System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
   System.Reflection.Assembly.Load(String assemblyString) +28
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
   System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232
   System.Web.Compilation.BuildManager.CompileGlobalAsax() +51
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8913739
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259

After i deleted that dll from bin folder and i debug its working but wen i try to insert an item it throwing error

The Web application at http://cisb-orion:8437 could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application

i given platform is x64 and framework is 3.5

please tell me wat is the problem

Abu
Top achievements
Rank 1
 asked on 20 Jan 2012
3 answers
170 views
Hi all,
I use radcombobox with treeview like this,
<telerik:RadComboBox ID="cmb_category" Skin="Black" EmptyMessage="xxx"
                                AllowCustomText="true" runat="server" Height="100%" Width="90%" ShowToggleImage="True"
                                OnClientDropDownOpened="OnClientDropDownOpenedHandler" ExpandAnimation-Type="None"
                                CollapseAnimation-Type="None">

                                <ItemTemplate>
                                    <telerik:RadTreeView Skin="Black" ID="treecategory" runat="server" Width="100%" Height="100%"
                                        DataFieldID="id" DataFieldParentID="fk_up_category_id" OnClientNodeClicking="nodeClicking"
                                        DataValueField="id" DataTextField="name" DataSourceID="SqlDataSourceCategory">
                                    </telerik:RadTreeView>
                                </ItemTemplate>

                                <Items>
                                    <telerik:RadComboBoxItem Text="" />
                                </Items>
</telerik:RadComboBox>

But now i need it in radgrid , but i cant add itemtemplate,

<telerik:GridDropDownColumn DataField="fk_up_category_id" HeaderText="Üst Kategori"
                        DataSourceID="SqlDataSourceCategory" ListTextField="name" ListValueField="id"
                        ColumnEditorID="ce_fk_up_category_id" UniqueName="fk_up_category_id" Visible="True">
</telerik:GridDropDownColumn>

My category table ;
-id
-fk_up_category_id
-name
-short_text
-long_text
-picture

Sorry for my english :( ... i hope you understnd me ..
Shinu
Top achievements
Rank 2
 answered on 20 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?