Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
238 views
Hello,
I need to use tree view to dsipaly the category structure in my web applicaion. I want the user to change the order of categories in the same level.
Example:
                        Accessories
                        ....Business Gifts
                        Apparel
                        ....Hats
                        ....shirts
                        ....Jackets


This is my category structure. If i try with telerik treeview it allows me to drag the Hats category and place it under accessories. but  my requiremnet is i should be able to change only the position of hats, shirts and Jackets(categories of same level in a catategory) and should not allow to change the category structure across different categories.
can any one help on this

Regards,
Parvati


Mr. Plinko
Top achievements
Rank 1
 answered on 04 Aug 2009
2 answers
304 views
Hi,
I am using radgrid which has two colum with radnumerictextbox . When i click the add new record i use the code block to find the radnumerictextbox after the finding i  add OnKeyPress Attributes to boxes .

     if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
            {  
                if (e.Item.OwnerTableView.IsItemInserted)  
                {  
                    //item is about to be inserted  
                    GridEditableItem dataItem = (GridEditableItem)e.Item;  
                    RadNumericTextBox rntBorc = (RadNumericTextBox)dataItem.FindControl("tbBorc");  
                    RadNumericTextBox rntAlacak = (RadNumericTextBox)dataItem.FindControl("tbAlacak");  
                    rntBorc.Value = 0.00;  
                    rntAlacak.Value = 0.00;  
 
                    if (rntBorc != null)  
                    {  
                        rntBorc.Attributes.Add("onKeyPress", "return onKeyPressBorcInsert('" + rntBorc.ClientID + "', '" + rntAlacak.ClientID + "');");    
                    }    
                      
                    if (rntAlacak != null)  
                    {  
                        rntAlacak.Attributes.Add("OnKeyPress", "return onKeyPressAlacakInsert('" + rntBorc.ClientID + "', '" + rntAlacak.ClientID + "');");  
                    }  
                }  
} 

function onKeyPressBorcInsert(rntBorcClientID, rntAlacakClientID)   
{       
 
}  
 
function onKeyPressAlacakInsert(rntBorcClientID, rntAlacakClientID)   
{       
 
}  
      

The Code Block above  working good .

But i want to add OnKeyPress attributes like this

rntBorc.Attributes.Add("onKeyPress", "return onKeyPressBorcInsert('" + rntBorc.ClientID + "', '" + rntAlacak.ClientID + "',event);");

function onKeyPressBorcInsert(rntBorcClientID, rntAlacakClientID,eventArgs)   
{       
var x =  eventArgs.get_inputText();
}
because i want to get character user enter ..

but the code is not working  . How can i do this ??

can take OnKeyyPress function 3 arguments or more ??






fatih ak
Top achievements
Rank 1
 answered on 04 Aug 2009
2 answers
262 views
I have been trying to use the new GridBinaryImageColumn to display data in an Oracle table. After a few days of trying different things, I finally have it doing the inserts. I pretty much have to do the inserts manually as no matter how I tried I couldn't get the declaritve methods to work. My problem now is displaying the image in the grid column, the data is in the table, but the grid just displays it as a broken image, I guess it doesn't like the way Oracle returns the binary data (I have it stored in a BLOB column). I guess I need to know what I need to do, to get it to display the image correctly.

Here is the relevant part of the .aspx page:
<asp:ObjectDataSource ID="IssueScreenshotsDataSource" runat="server" TypeName="IssuesDataAccess" 
        DeleteMethod="DeleteIssueScreenshot" OldValuesParameterFormatString="original_{0}" 
        SelectMethod="GetIssueScreenshotsByIssueID">  
        <DeleteParameters> 
            <asp:Parameter Name="imageID" Type="Int32" /> 
        </DeleteParameters> 
        <SelectParameters> 
            <asp:Parameter Name="issueID" Type="Int32" /> 
        </SelectParameters> 
    </asp:ObjectDataSource> 

