Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
161 views
Hi,

I wonder if you could add a new option in the Image Manager for the next version:

When inserting a thumbnail image, there are already options to link to the original and to open this link in a new window.

How about another option to open the original image in a lightbox?

When activated, a rel="lightbox" attribute is added to the link tag.

We could then add any lightbox (or derivate) script we like to the page.

If you add an extra field for an "image set" you could also have the image gallery mentioned in another post. Typing a value in the field "image set" would then result in the attribute rel="lightbox[<image set value>]" being added to the link tag.

Or can I achieve this in any other way?
Would be nice to have this for radE for Sharepoint 4.5.3 especially... ;-)

Regards

Martni
Rumen
Telerik team
 answered on 28 Feb 2012
1 answer
100 views
Hello,

I've a grid on a dynamically loaded UserControl. From the code-behind I'm adding serveral columns to the existing column collection. This happens on Page_Init. Now when a postback occurs the columns are added again and when the viewstate is loaded the columns from a previous creation are added also. So every postback my column collection grows.
I only want to recreated the columns on Page_Init manually and exclude them from ViewState. How can I force this?

Regards,
  JosM
Pavlina
Telerik team
 answered on 28 Feb 2012
1 answer
187 views

I am following this example to implement a grid.

http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/autogeneratedhierarchy/defaultcs.aspx 

My radgrid markup is below:

<telerik:RadGrid ID="RadGrid1" runat="server" Height="412px" Width="818px" AutoGenerateColumns="true"
    AllowSorting="true" GroupingSettings-CaseSensitive="false" ClientSettings-Scrolling-AllowScroll="true"
    AutoGenerateHierarchy="true" PageSize="20" Skin="WebBlue" PagerStyle-AlwaysVisible="true"
    ClientSettings-ClientEvents-OnRowDblClick="RowDblClick" ClientSettings-Resizing-AllowColumnResize="true"
    ClientSettings-Scrolling-UseStaticHeaders="false" ClientSettings-Selecting-AllowRowSelect="true"
    ClientSettings-ClientEvents-OnRowClick="RadGrid1_RowSelected" ClientSettings-Scrolling-SaveScrollPosition="true"
    AllowFilteringByColumn="true" AllowPaging="true" OnNeedDataSource="RadGrid1_NeedDataSource"
    OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnColumnCreated="RadGrid1_ColumnCreated"
    OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound"
    OnItemCreated="RadGrid1_ItemCreated" ondatabound="RadGrid1_DataBound">
    <MasterTableView AllowMultiColumnSorting="True" ClientDataKeyNames="rvlPropertyID"
        DataKeyNames="rvlPropertyID" HierarchyLoadMode="Client" Name="Property" Width="100%">
    </MasterTableView>
    <HeaderStyle VerticalAlign="Top" Width="125px" />
    <PagerStyle AlwaysVisible="True" />
</telerik:RadGrid>


I have a drop down that changes the child level of the grid, where it be Assessment or Access. The problem I am running in to is that I allow the user to double click on a row in the child level, and then I will grab the dataKeyValue and launch an editor. I've tried putting these lines in the PreRender event, but it did not work.

switch (m_GridViewType)
{
    case "Access":
        RadGrid1.MasterTableView.DetailTables[0].Name = "Access";
        RadGrid1.MasterTableView.DetailTables[0].DataKeyNames = new string[] { "rvlPropertyID", "rvlPropertyAccessID" };
        RadGrid1.MasterTableView.DetailTables[0].ClientDataKeyNames = new string[] { "rvlPropertyID", "rvlPropertyAccessID" };
        break;
    case "Assessment":
        RadGrid1.MasterTableView.DetailTables[0].Name = "Assessment";
        RadGrid1.MasterTableView.DetailTables[0].DataKeyNames = new string[] { "rvlPropertyID", "rvlPropAssessmentID" };
        RadGrid1.MasterTableView.DetailTables[0].ClientDataKeyNames = new string[] { "rvlPropertyID", "rvlPropAssessmentID" };
        break;
    case "Status":
        RadGrid1.MasterTableView.DetailTables[0].Name = "Status";
        RadGrid1.MasterTableView.DetailTables[0].DataKeyNames = new string[] { "rvlPropertyID", "rvlPropertyStatusID" };
        RadGrid1.MasterTableView.DetailTables[0].ClientDataKeyNames = new string[] { "rvlPropertyID", "rvlPropertyStatusID" };
        break;
    case "Contact":
        RadGrid1.MasterTableView.DetailTables[0].Name = "Contact";
        RadGrid1.MasterTableView.DetailTables[0].DataKeyNames = new string[] { "rvlPropertyID", "cntContactID" };
        RadGrid1.MasterTableView.DetailTables[0].ClientDataKeyNames = new string[] { "rvlPropertyID", "cntContactID" };
        break;
    case "Call":
        RadGrid1.MasterTableView.DetailTables[0].Name = "Call";
        RadGrid1.MasterTableView.DetailTables[0].DataKeyNames = new string[] { "rvlPropertyID", "clnCallinLogID" };
        RadGrid1.MasterTableView.DetailTables[0].ClientDataKeyNames = new string[] { "rvlPropertyID", "clnCallinLogID" };
        break;
}


