Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 views
Hi,

I have a multicalendar which shows current, next and previous month. Now I want to hide the overlapping days. How do I hide OtherMonthDay?

Regards,
Marcus
Shinu
Top achievements
Rank 2
 answered on 09 Jul 2010
1 answer
177 views
Hi all, I am having unusual behavior for my radgrid. I update in code-behind using OnUpdateCommand and when I submit the change for that row, it changes ALL rows as if it's looping through all rows and updating all with the change!!

Here is my radgrid code
<telerik:RadGrid 
        ID="VendProdGrid"
        GridLines="None"
        runat="server"
        AllowAutomaticDeletes="True"
        AllowAutomaticInserts="False" 
        AllowAutomaticUpdates="False"
        PageSize="10"
        AllowPaging="True"
        AutoGenerateColumns="False"
        DataSourceID="VendProdGridSource"       
        OnItemUpdated="VendProdGrid_ItemUpdated"
        OnItemDeleted="VendProdGrid_ItemDeleted"
        OnItemInserted="VendProdGrid1_ItemInserted"
        OnItemCommand="VendProdGrid_ItemCommand"
        OnUpdateCommand="VendProdGrid_Update"
         
        OnDataBound="VendProdGrid_DataBound"
        EnableEmbeddedScripts="false">
            <PagerStyle Mode="NextPrevAndNumeric" />
     
        <MasterTableView
            Width="100%"
            CommandItemDisplay="TopAndBottom"
            DataKeyNames="VProductID"
            DataSourceID="VendProdGridSource"
            HorizontalAlign="NotSet"
            AutoGenerateColumns="False">
             
            <Columns>
                 
                <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                                    
                <telerik:GridTemplateColumn  UniqueName="TemplateColumn">
                      <HeaderTemplate>
                        <strong>Product Type</strong>
                      </HeaderTemplate>
                      <ItemTemplate>
                            <strong><%# DataBinder.Eval(Container.DataItem, "VProductType")%></strong><br />
                            <em><%# DataBinder.Eval(Container.DataItem, "VProductDescription")%></em>                               
                      </ItemTemplate>
                </telerik:GridTemplateColumn>
                 
                <telerik:GridBoundColumn DataField="SupplierName" HeaderText="Supplier" SortExpression="SupplierName"
                            UniqueName="SupplierName"></telerik:GridBoundColumn>
                 
                
                 
                <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" />
                 
            </Columns>
             
            <EditFormSettings EditFormType="Template">
                 
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
                 
                <FormTemplate>
                    <table cellspacing="2" cellpadding="1" width="100%" border="0">
                        <tr>
                             
                                <td>Supplier:</td>
                                
                               <td>
                               <telerik:RadComboBox
                                        ID="SupplierCB"
                                        runat="server" 
                                        DropDownWidth="300"
                                        DataSourceID="SQLSupplierSource"
                                        DataValueField="SupplierID"
                                        DataTextField="SupplierName"
                                        AppendDataBoundItems="false"
                                        EnableLoadOnDemand="false"
                                        >
                                        
                               </telerik:RadComboBox>  
                                    
                                
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Product Type:
                            </td>
                            <td>
                              <telerik:RadComboBox
                                        ID="VProductTypeCB"
                                        runat="server" 
                                        DropDownWidth="300"
                                        DataSourceID="SQLVendorProductTypeList"
                                        DataValueField="VProductTypeID"
                                        DataTextField="VProductType"
                                         
                                        AppendDataBoundItems="false"
                                        EnableLoadOnDemand="false"
                                        >
                                        
                               </telerik:RadComboBox>
                             
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Description:</td>
                            <td>
                                <asp:textbox
                                    runat="server"
                                    id="VProductDescriptionEdit"
                                    causesvalidation="False"
                                    textmode="MultiLine"
                                    width="300px"
                                    uniqueid="VProductDescriptionEdit"
                                    rows="5"
                                    text='<%# DataBinder.Eval(Container.DataItem, "VProductDescription") %>'
                                    ></asp:textbox>
                             
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Limitations:</td>
                            <td>
                            <asp:textbox
                                    runat="server"
                                    id="VProductLimitationsEdit"
                                    CausesValidation="False"
                                    TextMode="MultiLine"
                                    Width="300px"
                                    UniqueID="VProductLimitationsEdit"
                                    Rows="5"
                                    Text='<%# DataBinder.Eval(Container.DataItem, "VProductLimitations") %>'
                                    ></asp:textbox>
                             
                            </td>
                        </tr>
                        <tr>
                           <td>
                                Reference Standards:</td>
                            <td>
                            <asp:textbox
                                    runat="server"
                                    id="VRefStandardEdit"
                                    CausesValidation="False"
                                    TextMode="MultiLine"
                                    Width="300px"
                                    UniqueID="VRefStandardEdit"
                                    Rows="5"
                                    Text='<%# DataBinder.Eval(Container.DataItem, "VRefStandard") %>'
                                    ></asp:textbox>
                            
                            </td>
                        </tr>
                        
                        <tr>
                            <td colspan="2">
                                <asp:Button ID="Button1" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>
                                <asp:Button ID="Button2" runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel"></asp:Button>
                            </td>
                        </tr>
                    </table>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

