Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
55 views
Hello,
I have a chart that receive queries dinamically created. In some cases I have only 1 description field in X axis, in other situation I have a description composed by more than 1 field. I'd like to dinamically fill DataLabelsColumn... is it possible with code behind?

Thanks
Evgenia
Telerik team
 answered on 17 Nov 2011
6 answers
204 views
Hi,

I have the following RadGrid:

<telerik:RadGrid ID="m_gvwUpdate_ScenariosMarketInputData" runat="server" DataSourceID="m_gvwUpdate_ScenariosMarketInputDataDataSource" AllowPaging="false" AllowSorting="false" OnItemCommand="m_gvwUpdate_ScenariosMarketInputData_OnItemCommand">
                        <MasterTableView AutoGenerateColumns="False" DataKeyNames="ScenarioID" ClientDataKeyNames="ScenarioID"
                           TableLayout="Fixed" DataSourceID="m_gvwUpdate_ScenariosMarketInputDataDataSource">
                           <PagerStyle Mode="NextPrevAndNumeric" Visible="true" AlwaysVisible="true" />
                           <NoRecordsTemplate>
                              <div style="padding: 5px;">
                                 <asp:Label ID="m_lbl_NoData" runat="server" Text="No data on database" />
                              </div>
                           </NoRecordsTemplate>
                           <Columns>
                              <telerik:GridBoundColumn DataField="ScenarioName" HeaderText="Name" SortExpression="ScenarioName"
                                 UniqueName="ScenarioName">
                                 <ItemStyle Wrap="True" />
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn DataField="StrategicPeriodName" HeaderText="Strategic Period"
                                 SortExpression="StrategicPeriodName" UniqueName="StrategicPeriodName">
                                 <ItemStyle Wrap="True" />
                              </telerik:GridBoundColumn>
                              <telerik:GridTemplateColumn UniqueName="Official" HeaderText="Official" ItemStyle-HorizontalAlign="Center">
                                 <HeaderStyle Width="50px" />
                                 <ItemTemplate>
                                    <asp:Image runat="server" ID="m_img_Official" Visible='<% #Eval("Official") %>' ImageUrl="~/Images/ok.png"
                                       AlternateText="Official" SkinID="Grid" />
                                 </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="IsReadOnly" HeaderText="Locked" ItemStyle-HorizontalAlign="Center">
                                 <HeaderStyle Width="50px" />
                                 <ItemTemplate>
                                    <asp:Image runat="server" ID="m_img_IsReadOnly" Visible='<% #Eval("IsReadOnly") %>'
                                       ImageUrl="~/Images/ok.png" AlternateText="Locked" SkinID="Grid" />
                                 </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridBoundColumn DataField="Created" HeaderText="Created By" UniqueName="Created"
                                 SortExpression="Created">
                                 <ItemStyle Wrap="True" />
                                 <HeaderStyle Width="120px" />
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn DataField="CreationDate" HeaderText="Creation Date" UniqueName="CreationDate"
                                 SortExpression="CreationDate" DataFormatString="{0:dd-MM-yyyy &nbsp;&nbsp; HH:mm}">
                                 <ItemStyle Wrap="True" />
                                 <HeaderStyle Width="120px" />
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn DataField="Modified" HeaderText="Modified By" UniqueName="Modified"
                                 SortExpression="Modified">
                                 <ItemStyle Wrap="True" />
                                 <HeaderStyle Width="120px" />
                              </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn DataField="LastModify" HeaderText="Last Modify" UniqueName="LastModify"
                                 SortExpression="LastModify" DataFormatString="{0:dd-MM-yyyy &nbsp;&nbsp; HH:mm}">
                                 <ItemStyle Wrap="True" />
                                 <HeaderStyle Width="120px" />
                              </telerik:GridBoundColumn>
                              <telerik:GridTemplateColumn UniqueName="CopyColumn" ItemStyle-HorizontalAlign="Center">
                                 <HeaderStyle Width="30px" />
                                 <ItemTemplate>
                                    <asp:ImageButton runat="server" ID="m_img_Copy" ImageUrl="~/Images/copySmall.png"
                                       AlternateText="Copy" SkinID="Grid" ToolTip="Copy" OnClientClick='<% # "openWinCopyScenariosMarketInputData(" + (int)Eval("ScenarioID") + "); return false;" %>' />
                                 </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="UpdateColumn" ItemStyle-HorizontalAlign="Center">
                                 <HeaderStyle Width="30px" />
                                 <ItemTemplate>
                                    <asp:ImageButton runat="server" ID="m_img_Update" ImageUrl="~/Images/editSmall.png"
                                       AlternateText="Update" SkinID="Grid" ToolTip="Update" OnClientClick='<% # "openWinUpdateScenariosMarketInputData(" + (int)Eval("ScenarioID") + "); return false;" %>'
                                       Visible='<% # (Zelando.SEM.BLL.ScenariosMarketInputDataManager.CanUnlockMarketScenario((int)Eval("ScenarioID")) && (bool)Eval("IsReadOnly")) || !(bool)Eval("IsReadOnly") %>' />
                                 </ItemTemplate>
                              </telerik:GridTemplateColumn>
                              <telerik:GridTemplateColumn UniqueName="DeleteColumn" ItemStyle-HorizontalAlign="Center">
                                 <HeaderStyle Width="30px" />
                                 <ItemTemplate>
                                    <asp:ImageButton runat="server" ID="m_img_Delte" ImageUrl="~/Images/deleteSmall.png"
                                       AlternateText="Delete" SkinID="Grid" ToolTip="Delete" CommandName="Delete" OnClientClick="return confirm('Are you sure you want to delete the item?');"
                                       Visible='<% # Zelando.SEM.BLL.ScenariosMarketInputDataManager.CanDeleteMarketScenario((int)Eval("ScenarioID")) && !(bool)Eval("IsReadOnly") %>' />
                                 </ItemTemplate>
                              </telerik:GridTemplateColumn>
                           </Columns>
                        </MasterTableView>
                        <ClientSettings>
                           <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="100px" />
                           <Selecting AllowRowSelect="True" />
                           <KeyboardNavigationSettings EnableKeyboardShortcuts="false" />
                           <ClientEvents OnRowSelected="RowSelected" />
                        </ClientSettings>
                     </telerik:RadGrid>

