Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
96 views
Hi everybody,

I am desperate now... I MUST understand something...

I have a grid with some data Bind to a DataTable. Here is my ItemDataBound Event (column4 is the GridBoundColumn's UniqueName):

Protected Sub gridAllergies_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gridAllergies.ItemDataBound
        If (TypeOf e.Item Is GridEditableItem AndAlso CType(e.Item, GridEditableItem).IsInEditMode) Then
            Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
            Dim allergie As clsAllergie = CType(CType(e.Item.DataItem, DataRowView).Row, clsAllergie)
            Dim editor As GridDropDownListColumnEditor = CType(editedItem.EditManager.GetColumnEditor("column7"), GridDropDownListColumnEditor)
            editor.DataSource = ExecuteSql("Select '' as gral_numero ,'' as gral_description union all Select gral_numero, gral_description " & _
                                              " from phfgrall where pram_sequence = " + GetStr(GSite_phfgrall) + " order by gral_description").Tables(0).DefaultView
            editor.DataBind()
            Dim txtbx As TextBox = CType(editedItem("column4").Controls(0), TextBox)
            If Not allergie.NoGroupe = "" Then
                editor.SelectedValue = allergie.NomGroupe
            End If
 
            Dim update As LinkButton = CType(editedItem.FindControl("UpdateButton"), LinkButton)
            If (update IsNot Nothing) Then
                update.Attributes.Add("onclick", "return Validate('" + txtbx.ClientID + "')")
            End If
        End If
    End Sub

Where I want you to look is the last part "update.Attributes.Add("onclick""return Validate('" + txtbx.ClientID + "')")"

Now let's see my JS function:

function Validate(txt)
 {
         var txtbx = document.getElementById(txt)
          alert(txtbx.value);
          return true
 }

So you can see that the only things this is doing is showing the value of the textbox after clicking on Update. This work fine! Example: If the current value is "toto" and I change it to "tata" and press Update, it will show "tata".

After that, it fire the update event and enter in the UpdateCommand event. So here is my code:

Protected Sub gridAllergies_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles gridAllergies.UpdateCommand
    Dim editItem As GridEditableItem = TryCast(e.Item, GridEditableItem)
    Dim txtbx As TextBox = CType(editItem("column4").Controls(0), TextBox)
    Debug.WriteLine(txtbx.Text)
End Sub

The thing I CAN'T understand is why txtbx.Text is equal to "toto" instead of "tata" ?

I'm on that since 2 days ago and now I don't know what to do to get the new value...

I hope someone will be able to tell me why this is happening.
Jocelyn
Top achievements
Rank 1
 answered on 07 Feb 2012
7 answers
112 views
When I load a RadEditor on a page and set the toolbar to ribbon mode, the page is reloaded after all other resources load.

I have a simple website that demonstrates it.  I created a default Website project in VS2010 (.net 4) and put a simple page with only the editor on it. 

This is the page:
<%@ Page Language="C#" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<script runat="server">
 
</script>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
      </telerik:RadScriptManager>
     
      <telerik:RadEditor ID="RadEditor1" Runat="server" ToolbarMode="RibbonBar">
      </telerik:RadEditor>
     
    </div>
    </form>
</body>
</html>


This is the log from fiddler (i've bolded the requests to the page):

GET http://localhost:54342/WebSite1/WebResource.axd?d=OD1l_xmfOmVY9FyF0plxjBWzTB-uOBDk-H6lFyMIhw6_zj-Ab4FJlo-8QzX1aCjCjDDPZQTgi83U50y5Olp9jTWE9e6piGxw_pu_-0A8iu-8FEUGAuQHkkNBFZnXvuNcQCUw4XdprFo1pzMtDN1mntZi1srlAa-lbVoKMNIBLUnlilZgCDXAGEJdB5j7HQXj0&t=634459980520000000
200 OK (image/gif)
 
GET http://localhost:54342/WebSite1/Default2.aspx
200 OK (text/html)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=EBOMX2yC5wHqhLKZz2MS392EHe5F5mmAnkF2wQC68w9Ihg-fDMwhv2fGbrU4IZHRce1zQWexdNvKCukOWYrN-TYaw2r13FvhbeYpIlHmA5CyhvQnkfmzffUb1pfBS--DeVycfPu2C6A4u7HbBfvtHw2&t=634459980520000000
200 OK (text/css)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=KeQPgqRBe01nM-n7Fn9JisRJwmcxervG5UvyfYah_fnqS413cwx8JusKE-6Z2QgnYNo9VAzqiUnN6tNf9rXe0BQkINdxoQZk4zZ4A6qdb0Y6PyPBO0O5cpoHjziHc-xnhG8ZR6w7y0-u20DifbQMaJug9K1nX4ohz3I8QmqoVLA1&t=634459980520000000
200 OK (text/css)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=vuZz5XZkbSPpQ8MNEgeIG2HMVsHYKOD_tSnU7u7MuvG9mdpD3-hk5q9IHraikPNosU-lDA1Oj-xGaSzE5--nFxYIUX0U1Y1TLZwXu9szZR2ohGjLzj_3Ujx28wGHhYNQz93ltXQdLtSftR2nxQVa2g2&t=634459980520000000
200 OK (text/css)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=7t2kSD67M4WdR_N-bC5aP33pVkTuaMOyIUwGo9t6hPRkzVrcEk9BgqDX49CYvaITz-EHR4XKbhwwAr6Dr7CKQtU6TH38oh2RjjWV07J6b2U9fyVIg_u7mYITFooiuz_nIy_xZOXk2hKxz3sUOV9tQ7agauNUXXonsetaPJnPHT41&t=634459980520000000
200 OK (text/css)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=QBvNsPRBB-BMk7UAXbB1TnSqva689HfQlNxZaF2LRHtz41DlCpWwMkVUD4FJ5IZLC30UGTgU0B6QQCaCW8XZHkG4FKuwXm2WnFuBnXxiJJMDQl9lb847k6K0lk66cDw9CF0FwhvLYTXiIIH5uySsT0pi7trYF0ndOwWhQG7LLUo1&t=634459980520000000
200 OK (text/css)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=4yk8LGWSJssAweeFTif-v1cJQ4WRxdrREzc98wNNX08P9h2qATxxYzIw6RJ_HQPhWlCL--fyPhQeutmeKWFB74kXCZ6ZLD4qmac8nVbMb817JzyxksF7f7xRh0vB4C9rk1gxS2gx7uxKCP6YfIM7Hg2&t=634459980520000000
200 OK (text/css)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=NrRSW8-jwz2aTCVUnnvGP22M5lMxWGkMpfLwWfV3VRRFEDk2COQKGu_AAgZ3UmwAwHG5xjE_x6wDoirkFF4cUnf-ijEa60PL6rY73LHXAoAGvmk6XYlES1r-icNQ3NhxdBXouDrXn-0SHomLOXAQlXfXRlHhXhEy2PXeCR8f_Aw1&t=634459980520000000
200 OK (text/css)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=yc4GP9Lr_reQjs3anI2DhY5JKTMUVyLrhYY4w16uj493zPkuQseh8ra040f-jXz4xNZxzZVYDcRwn1OW5t7urS2ciPBkQyC_-qqZz_XdjYI1&t=634516631326038000
200 OK (application/x-javascript)
 
GET http://localhost:54342/WebSite1/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ae71d0a15-7471-4384-9905-78bdf2047cba%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.2.712.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3adb70bfda-5025-40e2-ae2f-653debb88509%3a16e4e7cd%3af7645509%3a24ee1bba%3a874f8ea2%3adc7e0bd%3a63b115ed%3a1569bb5f%3a1c565fc%3a8547b8b2%3a30f1f089%3af46195d3%3a19620875%3a490a9d4e%3aa675b4ab
200 OK (application/x-javascript)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=UHqSlPkSE8D7ktN0m5TuJLFZjJIMBZBire2iONj6fwuf8e33Zm484irbsQgPNtJH4P-WfcwvJQTkabOWFabJNNTbMh5s-KeUBP9sumy7rFazuLHTL93PEPvxaapoOo0mWz3K6SdpWZBfUJEdg2RJgZBp9vY03y3I3eFXY1UPdzUG6jVkJYAEztjhrTN8w-vW0&t=634459980520000000
200 OK (image/png)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=-LJtVS9M2Qqhhtc8DrglJp3SkA7ghV5l4iNaigp0rS0ybSACQKoJLecSzZOeLZ1jZvZmpIrfnZxuzIVVbvBSXU-GHcnLuUbE2Ww8NSkqTCp1jvz5r8Gy8Wur49ezEPTkmVpyVYjrwArp7d06kFcBWPo4opt-3tP4hM4SWnPvBYc1&t=634459980520000000
200 OK (image/png)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=UI8bnCm8XYpaKJUQcfIBn4i7ZNengZ4D86MirI9b_7Dte55go8a3HrjPv1SJ58_rlkcZrim3tI8D31JkvAx5ZB3LNTYvPDS23R2HBAQiMkgRo-bWBUzvTtZT2mjB-23tKHF7wGaeKrnONNTnHlYJCpGOSCnn2K3m7ltxHWTegiU1&t=634459980520000000
200 OK (image/png)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=H0kZ-9ODGkHOwdeuyUo5YOoH-6I9XYn24zfJnP7NnS9asazZ-EGqxWwC6lQ5uakzNgzQdOWjzgxmClZN2iJI8ZF5SXnV8qhApMdzv0YleW5W8trGT3uOXUbzzevf3awVu-vsl9portO_Q7bwAbuG7wqohbuSlI93TS24SOqggnk1&t=634459980520000000
200 OK (image/png)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=DAW4dWJ17yTVWP3uH5LqB5csbFMN8urSN9HmN23csEf7w9t_h7R7o56Crhdih3o2LXrb7vPo2WC3g0qx3QhWcsTkrvDPqcVl9BVuY-dZgjO7dK5cWvqvlQ0ko5sgU9aNXdYR7Ak7dOQvyj_749vqtgadlajbLHljAtn8AVtxtfaUHpI6YjSNzH22QWdrAyPo0&t=634459980520000000
200 OK (image/png)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=cFk1UuU3-B7HHWb91HrbEt9kL-orAsryNCotk6OvOTMmp5dTAmdmLEcavvX89ImOT8HhWxCAnQyIoR0nEiaAxe1C5_9Y18Lxl641qj7A4XOcarigMa1pB1u1twPjK4hzgZ57RfQBStmXzmyRO_umu-jDa8XuNQYFhVbDJobGWGw1&t=634459980520000000
200 OK (image/gif)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=i5GlqYIJASeLJjuZbnxYqfYxH81gR44zzOSMT9FPjS-CEzYmFjrRCiTLq6M9Fr174x5Hgwu9Hm8fdXd5V0ZwS4i_NQdylxqTFaCw4bp0Sq3Qvm4axhPPSdyhXJtDWThOaK80nHarE_UMmu_MB17Gi-iMIo-s1MECZN0hmJ4KklU1&t=634459980520000000
200 OK (text/css)
 
GET http://localhost:54342/WebSite1/WebResource.axd?d=YR3dsbQ7CFnxcVMNfFn2junvXa4PE5WrvQL4cBpm0gdxtieOhzrmgGR65Z3HapgYeYKw3E8Yupwp1Xca9WDv21X8HlMRqBmeqdnLVJJVOADSiDLuRcCFklaQYCQec_HiPDlHeW7c6vR5HFh6WtEQcohbeXxDqy_vHHHNimHkNNc1&t=634459980520000000
200 OK (image/gif)
 
GET http://localhost:54342/WebSite1/Default2.aspx
200 OK (text/html)

I've verified that no other request to that page is being made.  If I take the ribbon out, it works fine.

Thanks for your help.
Rumen
Telerik team
 answered on 07 Feb 2012
3 answers
138 views
Hello,

Is there a way to get Listview with RadBinaryImage and Jquery-Lightbox, where the ImageURL is not given just (RBI) DataValue?

I found examples,  howto use lightbox with simple asp-image, but is there a way too, to make it with Images from DB- RadBinary images?

Thanks for your help.

Zoltán 
Vasil
Telerik team
 answered on 07 Feb 2012
1 answer
128 views
Hello,
               We are using RadEditor.dll 7.2.0.0 .  I want to create one Thumbnail img from a 605x442 unit size.
 In the image manager  i did as follows:
Clicked on  the Create Thumbnail icon. The Create Thumbnail sub-window appears. It has the following values filled-in: -- New image name: SpaceRequiredToTransport60People.jpg -- Width: 24 -- Height: 24 (This doesn't make sense. The "large" image is not square.) -- Dimension Unit: Pixel -- Constrain Proportions: checked

But the created image was not cleared one.Its being too small . i am using IE 8.0 & chrome. I checked in both browsers , but its appeares same.

 Do we have any setting in web.congif file for this thumbnamil creation. ????

Thank you,
Rumen
Telerik team
 answered on 07 Feb 2012
3 answers
151 views
Hello...

I have a question about EditForm Style in Grid.

it's hard to explain my case , then i attached two image files

what i want to knows  is that remove line and space (pic2.gif ) like pic1.gif
No set pic1.gif
pic2.gif ,  bordercolor = white , and as faked.

below is source code of pic2.gif.

<EditFormSettings>
   <EditColumn ButtonType="ImageButton" CancelImageUrl="/Images/Grid/Cancel.gif" InsertImageUrl="/Images/Grid/Insert.gif"
     UpdateImageUrl="/Images/Grid/Update.gif"  />
   <FormMainTableStyle BorderStyle="Dotted" BorderWidth="1" Width="100%" />
    <FormTableStyle BorderColor="White" BorderStyle ="Dotted" />
    <FormTableAlternatingItemStyle BorderColor="White" BorderStyle ="Dotted"  />
</EditFormSettings>

thanks regards.
Mira
Telerik team
 answered on 07 Feb 2012
1 answer
37 views
Hi, the editor is not working properly when switched to full screen mode in IE 9 - please see the attached pictures from Firefox and IE 9. What is wrong?
Dobromir
Telerik team
 answered on 07 Feb 2012
1 answer
162 views
Hi,
We have a requirement as follows:

1. We have a WCF service which fetches data from the database.
2. We are using IEnumerable Collection (custom class with properties) object to bind to the Visual Web Part GridView.
3. We want to replace this Gridview with Telerik Rad Grid.
4. The Data collection object need to be displayed in hierarchy.
Eg;
a. WCF Service Method -> GetAll_Employees();
b. public class Employees
{
public int ID;
public string Name;
public string Address;
public int ReportToID;
}
c. The WCF Service returns the IEnumberable<Employees> object to the WebPArt UI.
d. The employee details should be displayed with the Reporting Officer details and the employees reporting to the person as the child collection.
eg;      Reetha    India
                 Geetha    India
                  Meena     India
            Jaya K        India
here Reetha and Jaya K are the employees at the root node and Geetha and Meena are the employees reporting to Reetha , so shown as child. The relation is the ReportToID property in the Employees class.
 
How we can display this in the RadGrid with child and parent and also with an IEnumerable Collection object returned from the WCF as binding data source. Also this need to be done in a Custom Visual Webpart in SP 2010.

Thanks in advance.
Veena R

Tsvetoslav
Telerik team
 answered on 07 Feb 2012
1 answer
71 views
I am using two buttons exactly as shown at your page. Also the code is same. I have one asp server label control also on my page. In the
following function, my custom code won't execute:

protected
void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) { lblstatus.Text="Text is changed"; RadAjaxManager1.Alert("AjaxRequest raised from the " + e.Argument); }

The label text is not getting changed.

HELP!!!!!!!!
Mira
Telerik team
 answered on 07 Feb 2012
2 answers
82 views
This is my radedtor code.  when I enter this content : "İÖÜÇŞĞ ! + = . ; :"
result is : %3cspan style%3d%22font-family%3a arial%3b font-size%3a 13px%3b%22%3e%3cstrong%3eİÖÜÇŞĞ %21 %2b %3d . %3b %3a%3c/strong%3e%22 %3c/span%3e
how can fix this? I double checked all pages and config files. tryed many combination of content filters. what is wrong?

Editor Code :
Input : "İÖÜÇŞĞ ! + = . ; :"
Telerik.Web.UI.RadEditor RadControlWrite = new Telerik.Web.UI.RadEditor();
            RadControlWrite.ContentFilters = EditorFilters.DefaultFilters;
            RadControlWrite.DisableFilter(EditorFilters.ConvertCharactersToEntities);
            RadControlWrite.Width = 450;
            RadControlWrite.Height = 150;
            RadControlWrite.AutoResizeHeight = true;
            RadControlWrite.ToolsFile = "~/Manage/ResourceToolbar.xml";
            RadControlWrite.CssFiles.Clear();
            RadControlWrite.CssFiles.Add(new EditorCssFile("~/App_Themes/" + ConfigurationManager.AppSettings["Default_Theme"].ToString() + "/typography.css"));
            RadControlWrite.ToolbarMode = Telerik.Web.UI.EditorToolbarMode.Default;
            RadControlWrite.EditModes = EditModes.All;
            RadControlWrite.ID = "RadEditor" + IDCount.ToString();
            if (Object.Equals(SecondRadControl, null)) { SecondRadControl = RadControlWrite; } else { RadControlWrite.ToolProviderID = SecondRadControl.ID; }
 
            // Custom Translater Tool -----------------
            EditorToolGroup RadControlToolGroup = new EditorToolGroup();
            EditorDropDown TranslateDropDown = new EditorDropDown("TranslateTool");
            TranslateDropDown.Items.Add(new EditorDropDownItem("Türkçe","tr"));
            TranslateDropDown.Items.Add(new EditorDropDownItem("English","en"));
            RadControlToolGroup.Tools.Add(TranslateDropDown);
            RadControlWrite.Tools.Add(RadControlToolGroup);
 
            phResourceEditor.Controls.Add(RadControlWrite);

Saving Function
Output :   

Request.Form[string.Format("ctl00$ManageMasterContent$RadEditor{0}", IDCount)].ToString() 

"%3cspan style%3d%22font-family%3a arial%3b font-size%3a 13px%3b%22%3e%3cstrong%3eİÖÜÇŞĞ %21 %2b %3d . %3b %3a%3c/strong%3e%22 %3c/span%3e" string
int IDCount = 1;
foreach (System.Collections.Generic.KeyValuePair<string, string> ResourceDictionaryEntry in ResourceItems)
{
    RW.AddResource(ResourceDictionaryEntry.Key.ToString(), Request.Form[string.Format("ctl00$ManageMasterContent$RadEditor{0}", IDCount)].ToString() /** Important : if masterpage chanced this value can be null **/ );
    IDCount++;
}


Rumen
Telerik team
 answered on 07 Feb 2012
0 answers
120 views
Hello,

I have a RadGrid with different Tabs, here is the code for it.

<telerik:RadTabStrip ID="tabStrips" runat="server" MultiPageID="rmpStrips" >
        <Tabs>
            <telerik:RadTab></telerik:RadTab>
            <telerik:RadTab></telerik:RadTab>
            <telerik:RadTab></telerik:RadTab>
            <telerik:RadTab></telerik:RadTab>
        </Tabs>
</telerik:RadTabStrip>

I want to also have filters, for each radgrid in the tabs. Is it possible? if yes, how?

I appreciate your response.

Thanks,
Saquib

Saquib
Top achievements
Rank 1
 asked on 07 Feb 2012
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?