And here is the codebehind:
protected void VendProdGrid_Update(object source, GridCommandEventArgs e)
    {
 
        if (e.CommandName == RadGrid.UpdateCommandName)
        {
            if (e.Item is GridEditFormItem)
            {
                 
 
                GridEditFormItem item = (GridEditFormItem)e.Item;
                int id = Convert.ToInt32(item.GetDataKeyValue("VProductID"));
                if (id != 0)
                {
 
 
                    RadComboBox SupplierCB = item.FindControl("SupplierCB") as RadComboBox;
                    RadComboBox VProductTypeID = item.FindControl("VProductTypeCB") as RadComboBox;
                    TextBox VProductDescription = item.FindControl("VProductDescriptionEdit") as TextBox;
                    TextBox VProductLimitations = item.FindControl("VProductLimitationsEdit") as TextBox;
                    TextBox VRefStandard = item.FindControl("VRefStandardEdit") as TextBox;
 
                    try
                    {
                        VendProdGridSource.UpdateParameters.Add("SupplierID", TypeCode.Int32, SupplierCB.SelectedValue.ToString());
                        VendProdGridSource.UpdateParameters.Add("VProductTypeID", TypeCode.Int32, VProductTypeID.SelectedValue.ToString());
                        VendProdGridSource.UpdateParameters.Add("VProductDescription", TypeCode.String, VProductDescription.Text);
                        VendProdGridSource.UpdateParameters.Add("VProductLimitations", TypeCode.String, VProductLimitations.Text);
                        VendProdGridSource.UpdateParameters.Add("VRefStandard", TypeCode.String, VRefStandard.Text);
                        VendProdGridSource.Update();
                       //
                        //e.KeepInEditMode = false;
                        //e.ExceptionHandled = true;
 
                        SetMessage("New Product Type " + id + " is updated!");
                    }
                    catch (Exception ex)
                    {
 
                        // e.ExceptionHandled = true;
                        SetMessage("Product Type " + id + " cannot be updated. Reason: " + ex.Message);
                    }
 
                  //  e.Canceled = true;
                    VendProdGrid.Rebind();
                }
            }
        }
    }

Princy
Top achievements
Rank 2
 answered on 09 Jul 2010
1 answer
152 views
I am using RadEditor and I need to insert image and documents. I noticed the popup dialogs are FileBrowser(Correct me if I am wrong, thanks). The default FileBrowser contains FileExplorer and previewer. Now I want to change the behavior to :
1. For image, replace the FileExplorer with my own explorer
2. For document, replace the FileExplorer with my own explorer, and remove the previewer.

I know users can customize dialogs, is it possible to make above changes? and how to do it?

The task is quite urgent, looking forward to your reply. Thanks.
Dobromir
Telerik team
 answered on 09 Jul 2010
3 answers
183 views
Hello,

I am using one of the example grids with the EnableHeaderContextMenu set to true.  I am also saving the grid state to a database as columns are reordered.  I would like to save the grid state to the database both when the user selects or deselects columns via the header context menu and when the user resizes columns.   I can't figure out which events I can use to capture these actions.  Any help would be much appreciated.

Thanks,
Bob 
Maria Ilieva
Telerik team
 answered on 09 Jul 2010
