Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
291 views
Hello again... I tried doing that in many ways... always something was wrong.

So, I have a RadGrid for my products from database. 1 product per row - ok. 
Now for each product I have at least 1 image in other table. That's why I wanted to add RadRotator in one column so that for each product people can see all images (RadRotator with buttons).

Here's the code for the column with photos:
<telerik:GridTemplateColumn HeaderText="Zdjęcia" HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="Center"
   ItemStyle-HorizontalAlign="Center" AllowFiltering="false">
<ItemTemplate>
<telerik:RadRotator runat="server" ID="itemsRotator" OnDataBinding="RadRotator_OnDataBinding" Height="128px">
     <ItemTemplate>
         <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("zdjecie") %>'
            AutoAdjustImageControlSize="false" Width="128px" Height="128px" ResizeMode="Fit" ImageAlign="Middle"/>
     </ItemTemplate>
</telerik:RadRotator>
    </ItemTemplate>
</telerik:GridTemplateColumn>

Photos size are different (some 212 x 212, 211 x 211 - small differences) so I want them to fit.

Also I added a server-side code:

protected void RadRotator_OnDataBinding(object sender, EventArgs e)
        {
            string tmp = obecnyitem["ProductID"].Text;
 
            RadRotator radrotator = (RadRotator)obecnyitem.FindControl("itemsRotator");
 
            SqlConnection sqlconn = new SqlConnection();
            sqlconn.ConnectionString = @"data source=UNDERGROUND\SQLEXPRESS;UID=sa;PWD=ds3236y;initial catalog=Products";
            sqlconn.Open();
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = sqlconn;
            cmd.CommandText = "select count(1) from katalog_zdjecia where indeks = '" + tmp + "'";
 
            int tmp1 = System.Convert.ToInt32(cmd.ExecuteScalar());
 
            sqlconn.Close();
            cmd.Dispose();
            sqlconn.Dispose();
 
            SqlDataSource sqldatsrc = new SqlDataSource();
            sqldatsrc.ConnectionString = @"data source=UNDERGROUND\SQLEXPRESS;UID=sa;PWD=ds3236y;initial catalog=Products";
            sqldatsrc.ProviderName = "System.Data.SqlClient";
            sqldatsrc.SelectCommand = "select indeks, zdjecie from katalog_zdjecia where indeks = '" + tmp + "'";
            radrotator.DataSource = sqldatsrc;
 
            if (tmp1 > 1)
                radrotator.RotatorType = RotatorType.Buttons;
            else
                radrotator.RotatorType = RotatorType.AutomaticAdvance;
 
        }

so it checks the amount of photos for current row. If it's > 1 then add buttons to rotator, else set it to AutomaticAdvance as it won't advance when there'll be 1 photo.

currently that column looks like in the attached file.

Problems:

1. When I have many photos and buttons in RadRotator - it's centered, when I set it to AutomaticAdvance it on the left side, why?
2. As You can see in first 3 rows, there are more than 1 photo per row. But instead of showing only one photo with ability to rotate, I see one photo and a part of second photo, when I rotate then, I see part of second photo and part of 3rd photo etc... I think I messed something with the sizes as I'd like to see max 1 photo.

Best Regards
Darek
Dariusz
Top achievements
Rank 1
 answered on 24 Oct 2011
1 answer
188 views
Hi.
It is impossible to cancel underline to part of text(and all) which was pasted from Word.
<span style="text-decoration: underline; font-size: 12pt; font-family: cambria;">Text Text</span>
Rumen
Telerik team
 answered on 24 Oct 2011
1 answer
115 views
in the rad grid control want to dispaly data dyanmically to header also ,like wise for an employee his week details should come like
shift timeingsin a single row fora an employee for a whoile week
example,i have attached a sample ,i need the data to display from that  and whole grid to save it once i click on save button,and for previous and next buttons weekly details should be displayed

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Oct 2011
4 answers
220 views
Hi Team,
I have a hierarchical radgrid (find attached image.) and a button outside the radgrid.

When I select some of d rows of grid, i should get the GroupID as well as its corresponding GroupItems' ID

AS in image, When I select rows under the group "Coimbator", I should get ID of "Coimbator" as well as IDs of rows selecetd under "Coimbator"..

