Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
372 views
Hi all,
i have a hierarchical grid,   i m using Command itemtemplate to show end user add ,edit ,delete,e.t.c . (not as columns inside grid)  if i try to export hierarchical grid to excel sheet  it is exporting add,edit, including with images(items included inside Command item template ). but i don't want to show all those options in XLS. how can i overcome this problem .

Anyhelp
sudheer
Top achievements
Rank 2
 answered on 16 Feb 2009
4 answers
441 views
I have been struggling with this for a few days now... I'm a .net newbie :-)
Namespaces, classes etc. is not one of my best areas...

I have implemented the RadEditor in my existing home-made CMS tool and it's now working as expected when editing content in my SQL server database. Now, I would like to be able to upload- and insert images stored in the database but I have some difficulties to accomplish that.

I have created the "Items" table and imported the sample data in my database.

Maybe it's a really stupid question, but how do I combine the two demo examples ("Save in database", http://demos.telerik.com/aspnet-ajax/Editor/Examples/SaveInDatabase/DefaultVB.aspx and "Db file browser Content provider" http://demos.telerik.com/aspnet-ajax/Editor/Examples/DBFileBrowserContentProvider/DefaultVB.aspx) into the same .aspx file?

Should the two "sample-code-behind" be merged somehow?

Lini
Telerik team
 answered on 16 Feb 2009
1 answer
217 views
I have a problem with the tooltip control. I use it in a div that have css overflow:auto;
When I scroll down in the div the tooltips shows correcty everytime until I get "of screen" (the total screen height is exceded or something)
If I scroll down to the bottom the div the tooltip show up where i got "of screen". And not relative to the element I click on.

Its working in Internet Explorer but not in any other browser. Anything I can do or do I have to wait for a new version? If you understand my problem...
Tervel
Telerik team
 answered on 16 Feb 2009
1 answer
157 views
Hi,

I am using tooltip for the image buttons of Edit and Delete.

I am enabling /disabling the imagingbuttons on the basis of certain test cases.

My tooltip does not show up when the imagebutton is disabled in IE, but it shows up in FF,Chrome.

Please help,

Thanks,

Nirav.
Tervel
Telerik team
 answered on 16 Feb 2009
2 answers
98 views
I have created a class that builds a custom grid object (StandardGrid).  In addition to that I have created a user control that I want to insert into the FilteringItem of the grid object.  When the user clicks on the button inside the user control I want to perform an action on the grid.  I'm not sure how to hook things up properly.  Here's what I currently have happening.  The GridFilterButton (user control) inserts fine into the grid initially but then isn't available on postback.  Any help would be appreciated.

 

 

 

void StandardGrid_ItemCreated(object sender, GridItemEventArgs e)