2 answers
161 views
I'm trying to do this:
            var panel = $find('xmlCallbackPanel'); 
 
            //Callback to the webservice for each item 
            $('.callbackitem').each(function () { 
                var dateid = $(this).attr('id'); 
 
 
                var text = $('#debugPanel').html(); 
                $('#debugPanel').html(text + "<br />" + dateid); 
                 
                 
                panel.set_value(dateid); 
            }); 

Ok, so I have a radgrid, and on $(document).ready I want to loop through each row and send that data back to the XmlHttpPanel to process and return data (which I'll handle clientside)

problem is, the set_value is sending back the same value over and over again.  The debugPanel step above shows me the IDs I'm trying to pass and they're all unique....but examining the Posts shows the same ID 40+ times.

Can it not do this? 

Should I just use a regular jQuery ajax callback?


Pero
Telerik team
 answered on 09 Jul 2010
1 answer
64 views
Hi,

the item labels of my xasis contain quite large texts (whole sentence).

First I re-sized the labels using PlotArea > Xaxis > LabelAppearance > Dimensions which is working fine.

Now the text is limited to 30 letters + "..." e.g. "abcdefghijklmnopqrstuvwxyz1234..." so I tried changing the MaxLenght under PlotArea > Xasis > TextAppearance > MaxLenght to 150 which is not working (still displaying only the first 30 letters + "...").

So how can I change the MaxLenght value for items labels on my xaxis?

Regards,
Daniel.
Ves
Telerik team
 answered on 09 Jul 2010
1 answer
191 views
Hi Team,

Is there any way to integrate telerik Rad Editor on  Classic ASP Page?

If yes then please  let me know ?

We are having lots of editlive  on Classic ASP Page,We want to convert it to telerik Rad Editor.

We know one way is that we have to convert Classic ASP Page to ASP.NET then telerik Rad Editor will work. but this will not be a easy task for us because We are having 100+ pages where we are using edit live , and we do-not want to convert  these pages, but we want telerik editor on those pages?

Do you people have any idea how to do this?

Thanks in advance,


Thanks,
Vivek Kumar


Rumen
Telerik team
 answered on 09 Jul 2010
1 answer
107 views
Hi All

Need help:

I am using following example

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx

And i need following requirements

1) Can i select any Customer Panel / Item then it change color also i want to use selected item?
2) Can i show only 1 Filter Column like CustumerID and other ill hide?


thx
Dimo
Telerik team
 answered on 09 Jul 2010
10 answers
556 views

Hi,

I try to validate two RadNumericTextBox control by CompareValidator:

<telerik:RadNumericTextBox id="NumberMinValueTextBox" runat="server" /> 
<telerik:RadNumericTextBox id="NumberMaxValueTextBox" runat="server" /> 
<asp:CompareValidator ID="NumberMinMaxValidator" runat="server" ErrorMessage="The max value couldn't be less than the min value." Operator="GreaterThanEqual" ControlToCompare="NumberMinValueTextBox" ControlToValidate="NumberMaxValueTextBox" ValidationGroup="NumberField" Display="Dynamic" /> 

It works ok only, when the compared values in the both min and max control contain the same number of digits.
(i.e min = 1, max = 9  or min = 10, max = 25 etc.)

But when I enter e.g.  '12' to min control and '102' validation failed. It looks that the max value is trimmed from '102' to '10' then 12 > 10 and validatio failed.

What am I doing wrong? Thanks in advance.

Michal Siudyka
Top achievements
Rank 2
 answered on 09 Jul 2010
1 answer
113 views
I am using the document manager in a editor but when I access the folder, it only displays PDF's even though there are .zip, .doc, and .xls. Is there some default setting that needs to be over written to show any file?

<

 

telerik:RadEditor DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd" runat="server" ID="RadEditor1" SkinID="DefaultSetOfTools" Height="800" Width="700" Skin="Telerik" OnClientLoad="OnClientLoad"></telerik:RadEditor>

 


RadEditor1.DocumentManager.ViewPaths =

new string[] { "/path/" + variable+ "/" };

 

RadEditor1.DocumentManager.UploadPaths =

new string[] { "/path/" + variable+ "/" };

 

RadEditor1.DocumentManager.DeletePaths =

new string[] { "/path/" + variable+ "/" };

Thanks!

 


Rumen
Telerik team
 answered on 09 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?