and allowing UseStaticHeaders I have a big rendering problem with all browser.

What can I do?


Thanks in advance!

Francesco Balatti
zelando.com
Pavlina
Telerik team
 answered on 17 Nov 2011
1 answer
64 views
Hello,
I have a problem where the textbox in a radupload doesn't display when running IE7 and some versions of compatibility view (only tried IE8 and IE9 so far).  Also the whole line that it is on becomes clickable for browsing.

Here's the code
<td class="frmLabel">PDF:</td>
<td align="left">
        <telerik:RadUpload ID="ruPDF" runat="server" Width="300px" MaxFileInputsCount="1" AllowedFileExtensions=".pdf" ControlObjectsVisibility="None" Localization-Select="Browse" EnableFileInputSkinning="true" >
        </telerik:RadUpload>
</td>

Thank You
Genady Sergeev
Telerik team
 answered on 17 Nov 2011
3 answers
138 views
I'm needing to check if there is a current active appointment for the current date and time when using recurrence.
Princy
Top achievements
Rank 2
 answered on 17 Nov 2011
1 answer
57 views
Hello,

Is it possible to customize the height and width of the ribbon bar, group or the button?  I need it to minimize the space taken by the ribbon bar.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 17 Nov 2011
1 answer
85 views
Hi,
I have got two grids, where drag and drop is possible. I am using the event Row drop.

When I drag the row, I want the row drop event to be triggered only when the row is dragged outside that particular grid. Else I don't want to trigger the RowDrop event.
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Nov 2011
6 answers
110 views
Hi Telerik Team,

I'm using the "Windows7" skin as my default skin for RadGrid.
However, I want to edit the pager style of this skin. For example I want to switch the items counter from right to left, so the pagination will be on right and the items counter on left.
Meanwhile the default position is: Pagination on Left and Items counter on right.

Please do let me know how can I achieve such scenario.

Thanks,
Bilal
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Nov 2011
1 answer
293 views
I have a reset button outside of the radgrid .... how do i uncheck all checkboxes (GridClientSelectColumn) in radgrid on reset button click.. using Javascript?

thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Nov 2011
3 answers
138 views
Hi,

I have RadGrid which uses a user control (Companies.ascx) as edit form. User control contains chechboxlist and its items are populated dynamically from DB. Now I have a problem with selecting the correct checkboxlist items when grid row is in edit mode. The following code selects the items in user controls DataBinding event but after that in some phase those selection are "reset".

I have tried many different approaches and the following is just one of my tests. Can you help me with this one.

private object _dataItem;  
 
public object DataItem  
{  
    get 
    {  
        return this._dataItem;  
    }  
    set 
    {  
        this._dataItem = value;  
    }  
}  
 
 
protected override void OnInit(EventArgs e)  
{  
    base.OnInit(e);  
 
    this.DataBinding += new EventHandler(Companies_DataBinding);  
}  
 
 
 
 
protected void Companies_DataBinding(object sender, System.EventArgs e)  
{  
    txtName.Text = DataBinder.Eval(DataItem, "CompanyName").ToString();  
      
    using (DBService dms = new DBService())  
    {  
        cblProducts.DataSource = dms.GetProducts();  
        cblProducts.DataBind();  
    }  
 
 
    // get company's products -> string where products are separated with comma  
    object objProducts = DataBinder.Eval(DataItem, "Products");  
 
    if (objProducts != DBNull.Value)  
    {  
        foreach (string prod in objProducts.ToString().Split(','))  
        {  
            ListItem li = cblProducts.Items.FindByText(prod);  
 
            if (li != null)  
                li.Selected = true;  
        }  
    }  
}   


Regards,
Pete
Thontesh
Top achievements
Rank 1
 answered on 17 Nov 2011
8 answers
738 views
Hi,

My data source returns DateTime.MinValue as null when no date is set by the user. This will be shown as 0001-01-01 00:00:00 in the RadGrid.

Question 1: Is it possible to change the behavior so that DateTime.MinValue will result in EmptyDataText showing?

Question 2: When changing into edit mode... How can I avoid getting exceptions when SelectedDate is DateTime.MinValue?

Best regards,
Pether Wiklander
Shinu
Top achievements
Rank 2
 answered on 17 Nov 2011
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?