Here is my aspx side. :

<tr>
                    <td style="width:100%" colspan="3">
                        <telerik:RadGrid ID="rgGiroPayments" runat="server" OnNeedDataSource="rgGiroPayments_NeedDataSource" AllowMultiRowSelection="true">
                            <MasterTableView>
                                <GroupByExpressions>
                                    <telerik:GridGroupByExpression>
                                        <SelectFields>
                                            <telerik:GridGroupByField FieldName="EntityKeyName" FieldAlias="Vendor" />
                                        </SelectFields>
                                        <GroupByFields>
                                            <telerik:GridGroupByField FieldName="EntityKeyName" FieldAlias="Vednor" />
                                        </GroupByFields>
                                    </telerik:GridGroupByExpression>
                                </GroupByExpressions>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="AP_InvoiceID" HeaderText="AP_InvoiceID" Display="false" UniqueName="AP_InvoiceID">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="InvoiceNo" HeaderText="Invoice #" DataType="system.string"
                                        UniqueName="InvoiceNo" FilterControlWidth="75%" SortExpression="InvoiceNo"
                                        AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="InvoiceDate" HeaderText="Date" FilterControlWidth="75%"
                                        UniqueName="InvoiceDate" DataFormatString="{0:d}" AutoPostBackOnFilter="true"
                                        CurrentFilterFunction="Contains">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="EntityID" HeaderText="EntityID" Display="false" UniqueName="EntityID">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="EntityIKeyD" HeaderText="EntityIKeyD" Display="false" UniqueName="EntityIKeyD">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="EntityKeyName" FilterControlWidth="75%" HeaderText="EntityKeyName"
                                        UniqueName="EntityKeyName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" Display="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="InvoiceCurrencyName" HeaderText="Currency"
                                        UniqueName="InvoiceCurrencyName" FilterControlWidth="50%" AutoPostBackOnFilter="true"
                                        CurrentFilterFunction="Contains" Display="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CurrencySymbol" HeaderText="Currency"
                                        UniqueName="CurrencySymbol" FilterControlWidth="50%" AutoPostBackOnFilter="true"
                                        CurrentFilterFunction="Contains">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="InvoiceAmount" HeaderText="Amount" UniqueName="InvoiceAmount"
                                        FilterControlWidth="50%" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="BalanceAmount" HeaderText="Due Amount" UniqueName="BalanceAmount"
                                        AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridClientSelectColumn UniqueName="Select">
                                    </telerik:GridClientSelectColumn>
                                </Columns>
                            </MasterTableView>
                            <ClientSettings Selecting-AllowRowSelect="true"></ClientSettings>
                        </telerik:RadGrid>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <asp:Button ID="btnPayment" runat="server" Text="Make Payment" OnClick="btnPayment_Click" />
                    </td>
                </tr>

Could you plz help me out ???

Regards,
Lok..
Lokesh
Top achievements
Rank 1
 answered on 24 Oct 2011
3 answers
112 views
Looking at the demo (@ http://demos.telerik.com/aspnet-ajax/panelbar/examples/functionality/panelbarbehavior/defaultcs.aspx) it seems the default behavior of a RadPanelBar in SingleExpandedItem mode does not allow you to click on a selected (and thus expanded) item to re-collapse it.

I just watched our customer click on the bar a dozen times trying to collapse it so they could view items below more easily.... they seemed to think that bar was broken :)

I'd like to give them the expected behavior - basically exactly like how the PanelBar work in MultipleExpandedItems mode, except of course clicking on a different item collapses the currently expanded item like in SingleExpandedItem mode, so only one item at a time is displayed.


Is there any easy way to accomplish this? I was kinda of surprised it's not the default behavior, given the expand/collapse button on the right of the bar.


Thanks,
-Adam
Peter
Telerik team
 answered on 24 Oct 2011
3 answers
134 views
In my project, I use a popup to upload files. Because i have to do some codebehind calculations to see if the popup should be shown, I have to run the window like this:

 

 

 

 

 

Dim sScript As String = "radopen('FileUpload.aspx?CusID=" & lID & "', 'InfoPopup');"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "FileUpload", sScript, True)