<
telerik:GridTableView DataKeyNames="imageID" DataSourceID="IssueScreenshotsDataSource" Width="100%" 
                    runat="server" CommandItemDisplay="Top" Name="Screenshots">  
                    <ParentTableRelation> 
                        <telerik:GridRelationFields DetailKeyField="issueID" MasterKeyField="issueId" /> 
                    </ParentTableRelation> 
                    <CommandItemSettings AddNewRecordText="Add A Screenshot" /> 
                    <Columns> 
                        <telerik:GridTemplateColumn HeaderText="Image Name" UniqueName="filename">  
                            <ItemTemplate> 
                                <asp:Label runat="server" ID="lblName" Text='<%# Eval("fileName") %>' /> 
                            </ItemTemplate> 
                            <EditItemTemplate> 
                                <telerik:RadTextBox runat="server" Width="200px" ID="txbName" Text='<%# Bind("fileName") %>' /> 
                                <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" runat="server" ControlToValidate="txbName" 
                                    ErrorMessage="Please, enter a name!" Display="Dynamic" SetFocusOnError="true" /> 
                            </EditItemTemplate> 
                            <HeaderStyle Width="30%" /> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridBinaryImageColumn DataField="data" HeaderText="Screenshot" UniqueName="screenshot" 
                            ImageAlign="NotSet" ImageHeight="60px" ImageWidth="60px" ResizeMode="Fit">  
                        </telerik:GridBinaryImageColumn> 
                        <telerik:GridButtonColumn ConfirmText="Are you sure you wish to delete this Screenshot?" 
                            ButtonType="imageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn1">  
                            <ItemStyle HorizontalAlign="Center" /> 
                        </telerik:GridButtonColumn> 
                    </Columns> 
                </telerik:GridTableView> 
The select method returns a DataSet from an Oracle procedure:
PROCEDURE APPS_ISSUE_GET_SCRNSHOT_BY_FK (  
   p_issue_id   IN       NUMBER,  
   cur_out      OUT      sys_refcursor  
)  
IS 
BEGIN 
   OPEN cur_out FOR 
      SELECT image_id imageID, issue_id issueID, file_data data,  
             file_name fileName  
        FROM apps_issue_screenshots  
       WHERE (issue_id = p_issue_id);  
END; 
Kyle Koss
Top achievements
Rank 1
 answered on 04 Aug 2009
3 answers
410 views
Hi
I am using telerik grid and data is bound programatically to the grid.
When i allow grouping in the client side and drag and drop columns to group it throws the error shown beolw (even after setting the groupby expressions for the columns).Please find the code to populate grid and the apsx content at the end of the mail.

Expression cannot be null or empty

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: Telerik.Web.UI.GridGroupByException: Expression cannot be null or empty

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:

[GridGroupByException: Expression cannot be null or empty]
   Telerik.Web.UI.GridGroupByExpression.SetExpression(String expression) +99
   Telerik.Web.UI.GridGroupByExpression.set_Expression(String value) +29
   Telerik.Web.UI.GridGroupByExpression..ctor(GridColumn column) +305
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +6231
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433


ASPX Content of grid:

 

<telerik:RadGrid ID="RadGrid1" runat="server"

 

 

    AllowCustomPaging="True"

 

 

    AutoGenerateColumns="False"

 

 

    AllowPaging="True"

 

 

    AllowFilteringByColumn="True"

 

 

    AllowSorting="True"

 

 

    GridLines="None"

 

 

    ShowGroupPanel="True" 
    GroupingEnabled="True"

 

 

    ongridexporting="RadGrid1_GridExporting1"

 

 

    onpdfexporting="RadGrid1_PdfExporting"

 

 

    onpageindexchanged="RadGrid1_PageIndexChanged1"

 

 

    ongroupschanging="RadGrid1_GroupsChanging" onneeddatasource="RadGrid1_NeedDataSource">

 

<

 

MasterTableView>

 

<

 

RowIndicatorColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

RowIndicatorColumn>

 

</

 

MasterTableView>

 

<

 

ClientSettings AllowDragToGroup="true">
</
ClientSettings>

 

<

 

PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="True" />

 

<

 

FilterMenu EnableTheming="True">

 

<

 

CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

</

 

FilterMenu>

 

 

</telerik:RadGrid>

Code:

public

 

void PopulateGrid()

 

{

 

DataSet ds = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM abc", "server=10.100.111.11;database=abcd;Uid=aa;pwd=aa;");

 

adapter.Fill(ds);


foreach
(DataColumn col in ds.Tables[0].Columns)

 

{

 

    GridBoundColumn gridboundcolumn = new GridBoundColumn();

 

    gridboundcolumn.DataField = col.ColumnName;

    gridboundcolumn.HeaderText = col.ColumnName

;

 

    gridboundcolumn.UniqueName = col.ColumnName;

    gridboundcolumn.SortExpression = col.ColumnName;

    gridboundcolumn.Display =

true;

 

    gridboundcolumn.Groupable =

true;

 

    gridboundcolumn.GroupByExpression = gridboundcolumn.GetDefaultGroupByExpression();

    RadGrid1.Columns.Add(gridboundcolumn);

}

RadGrid1.VirtualItemCount = 2000;

 

RadGrid1.DataBind();

 

}

