Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
108 views
hello guy..

               i've been searching through out the net but i wasnt able to find references and samples that could help me out to solve my problem..i would like to ask help from you all expert and admin about this right click event on the treeview control..coz i have a requirements on my project that..if the user right click on the node the certain items on the context menu will be disable..how can i do that on server side coz i'm not much quite used on javascript..anyway my data on the radtreevew is bind to database..appreciate for your samples and reply..

thanks
Jols
Top achievements
Rank 2
 asked on 01 Jul 2013
12 answers
840 views

I have several JS files that were linked on my site and I wanted to combine them into just one call, so, I added this to the RadScriptManager

<CompositeScript>
    <Scripts>
        <asp:ScriptReference Path="~/js/jquery.min.js" ScriptMode="Auto" />
        <asp:ScriptReference Path="~/js/webctrl.js" ScriptMode="Auto" />
        <asp:ScriptReference Path="~/js/default.js" ScriptMode="Auto" />
        <asp:ScriptReference Assembly="System.Web" Name="WebForms.js" ScriptMode="Auto" /> 
    </Scripts>
</CompositeScript>

Now, whenever I view the site, the above scripts are combines, however, the original Telerik resource file that was being loaded is now at least 2 files and sometimes 3 or more.

I have noticed that the order in which they are loading has changed. Originally, the static resources would be served first, then a single combined telerik resource file. Now, a telerik resource file is served first that contains only basic MS ajax code, then the combined static resources, then one or more telerik resource files.

I'd like to include everything into one resource file if possible, but I'm not sure that is even able to be done.
Keith
Top achievements
Rank 2
 answered on 30 Jun 2013
3 answers
101 views

Hi,

I dont know where to start on this so thought of posting it. Basically, I have to address all the following tasks.

We have a large number of pictures which we send out to our customers on a regular basis. They get over sized and dont upload properly.

I plan to make an application which re sizes and emails pictures.

1) Select pictures with similar names ( first 5 digits) from some selected folder. May be on a button click.

2) Re-size them to 200KB-400KB.

3) Upload and Email them (Using Exchange). Email address is entered by user. Usually there would be around 20 pictures attached per email.

4) Save those re-sized pictures to some drive.

5) Delete the non-re-sized pictures which were selected.

Could you please guide me little bit on what controls can I use?

Thanks
SANJAY
Top achievements
Rank 1
 answered on 30 Jun 2013
2 answers
92 views
Hi !

I have a RadGrid and I am exporting it to CSV file, working fine.

Now, What if I want to add some external data to the Top of that CSV file?

For example I am exporting grid in CSV file with headers

Id, Name
1, Aaa
2, Bbb
3, Ccc