In the FileUpload.aspx, the user can upload files. When he does, my DB is updated with the uploaded files.
In the original page, i have a RadTreeView with all existing files in a hierarchy. This treeview is updated through codebehind, and does not have any datasource. After the fileupload window is closed, I need to refresh this list, but as far as I can tell, there is no event that is fired when the window is closed. And in the codebehind of FileUpload.aspx, i cannot make a call to update the list in the original page. How can I get my list to refresh after the upload?

Jostein
Top achievements
Rank 1
 answered on 24 Oct 2011
1 answer
163 views
Hi guys,
We are using RadEditor on one of our pages.
After clicking on Image Editor button within Image Manager of RadEditor we receive the followin error:

Any idea why it happen?

 

Server Error in '/' Application.

Could not find the specified key "ImageEditor_Reset" or class id "RadEditor.Dialogs".

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Could not find the specified key "ImageEditor_Reset" or class id "RadEditor.Dialogs".

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[ArgumentException: Could not find the specified key "ImageEditor_Reset" or class id "RadEditor.Dialogs".]
   Telerik.Sitefinity.Localization.Resource.GetString(ResourceDataProvider provider, String classId, String key, CultureInfo culture, Boolean falback, Boolean throws) +475
   Telerik.Sitefinity.Localization.Res.Get(String classId, String key, CultureInfo culture, Boolean fallback, Boolean throws) +216
   Telerik.Sitefinity.Localization.Res.Get(String classId, String key, CultureInfo culture) +44
   Telerik.Sitefinity.Localization.GlobalResourceProvider.GetObject(String resourceKey, CultureInfo culture) +74
   System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture, Type objType, String propName) +23
   System.Web.HttpContext.GetGlobalResourceObject(String classKey, String resourceKey, CultureInfo culture) +26
   Telerik.Web.GlobalResourceLocator.GetString(String classKey, String resourceKey, CultureInfo culture) +39
   Telerik.Web.GlobalResourceLocator.GetString(String resourceKey, CultureInfo culture) +48
   Telerik.Web.GlobalResourceLocator.GetString(String resourceKey) +67
   Telerik.Web.LocalizationProvider.GetString(String resourceKey) +40
   Telerik.Web.LocalizationStrings.GetString(String key, Boolean throwErrorIfMissing) +137
   Telerik.Web.LocalizationStrings.GetString(String key) +47
   Telerik.Web.UI.Editor.DialogControls.DialogLocalizationStrings.InitializeDialogStrings() +247
   Telerik.Web.UI.Editor.DialogControls.DialogLocalizationStrings..ctor(LocalizationProvider localization, String dialogName, Boolean errorOnMissing) +99
   Telerik.Web.UI.Editor.DialogsStrings..ctor(LocalizationProvider localization, String dialogName, Boolean errorOnMissing) +45
   Telerik.Web.UI.Dialogs.UserControlBase.UpdateChildControls(Control currentControl) +1037
   Telerik.Web.UI.Dialogs.UserControlBase.CreateChildControls() +458
   System.Web.UI.Control.EnsureChildControls() +102
   Telerik.Web.UI.Dialogs.UserControlBase.OnInit(EventArgs e) +47
   Telerik.Web.UI.Editor.DialogControls.ImageEditorDialog.OnInit(EventArgs e) +37
   System.Web.UI.Control.InitRecursive(Control namingContainer) +140
   System.Web.UI.Control.AddedControl(Control control, Int32 index) +197
   System.Web.UI.ControlCollection.Add(Control child) +79
   Telerik.Web.UI.DialogHandlerNoSession.AddDialogControl(Control dialogControl, DialogParameters dialogParameters) +387
   Telerik.Web.UI.DialogHandlerNoSession.LoadDialogControl() +886
   Telerik.Web.UI.DialogHandlerNoSession.CreateChildControls() +349
   System.Web.UI.Control.EnsureChildControls() +102
   Telerik.Web.UI.DialogHandlerNoSession.OnPreLoad(EventArgs e) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2099

 