{

 

switch (e.Item.ItemType)

{

 

case

 

 

GridItemType.FilteringItem:

 

GridFilteringItem filteringItem = e.Item as GridFilteringItem;


try 
 

 

 

{

 

//Insert the GridFilterButton @ position 0 in the Grid

 

Control GridFilterButton = this.Page.LoadControl("~\\UserControls\\GridFilterButton.ascx");

filteringItem[

"CommandColumn"].Controls.AddAt(0, GridFilterButton);

 

 

 

 

 

 

Sebastian
Telerik team
 answered on 16 Feb 2009
1 answer
209 views
hello,
i have a little problem when before exporting to excel i have to rebind my radgrid. The result is that i need to click 2 times on the "Export to Excel" button, and i can't hide the "CommandItem"
(gridBooth.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None)
because if i do this the "Export to Excel" button disappears...
in this way in my excel i see the icons for exporting...

how can i bypass the second click??
this is my code...
 protected void btnExportXLS_Click(object sender, EventArgs e)
        {
            _stand.GetAll();

            FormatColumnsForExport();

            gridBooth.Rebind();

            gridBooth.ExportSettings.ExportOnlyData = false;
            gridBooth.ExportSettings.IgnorePaging = true;
            //gridBooth.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;
            gridBooth.ExportSettings.FileName = "ExportStands.xcl";
            gridBooth.ExportSettings.OpenInNewWindow = true;
            gridBooth.MasterTableView.ExportToExcel();
        }

        private void FormatColumnsForExport()
        {
            foreach (GridColumn col in gridBooth.MasterTableView.Columns)
                gridBooth.MasterTableView.Columns.FindByUniqueName(col.UniqueName).Visible = true;

            gridBooth.MasterTableView.Columns.FindByUniqueName("Espositore").Visible = false;
            gridBooth.MasterTableView.Columns.FindByUniqueName("statusimg").Visible = false;

        }

ascx:
<telerik:RadGrid ID="gridBooth" runat="server" AllowPaging="True" AllowCustomPaging="True"
                AllowSorting="True" AutoGenerateColumns="False" GridLines="None"  EnableAJAX="true"
                OnNeedDataSource="gridBooth_NeedDataSource"  OnSortCommand="RadGrid1_SortCommand"
                OnPageIndexChanged="gridBooth_PageIndexChanged" Height="500px"
                                onitemcreated="gridBooth_ItemCreated" Skin="Vista"
                onexcelexportcellformatting="gridBooth_ExcelExportCellFormatting">
                <PagerStyle Mode="NextPrevAndNumeric" />
                
                   <MasterTableView CommandItemDisplay="Top">
                   <CommandItemTemplate>
                        <table width="100%" cellpadding=2 cellspacing=2 border=0>
                       <tr>
                           <td class="normal" width="25%" align=center><asp:LinkButton ID="btnExportXLS" runat=server CausesValidation=false OnClick="btnExportXLS_Click"><img src="/images/xls.jpg" border=0 />&nbsp;Totale</asp:LinkButton></td>
                           <td class="normal" width="25%" align=center><asp:LinkButton ID="btnExportXLS_Filtered" runat=server CausesValidation=false  OnClick="btnExportXLS_Filter"><img src="/images/xls.jpg" border=0 />&nbsp;Filtrati</asp:LinkButton></td>
                           <td class="normal" width="25%" align=center><asp:LinkButton ID="btnExportCSV" runat=server CausesValidation=false OnClick="btnExportCSV_Click">CSV Totale</asp:LinkButton></td>
                           <td class="normal" width="25%" align=center><asp:LinkButton ID="btnExportCSV_Filtered" runat=server CausesValidation=false OnClick="btnExportCSV_Filter">CSV Filtrati</asp:LinkButton></td>                       
                       </tr>
                       </table>
                    </CommandItemTemplate>

                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn AllowFiltering="False" DataField="HallName" EmptyDataText="&amp;nbsp;"
                            HeaderText="Pad." UniqueName="HallName">
                        </telerik:GridBoundColumn>
                        
                        <telerik:GridBoundColumn DataField="Name" EmptyDataText="-" HeaderText="Stand"
                            UniqueName="Name">
                        </telerik:GridBoundColumn>
                        
                        <telerik:GridTemplateColumn DataField="Quality" HeaderText="Qualità" UniqueName="Quality"
                        SortExpression="Quality">
                        <ItemTemplate>
                            <%# GetQuality(DataBinder.Eval(Container.DataItem, "Quality"))%>
                        </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        
                        <telerik:GridBoundColumn DataField="Mq" EmptyDataText="-;" HeaderText="Mq"
                            UniqueName="Mq">
                        </telerik:GridBoundColumn>
                        
                        <telerik:GridTemplateColumn DataField="CompanyName" HeaderText="Espositore" UniqueName="Espositore"
                        SortExpression="CompanyName">
                        <ItemTemplate>
                            <%# GetEspositoreLink(DataBinder.Eval(Container.DataItem, "CompanyName"), DataBinder.Eval(Container.DataItem, "BookerId"))%>
                        </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        
                        <telerik:GridBoundColumn DataField="CompanyName" EmptyDataText="-" visible=false HeaderText="Espositore"
                        UniqueName="EspositoreData">
                        </telerik:GridBoundColumn>                      
                        
                        <telerik:GridTemplateColumn DataField="CreationDate" HeaderText="Data Pren." UniqueName="CreationDate"
                        SortExpression="CreationDate">
                        <ItemTemplate>
                            <%# GetData(Container.DataItem)%>
                        </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        
                        <telerik:GridBoundColumn DataField="ExpireDate" EmptyDataText="-" HeaderText="Scadenza"
                            UniqueName="ExpireDate">
                        </telerik:GridBoundColumn>
                        
                        <telerik:GridTemplateColumn DataField="ProductId" HeaderText="Tipo"
                        UniqueName="ProductId" SortExpression="ProductId">
                        <ItemTemplate>
                            <%# GetProductName(DataBinder.Eval(Container.DataItem, "ProductId"))%>
                        </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        
                        <telerik:GridBoundColumn DataField="Price"  EmptyDataText="0" HeaderText="Prezzo"
                            UniqueName="Price">
                        </telerik:GridBoundColumn>
                        
                        <telerik:GridBoundColumn DataField="Discount" EmptyDataText="0" HeaderText="Sconto"
                            UniqueName="Discount">
                        </telerik:GridBoundColumn>
                        
                        <telerik:GridTemplateColumn DataField="Status" HeaderText="Stato" UniqueName="statusimg"
                        SortExpression="Status">
                        <ItemTemplate>
                            <%# GetStatusImages(DataBinder.Eval(Container.DataItem, "Status"))%>
                        </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        
                        <telerik:GridTemplateColumn DataField="Status" visible=false UniqueName="statustext" HeaderText="Stato">
                        <ItemTemplate>
                            <%# GetStatusText(DataBinder.Eval(Container.DataItem, "Status"))%>
                        </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        
                        <telerik:GridBoundColumn DataField="EventName" EmptyDataText="&amp;nbsp;" HeaderText="Evento"
                            UniqueName="EventName">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowColumnsReorder="True">
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                </ClientSettings>
                <FilterMenu EnableTheming="True">
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                </FilterMenu>
                <sortingsettings sorttooltip="Clicca per ordinare" />
            </telerik:RadGrid>




Tsvetoslav
Telerik team
 answered on 16 Feb 2009
3 answers
405 views
I have a page with a search textbox and a grid.
As the user types into the textbox i want to display the results in the grid based on the value in the textbox.

I have hooked up the onkeyup event for the textbox to do a postback.

My code is:

aspx:

<

script>

function

movetoend()

 

{

 

var range = document.selection.createRange();

 

range.moveStart(

"textedit");

 

range.select();

}

 

 

</script>

 


 

<telerik:RadTextBox ID="RadTextBoxName" runat="server" TabIndex="1" onfocus="movetoend()"

 

 

OnTextChanged="RadTextBoxName_OnTextChanged">

 

 

</telerik:RadTextBox>

aspx.cs code:

 

protected

void Page_Load(object sender, EventArgs e)

 

{

 

if (!Page.IsPostBack)

 

 

{

 

RadTextBoxName.Attributes.Add(

"onkeyup", "setTimeout('__doPostBack(\\'" + RadTextBoxName.ClientID.Replace("_", "$") + "\\',\\'\\')', 0);");
}

 

 

}

 

 

 

protected

void RadTextBoxName_OnTextChanged(object sender, EventArgs args)

 

{

soNameSearch(RadTextBoxName.Text);

RadTextBoxName.Focus();

}

 


The problem is with the postback there is a page flash each time the grid reloads.
How can i avoid the page flash?

Can you guide me towards the right approach to achieve the desired functionality?

Yavor
Telerik team
 answered on 16 Feb 2009
3 answers
110 views
Hi there,

I have just begun using telerik controls and have been very successful up to this point...with the help of your excellent support pages.

RadGrid1(RG#) posts user data (upon row selection) to the following RadComboBox(RCB) and updates the following RadGrid2(RG#) with data pertaining to that selection.

I am using asp:CheckBox to evaluate the current check box selections in RG2 to then filter the possible data elements in RG3.

Successfully, I used the RCB to alter the data elements in RG2, by changing the selection in the RCB you'll subsequently notice the possible values available in RG2. I have not been so fortunate with the CheckBox...thus far.

I try to populate RG3 in the same way as I did using the RCB, but I continually get an error stating "SelectedValue is read only", but it worked for the RCB to RG2, so I assumed it was translatable.

The first, snippet is of RCB to RG using a method FillFacility to fill RG2. The second, is how I have been trying to populate RG3 with check box selections. The check all, one, or none works fine in RG2 check box column item selection, but does not post values to RG3 or allow the attempt, because of the error.

 
        Me.rcbSite.SelectedValue = DR("SiteID")  
        Me.FillFacility(Convert.ToInt32(DR("SiteID")))  
        'Here is the problem I think  
        Me.RG2.SelectedValues = DR("FacilityID")  
        Me.FillDepartment(Convert.ToInt32(DR("FacilityID")))  
 
   

I appreciate any and all help.

Cheers,

-Ryan
Yavor
Telerik team
 answered on 16 Feb 2009
1 answer
419 views
I have added a rad grid, and added a property AllowMultiRowSelection="true". 
In my case I want to select the row onclick event of row and again click of the same row it should be deselect at client side.
In current situation it does not happen it can not deselect the selected row.  

Thanks,
Jalps
Shinu
Top achievements
Rank 2
 answered on 16 Feb 2009
1 answer
129 views

Hi -

I created a context menu completely on the server side (with code below). Now I need to add the click events (Edit and Delete) to open a rad window to a new url and have no idea how to do this.

Can anyone help!!

Thanks in advance


Dim

 

editMenu As New RadContextMenu

 

editMenu.ID =

"editMenu"

 

editMenu.Attributes(

"style") = "top: 65px; left: 10px"

 

editMenu.Skin =

"Vista"

 

 

Dim editZone As New Telerik.Web.UI.ContextMenuControlTarget

 

editZone.ControlID =

"contextElement"

 

editMenu.Targets.Add(editZone)

editMenu.CollapseAnimation.Type = AnimationType.OutQuint

editMenu.CollapseAnimation.Duration = 200

 

Dim itemEdit As New RadMenuItem

 

itemEdit.Text =

"Edit"

 

editMenu.Items.Add(itemEdit)

Controls.Add(editMenu)

 

Dim itemDelete As New RadMenuItem

 

itemDelete.Text =

"Delete"

 

editMenu.Items.Add(itemDelete)

Controls.Add(editMenu)

Princy
Top achievements
Rank 2
 answered on 16 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?