But the javascript method never pulls the datakeyValue because it does not have the datakeynames

function RowDblClick(sender, eventArgs) {
          var propid = eventArgs.getDataKeyValue("rvlPropertyID");
          switch (document.getElementById('<%=cmbGridViews.ClientID %>').value) {
              case "Access":
                  var childID = eventArgs.getDataKeyValue("RvlPropertyAccessID");
                  break;
              case "Assessment":
                  var childID = eventArgs.getDataKeyValue("RvlPropAssessmentID");
                  break;
              case "Status":
                  var childID = eventArgs.getDataKeyValue("RvlPropertyStatusID");
                  break;
              case "Contact":
                  var childID = eventArgs.getDataKeyValue("CntContactID");
                  break;
              case "Call":
                  var childID = eventArgs.getDataKeyValue("ClnCallinLogID");
                  break;
              default:
                  break;
          }
 
          var targetCell = eventArgs.get_domEvent().target;
 
          if (childID == undefined) {
              if (targetCell.cellIndex == 1) // Property Name
                  window.radopen("Editors/PropertyEditor.aspx?propid=" + propid, "editWindow");
              else if (targetCell.cellIndex == 7 && targetCell.innerHTML != "0") // photocounter and does not = 0
                  window.radopen(GetPhotoViewerURL() + "PhotoViewer.aspx?id=" + propid, "PhotoWindow");
          }
          else { // is child row
              if (targetCell.cellIndex == 0) // Assessment date
                  window.radopen("Editors/PropertyAssessmentEditor.aspx?id=" + rvlAssessmentID, "editWindow");
              else if (targetCell.cellIndex == 11 && targetCell.innerHTML != "0")
                  window.radopen(GetPhotoViewerURL() + "PhotoViewer.aspx?id=" + rvlAssessmentID, "PhotoWindow");
          }
      }
Tsvetoslav
Telerik team
 answered on 28 Feb 2012