Now on the Top of Id and Name I want to add row like,
Name : [AnyName]
Date : [Today's date]

is it possible? I have added them to caption but not working..

Thanks.

James
Top achievements
Rank 1
 answered on 29 Jun 2013
2 answers
301 views
I cannot find a complete example. Found tons on grid and combobox, but not textbox. This test is to lookup a “PhoneTypeName” from a UserPhoneType table with TypeCode = “0” and assign that first value to a asp.net textbox.

Currently, I am getting “Object reference not set to an instance of an object” when setting the text box to "phonetype.FirstOrDefault.PhoneTypeName.ToString"

Using dbContext As New EntitiesModel()
    Dim phonetype As IEnumerable(Of User_PhoneType) = dbContext.User_PhoneTypes.Where(Function(c) c.PhoneTypeCode = "O")
    mytextbox.Text = phonetype.FirstOrDefault.PhoneTypeName.ToString
End Using

Also, would binding work any differently in this case if this were a radtextbox?

Thanks.
Ted
Top achievements
Rank 1
 answered on 28 Jun 2013
1 answer
74 views
I have a RadGrid inside a Panel, inside a User Control. In the RadGrid is a RadComboBox in a GridTemplateColumn. When the user selects a value from the RadComboBox it fires a postback to automatically populate the next column. The problem here is that although it fires an Ajax Request, the loading panel doesn't display. The page appears ready to use the entire time. I've tryed configuring the AjaxSettings every way I can think of. I've set the combo box as the ajax control with the grid as the updated control, the grid and the panel, the panel and the panel, every possible combination; but the loading panel will not show up. Here's the current Ajax Settings:

<telerik:AjaxSetting AjaxControlID="radGridGovernanceWithin">
      <UpdatedControls>
         <telerik:AjaxUpdatedControl ControlID="radGridGovernanceWithin"   LoadingPanelID="RadAjaxLoadingPanel1" />
      </UpdatedControls>
   </telerik:AjaxSetting>
Shane
Top achievements
Rank 1
 answered on 28 Jun 2013
1 answer
70 views
Hello!

When I enter edit mode in a Telerik radgrid I end up with all the textboxes beeing in different width.

I thought of solving this, by looping through all the items that is beeing edited and set them to System.Web.UI.WebControls.Unit.Pixel(300); to change the size. But I am doing something wrong here, I can't get it to work? And I want to refrain from using the getColumnEditor.

I thought of using it like this: But I cannot get it to work. Any idea?

protected void radgrid1_ItemCreated(object sender, GridItemEventArgs e)
       {
           if (e.Item is GridEditableItem && e.Item.IsInEditMode)
           {
               //the item is in edit mode   
               GridEditableItem editedItem = e.Item as GridEditableItem;
               editedItem.Width = Unit.Pixel(300);
               editedItem.Height = Unit.Pixel(300);
                
           }
       }

Any idea what to do to make them into the same size? 

On a side note, a total different question, Is it possible to set .Enabled status (ReadOnly) programatically without knowing what type the column is?

At the moment I am just stuck with having to iterate through and check whether the column textbox is a GridTextBoxColumnEditor  / GridNumericColumnEditor and so forth. It's annoying way to solve it.

Eg.   
if (columnEditor is GridTextBoxColumnEditor)
{
    GridTextBoxColumnEditor item = columnEditor as GridTextBoxColumnEditor;
    item.TextBoxControl.Enabled = false;
    // To hide completely item.TextBoxControl.ReadOnly = statusReadable ? false : true;

else if (columnEditor is GridNumericColumnEditor)
{
GridNumericColumnEditor item = columnEditor as GridNumericColumnEditor;
item.NumericTextBox.Enabled = false;

}          

See? I even have to specify NumericTextBox so I can't make generic solution to this? Anyone knows?


Sorry for having two questions in one thread, hope it is OK.

Best Regards 
Nicklas        



Viktor Tachev
Telerik team
 answered on 28 Jun 2013
1 answer
48 views
While saving content from silverlight editor control, it generate the following html
<p style="margin: 0px 0px 12px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px;">
<span style="font-family: 'Segoe UI';font-style: Normal;font-weight: normal;"> </span>
<span style="font-family: 'Verdana';font-style: Italic;font-weight: bold;background-color: #FFFF00;text-decoration: underline line-through;">
Hi this is Bold <br />Test</span>
<span style="font-family: 'Segoe UI';font-style: Normal;font-weight: normal;" />
</p>

Resulting the attached image.

when i try to edit the content added via silverlight control above in asp.net rad editor, i am not able to Unbold the content which is bold in above screen shot. there seems to be compatiblity issue between two. ASP.Net generate the following markup when we bold the content
<strong><em><span style="text-decoration: line-through;">this is Online Test</span></em></strong>


This is happening with other formatting like Italic, Underline, strike.
Attached Memo.png is the screen-shot of RadEditor displaying the disabled buttons i.e issue.




Slav
Telerik team
 answered on 28 Jun 2013
2 answers
75 views
Hi All,
I have a grid with drag to-group enabled. One of the columns is a template field. The data coming from the DB is a binary mask which I'm "translating" in code-behind to "human-readable" format.
Everything works, but when the grid is grouped by the template field, the group header (obviously) displays the raw data (the binary mask). Is there a way to modify the header display? There's an 'OnGroupsChanging' event, but I can't find the correct property to modify.

Thx in advance.
Rgds - M.

Template Field:
<telerik:GridTemplateColumn SortExpression="MATCH" HeaderText="Match"
                                HeaderButtonType="TextButton"
                                UniqueName="Match" DataField="MATCH"
                                GroupByExpression="MATCH Group By MATCH">
    <ItemTemplate>
        <asp:Label ID="lblMatchColumn" runat="server" Text='<%# GetMatchCodes(Eval("MATCH").ToString()) %>' />
    </ItemTemplate>
</telerik:GridTemplateColumn>

Pavlina
Telerik team
 answered on 28 Jun 2013
1 answer
83 views
Hi,
I am using multi select combobox by enabling CheckBoxes="true".
My requirement is 
I should able to select items by mark first match. it allows only when no items in the text box. if I had items mark first match does not works. as showed in attached notes
 
  
Dhamodharan
Top achievements
Rank 1
 answered on 28 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?