Arnold Smith
Top achievements
Rank 1
 answered on 04 Aug 2009
4 answers
218 views
I tried to find out any available event in server or client sides which will be fired in out-of-band (AJAX) when user modifies any cell value and move out the cell. So the new value can be validated in server side and also it could change the value on other cell or change the dropdown list on other column according to the new value.
Virendra
Top achievements
Rank 1
 answered on 04 Aug 2009
2 answers
54 views
These are my issues;

1) How to change the color of Filter Button Icon (Preferably Red), if filter is on that column.
Reset the Column Filter Button Icon to original color such as this Telerik Example: (grid/examples/generalfeatures/filtering/defaultvb.aspx) if NoFilter is selected from Drop down List of that column. Can this option be done with Multiple Columns?

2) Export all columns from Master Table View into Excel/Word/CSV.  Telerik Example ( Live Demos/grid/examples/dataediting/templateformupdate/defaultvb.aspx). I would like to export all columns of the SQL data source of radgrid (visible/Invisible Columns) with following flexibilites (Current RadGrid Selected Row/All Rows from that Page/All rows from RadGrid).

3) Implementing Export Data to PDF. Telerik Example (grid/examples/generalfeatures/exporting/defaultvb.aspx).I looked at example (grid/examples/generalfeatures/pdfexport/defaultvb.aspx), I feel it is little complex to understand. Can this functionality be run from (grid/examples/generalfeatures/exporting/defaultvb.aspx) which I am trying to implement in my project with adding a now Command Button to run (Export to PdF).

4) Printing (Current RadGrid Selected Row/All Rows from that Page/All rows from RadGrid). Again I would like to all columns of the SQL data source of radgrid (visible/Invisible Columns) should be in the Printout.

I am learning, my biggest problem is that I am overwhelmed with the Flexibilities when I run demo of Telerik Products, thus some time I mixed Apple/Oranges.

Thanks for your help.

Ghulam





Martin
Telerik team
 answered on 04 Aug 2009
1 answer
110 views
Hello Sir

In my Radgrid one column contains date , i want to filter out the data yearly means if i enter the year 2008 then it will automatically search the record of year 2008.

and IInd is
In my Radgrid one column contains Cost , it contains the amount 3000.00 format ,, if i enter the value text format then it will give the error .. Is it possible to validate to users enters only Number format data .....


How to achieve this above two functionality ??


How to customize the Date  ? How to seach data yearly ?


Its urgent.....................................

Thanks
Regard
Rahul

Schlurk
Top achievements
Rank 2
 answered on 04 Aug 2009
6 answers
195 views
I have a page that I have 2 RadUpload controls on, and they work and display fine with IE 7/FF 3.5, however with Safari I only see the first upload control, while the second one is not displayed. Any help would be greatly appreciated.
Nolan
Top achievements
Rank 1
 answered on 04 Aug 2009
1 answer
106 views
I must be missing something. I have a registered copy of RadControls for Asp.Net. All the controls *except* the radlistbox appear in my toolbox. WHen I try to add a tag like:

<

 

telerik:RadListBox ID="RadListBox1" runat="server" Height="200px" />

 


It doesn't recognize it.
Is there a secret handshake or something I need to know about to make this thing appear?
THanks ... Ed
Kamen Bundev
Telerik team
 answered on 04 Aug 2009
3 answers
251 views
Ok, so I have a page that sets visibleonpageload for a radwindow to true in the codebehind after a button click.

This works fine so long as the window is closed by the exit button in the top right.

But if I close the window by using the client side functionality   like this.

        function GetRadWindow() {  
            var oWindow = null;  
            if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog  
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)  
            return oWindow;  
        }  
        function returnArg(arg) {  
            var oWnd = GetRadWindow();  
            if (oWnd) {  
                oWnd.close(arg);  
            }  
            else {  
                alert('oWnD Null');  
            }  
        }  
            


after this I can't get the visibleonpageload = true to work.  the page reloads on button click, but doesn't show the window.
Blasty
Top achievements
Rank 1
 answered on 04 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?