[ArgumentException: Could not find the specified key "ImageEditor_Reset" or class id "RadEditor.Dialogs".] Telerik.Sitefinity.Localization.Resource.GetString(ResourceDataProvider provider, String classId, String key, CultureInfo culture, Boolean falback, Boolean throws) +475 Telerik.Sitefinity.Localization.Res.Get(String classId, String key, CultureInfo culture, Boolean fallback, Boolean throws) +216 Telerik.Sitefinity.Localization.Res.Get(String classId, String key, CultureInfo culture) +44 Telerik.Sitefinity.Localization.GlobalResourceProvider.GetObject(String resourceKey, CultureInfo culture) +74 System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture, Type objType, String propName) +23 System.Web.HttpContext.GetGlobalResourceObject(String classKey, String resourceKey, CultureInfo culture) +26 Telerik.Web.GlobalResourceLocator.GetString(String classKey, String resourceKey, CultureInfo culture) +39 Telerik.Web.GlobalResourceLocator.GetString(String resourceKey, CultureInfo culture) +48 Telerik.Web.GlobalResourceLocator.GetString(String resourceKey) +67 Telerik.Web.LocalizationProvider.GetString(String resourceKey) +40 Telerik.Web.LocalizationStrings.GetString(String key, Boolean throwErrorIfMissing) +137 Telerik.Web.LocalizationStrings.GetString(String key) +47 Telerik.Web.UI.Editor.DialogControls.DialogLocalizationStrings.InitializeDialogStrings() +247 Telerik.Web.UI.Editor.DialogControls.DialogLocalizationStrings..ctor(LocalizationProvider localization, String dialogName, Boolean errorOnMissing) +99 Telerik.Web.UI.Editor.DialogsStrings..ctor(LocalizationProvider localization, String dialogName, Boolean errorOnMissing) +45 Telerik.Web.UI.Dialogs.UserControlBase.UpdateChildControls(Control currentControl) +1037 Telerik.Web.UI.Dialogs.UserControlBase.CreateChildControls() +458 System.Web.UI.Control.EnsureChildControls() +102 Telerik.Web.UI.Dialogs.UserControlBase.OnInit(EventArgs e) +47 Telerik.Web.UI.Editor.DialogControls.ImageEditorDialog.OnInit(EventArgs e) +37 System.Web.UI.Control.InitRecursive(Control namingContainer) +140 System.Web.UI.Control.AddedControl(Control control, Int32 index) +197 System.Web.UI.ControlCollection.Add(Control child) +79 Telerik.Web.UI.DialogHandlerNoSession.AddDialogControl(Control dialogControl, DialogParameters dialogParameters) +387 Telerik.Web.UI.DialogHandlerNoSession.LoadDialogControl() +886 Telerik.Web.UI.DialogHandlerNoSession.CreateChildControls() +349 System.Web.UI.Control.EnsureChildControls() +102 Telerik.Web.UI.DialogHandlerNoSession.OnPreLoad(EventArgs e) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2099 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

Rumen
Telerik team
 answered on 24 Oct 2011
1 answer
190 views
Hi Telerik Team,

I there is any way to create Avatars in the ASP.net using the telerik.
      

My requirement is as follows:
1) 
 In my Web Page I have link when user clicks the link, user should able to upload his desired image and create a simple avatar for it and at finally when user ends with creation of the Avatar and click on the submit, I should be able to save it in the database.
2) 
 So that when the user visits the page next time, he should be able to see avatar that he has previously designed.
3)
  Will you please tell me where can I get the API or sample code that can be used in the c#.net.
Please help me in doing this, it’s very Urgent.

Thanks & Regards

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

Aravinda Chary N

Manamai

Sebastian
Telerik team
 answered on 24 Oct 2011
1 answer
142 views

Hi all,

 How to  avoid postback on the Click event of  RadTreeList Expand (+) ,collapse (-) button?

Thanks
Sindu
Princy
Top achievements
Rank 2
 answered on 24 Oct 2011
1 answer
332 views
Hi Admin/Moderator ,

I have recently converted By Web Application from ASP.Net 2.0 to Asp.Net 3.5 to use the Telerik Version 2011.I have used the Telerik Version 2008 previously.After conversion the Ajax Version also converted from 1.0 to 3.5But getting the following error during application debugging.
Microsoft JScript runtime error: Unable to get value of the property 'PageRequestManager': object is null or undefined
I have used the property 'PageRequestManager in the Splitter control of Telerik Version 2008.
Could you please reply a solution?

Thanks,
Tinoy
Dobromir
Telerik team
 answered on 24 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?