3 answers
246 views
Hello,
i have aspx page(web application using c#) having asp panel and under this panel i have radgrid, now i want to resize my panel or radgrid as per client screen resolution so that it can fit to screen( doesnot leave blank space). My current screen resolution is 1024*768 and its working fine but as soon i reset it to 1280*960 panel with grid, shifted  above and leave blank space on the bottom of page.
aspx code #

 

 

<asp:Panel ID="pnlDetailGrid" runat="server" Visible="false" CssClass="myPanelClass">

 

 

 

<asp:ImageButton ID="ImageButton1" runat="server" AlternateText="Export to Excel"

 

 

 

CssClass="imButton" ImageUrl="~/Images/Excel.jpg" OnClick="ImageButton1_Click" />

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" Width="100%"

 

 

 

AutoGenerateColumns="False" AllowMultiRowSelection="False" AllowPaging="true" PageSize="15"

 

 

 

OnDetailTableDataBind="RadGrid1_DetailTableDataBind" Skin="Black" AllowCustomPaging="true"

 

 

 

onneeddatasource="RadGrid1_NeedDataSource"

 

 

 

onitemcreated="RadGrid1_ItemCreated" onitemcommand="RadGrid1_ItemCommand"

 

 

 

onexcelexportcellformatting="RadGrid1_ExcelExportCellFormatting"

 

 

 

onexcelmlexportrowcreated="RadGrid1_ExcelMLExportRowCreated"

 

 

 

onexcelmlexportstylescreated="RadGrid1_ExcelMLExportStylesCreated">

 

 

 

 

<PagerStyle Mode="NumericPages" />

 

 

 

 

<MasterTableView TableLayout="Fixed" AllowMultiColumnSorting="True" cellpadding="0" DataKeyNames="TXNORDER" Width="100%" CommandItemDisplay="Top" GroupLoadMode="Server">

 

 

 

<CommandItemTemplate>

 

 

 

<asp:CheckBox ID="CheckBox2" AutoPostBack="true" CssClass="CheckBox" runat="server" ForeColor="White" Text="Show Filter" />

 

 

 

</CommandItemTemplate>

 

 

 

 

<DetailTables>

 

 

 

<telerik:GridTableView DataKeyNames="TXNORDER" Name="Orders" Width="100%">

 

 

 

<Columns>

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="5px">

 

 

 

<ItemTemplate>

 

 

 

<asp:ImageButton ID="imgCheck" runat="server" CausesValidation="false"

 

 

 

CommandArgument='<%# DataBinder.Eval(Container.DataItem, "CaptureImageKey")%>'

 

 

 

CommandName='<%# DataBinder.Eval(Container.DataItem, "ItemTypePK")%>'

 

 

 

Height="20px" ImageUrl="~/Images/check-template.png" onclick="imgCheck_Click"

 

 

 

ToolTip="Check Image" Width="30px"/>

 

 

 

</ItemTemplate>

 

 

 

<HeaderStyle Width="40px" />

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridBoundColumn DataField="TXNORDER" HeaderButtonType="TextButton"

 

 

 

HeaderText="Transaction#" SortExpression="TXNORDER"

 

 

 

UniqueName="TXNORDER" Visible="False">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="ItemTypePK" HeaderButtonType="TextButton"

 

 

 

HeaderText="Type" SortExpression="ItemTypePK" UniqueName="ItemTypePK">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD7" HeaderButtonType="TextButton"

 

 

 

HeaderText="Serial#" SortExpression="FIELD7" UniqueName="FIELD7">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD6" HeaderButtonType="TextButton"

 

 

 

HeaderText="P44" SortExpression="FIELD6" UniqueName="FIELD6">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD5" HeaderButtonType="TextButton"

 

 

 

HeaderText="Routing#" SortExpression="FIELD5" UniqueName="FIELD5">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD4" HeaderButtonType="TextButton"

 

 

 

HeaderText="AltSerial#" SortExpression="FIELD4" UniqueName="FIELD4">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD3" HeaderButtonType="TextButton"

 

 

 

HeaderText="Account#" SortExpression="FIELD3" UniqueName="FIELD3">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="FIELD2" HeaderButtonType="TextButton"

 

 

 

HeaderText="TC#" SortExpression="FIELD2" UniqueName="FIELD2">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="Amount" HeaderButtonType="TextButton"

 

 

 

HeaderText="Amount" SortExpression="Amount" UniqueName="Amount"

 

 

 

HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="left">

 

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

 

<ItemStyle CssClass="pad" HorizontalAlign="Right" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="CaptureImageKey" HeaderButtonType="TextButton"

 

 

 

HeaderText="CaptureImageKey" SortExpression="CaptureImageKey"

 

 

 

UniqueName="CaptureImageKey" Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="EnterpriseID" HeaderButtonType="TextButton"

 

 

 

HeaderText="EnterpriseID" SortExpression="EnterpriseID"

 

 

 

UniqueName="EnterpriseID" Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="ReverseReason" HeaderButtonType="TextButton"

 

 

 

HeaderText="ReverseReason" SortExpression="ReverseReason"

 

 

 

UniqueName="ReverseReason" Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</telerik:GridTableView>

 

 

 

</DetailTables>

 

 

 

<Columns>

 

 

 

 

<telerik:GridTemplateColumn HeaderStyle-Width="5px">

 

 

 

<ItemTemplate>

 

 

 

<asp:ImageButton ID="imgReverseTransaction" runat="server"

 

 

 

CausesValidation="false" Height="20px" Width="20px"

 

 

 

CommandArgument='<%#Eval("TXNORDER") + ","+Eval("EnterpriseID")+ ","+Eval("BankID")+ ","+Eval("BranchID")+ ","+Eval("BatchID")+ ","+Eval("OPENEDTIME") + ","+Eval("SourceTypePK")+ ","+Eval("AuxBatchID")%>'

 

 

 

CommandName="ReverseTransaction"

 

 

 

ImageUrl="~/Images/green-undo-icon.png" onclick="imgReverseTransaction_Click"

 

 

 

OnClientClick="javascript:return confirm('Are you sure? \n This action cannot be undone.')"

 

 

 

ToolTip="Reverse Transaction"

 

 

 

visible='<%#DataBinder.Eval(Container.DataItem,"ShowImgReverseTransaction")%>'/>

 

 

 

</ItemTemplate>

 

 

 

<HeaderStyle Width="30px" />

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridBoundColumn DataField="TXNORDER" HeaderButtonType="TextButton"

 

 

 

HeaderText="Transaction #" SortExpression="TXNORDER"

 

 

 

UniqueName="TXNORDER">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="CaptureStatus" HeaderButtonType="TextButton"

 

 

 

HeaderText="Capture Status" SortExpression="CaptureStatus">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="TRANSACTIONTIME" HeaderButtonType="TextButton"

 

 

 

HeaderText="Transaction Time" SortExpression="TRANSACTIONTIME">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="Amount" HeaderButtonType="TextButton"

 

 

 

HeaderText="Amount" SortExpression="Amount" UniqueName="Amount"

 

 

 

HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="left">

 

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

 

<ItemStyle CssClass="pad" HorizontalAlign="Center" />

 

 

 

</telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings>

 

 

 

<Scrolling AllowScroll="True" EnableVirtualScrollPaging="True" UseStaticHeaders="True"

 

 

 

SaveScrollPosition="True"></Scrolling>

 

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

 

 

 

 

</asp:Panel>

 

Pavlina
Telerik team
 answered on 28 Feb 2012
4 answers
98 views
Hello
I am using the following grid: http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/headerandfootertemplates/defaultcs.aspx .
Could you please tell me if the group header message ((Showing 1 of 2 items. Group continues on the next page.)) can be customized by my preferences?
Thank you
adi
Top achievements
Rank 1
 answered on 28 Feb 2012
2 answers
394 views
I've been trying to find a way to access the DataKey values for a detail table item in the ItemCreated event.  I need to be able to set the NavigateURL control to a javascript function using the DataKey values, but I'm having a hard time finding the correct syntax to access the items.  Is this possible?  Where should I be performing this action so I can set my NavigateURLs correctly?
Matt DiPietro
Top achievements
Rank 1
 answered on 28 Feb 2012
4 answers
111 views
Hi,

I have 2 RadNumericTextBox. One contains the weight in Kg and the other in Lbs. I have the event "onkeyup" on each controls that update the right RadNumericTextBox with the correct value. Example: if I write 100kg it will update the Lbs to 220.

My problem is that I use SpinButtons, so the "onkeyup" event is not raised. Can I add an "onclick" event on SpinButtons then I can call my "onkeyup" event?
Jocelyn
Top achievements
Rank 1
 answered on 28 Feb 2012
1 answer
65 views
Hello,
I was wondering if it's possible to pass in a custom string to get_html() in order to run the filters on what I pass in. Our project works with individual paragraphs (instead of entire content) so I'd like to push their html through the filters either by string or element reference. Preferably run all the enabled filters at the same time, or if that's not possible, call the getHtmlContent method on each filter.

Thanks
Rumen
Telerik team
 answered on 28 Feb 2012
1 answer
46 views
Hello!

When using IE9 and setting the enabled property of a NumericTextBox to false, a vertical scrollbar appears on the screen.

Setting the enabled property on a DatePicker also causes rendering problems.

Regards,
Günter
Galin
Telerik team
 answered on 28 Feb 2012
2 answers
109 views
HI,
I have installed a trial version of Sharepoint accelerator kit.
It was quite simple to configure spradgrid to sql server.
I have noticed that the filter doesnt work for arabic data. Is there any way for passing unicode characters?
Even the filter is case sensitive for English words.
How can we rename the column names as I have to rename the columns to arabic. My field names in the table are in English.
How can we proceed to purchase the software?

Hope to have an early feedback.
Tsvetoslav
Telerik team
 answered on 28 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?