Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
63 views
Hi All,
           I have used <asp:TreeView> tag for treeview, and i have set SelectedNodeStyle & NodeStyle Property such like has shown in below code 

<asp:TreeView ID="TreeView1" ShowLines="false" ShowExpandCollapse="true" runat="server" 
            Height="330px" ExpandDepth="10" CssClass="Normal" ForeColor="#585880" Font-Size="10px"
            Font-Names="Verdana" NodeIndent="10" EnableClientScript="true" onclick="javascript:call();">
            <SelectedNodeStyle CssClass="treeStyleNodeSelect" ImageUrl="~/Images/leaf.gif"/>            
            <NodeStyle CssClass="treeStyleNode"  ImageUrl="~/Images/leaf.gif"/>
</asp:TreeView>

                     Now When I click on TreeNode Image To select the TreeNode ,then that TreeNode Image Highlighted ,but then when we select another TreeNode Previous TreeNode Image also Remain Highlighted such like has Shown in Image Select.jpg


                           So What Can I do to Solve This Problem Please Replay me.
Plamen
Telerik team
 answered on 04 Jul 2011
1 answer
156 views
Hi All,
         I have  used <asp:TreeView> tag for treeview, and i have set  SelectedNodeStyle & NodeStyle Property such like has shown in below code
<asp:TreeView ID="TreeView1" ShowLines="false" ShowExpandCollapse="true" runat="server" 
            Height="330px" ExpandDepth="10" CssClass="Normal" ForeColor="#585880" 
            Font-Size="10px"  Font-Names="Verdana" NodeIndent="10" 
             EnableClientScript="true">
            <SelectedNodeStyle CssClass="treeStyleNodeSelect" ImageUrl="~/Images/leaf.gif"/>            
            <NodeStyle CssClass="treeStyleNode"  ImageUrl="~/Images/leaf.gif"/>
</asp:TreeView>

                    then  I have generated Treenodes using server side code in c# ,  at that time i  have set cssclass for Particular Treenode which Highlighted such like has shown in  First select Image. after that i don't want to execute server side code 
so when first time Web Form Load that Particular Node Highlighted such like has shown in  First select Image.

                    Now I selecte another TreeNode at that time that TreeNode HighLghted but Previosly selected TreeNode also Remain Highlighted as Shown in Secend select Image ,Previous TreeNode Remain Highlighted since it's CssClass Property setting in server side code , and next time i don't want to execute server side code,

                        So what can i do to solve this problem , give me reply  please 




Plamen
Telerik team
 answered on 04 Jul 2011
2 answers
101 views
Hi , i use Telerik 2009 Q3.

i want to Set Cursor : hand for my Menu. And if it is possible for those items that they have NavigateURL != "#"
But every ways that i tried before, make Cursor : Hand just in IE and not in chrome and firefox.

Can u plase help me to set it hand for all active menuitems and in all browsers.
Thanks in advance.
Armin
Top achievements
Rank 1
 answered on 04 Jul 2011
1 answer
123 views
In our environment, we have an AppSequenceNumber table which maintains the next sequence number or primary key for the next insert of each table in the database, and a stored procedure that returns the sequence number and increments it in the database. Therefore, on each record insert for each of our tables, we must call this stored procedure which updates the AppSequenceNumber table and returns the sequence number which we use as our primary key in the record insert. 

In my application, I am using a popup modal window to handle inserts. How do I capture the submit button click event on this form and call the needed stored procedure to update the database sequence number, insert the sequence number as the primary key, and perform the insert?

I am basing my application on the example at: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultvb.aspx?product=window

Your help is greatly appreciated.
Thank you.

    Chuck 
Tsvetoslav
Telerik team
 answered on 04 Jul 2011
1 answer
191 views
Code of .aspx Page

<telerik:RadGrid ID="RadGrid2" runat="server" OnItemDataBound="RadGrid2_ItemDataBound">
                    <MasterTableView ClientDataKeyNames="ID">
                        <Columns>
                            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" Visible="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Rights" HeaderText="Rights">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings>
                        <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>
                    </ClientSettings>
                </telerik:RadGrid>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AasthaaERP %>"
                    SelectCommand="SELECT * FROM [rights]"></asp:SqlDataSource>
                <telerik:RadContextMenu ID="RadMenu1" runat="server" EnableRoundedCorners="true"
                    EnableShadows="true" OnItemClick="RadMenu1_ItemClick" Style="top: 544px; left: 548px">
                    <Items>
                        <telerik:RadMenuItem Text="Edit" ImageUrl="1303455785_pencil.png" />
                        <telerik:RadMenuItem Text="Delete" ImageUrl="1303455790_delete.png" />
                    </Items>
                </telerik:RadContextMenu>
 
 
Code of .aspx.cs Page:
 
On Page Load
string qrySearch = "Select * From Rights Where ID = '" + RadComboBox1.SelectedValue + "'";
        ds = obj.SelectQuery(qrySearch);
        RadGrid2.DataSource = ds;
        RadGrid2.DataBind();
 
 protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
    {
        foreach (GridDataItem item in RadGrid2.MasterTableView.Items)
        {
            if (item.Selected)
            {
 
                strtxt = item["ID"].Text.ToString();
                Session["EditID"] = strtxt;
 
            }
 
        }
}



It will Gives Following Error if I Try to Programmatically RadGrid..And Works well if I apply Datasource Directly..

System.IndexOutOfRangeException was unhandled by user code
  Message=There is no row at position 0.
  Source=System.Data
  StackTrace:
       at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex)
       at System.Data.DataRowCollection.get_Item(Int32 index)
       at rights.RadMenu1_ItemClick(Object sender, RadMenuEventArgs e) in d:\Sharing\AasthaaERP\rights.aspx.cs:line 106
       at Telerik.Web.UI.RadMenu.RaiseMenuItemEvent(Object eventKey, RadMenuEventArgs e)
       at Telerik.Web.UI.RadMenu.OnItemClick(RadMenuEventArgs e)
       at Telerik.Web.UI.RadMenu.RaiseItemClick(ControlItem item)
       at Telerik.Web.UI.RadMenu.RaisePostBackEvent(String nodeIndex)
       at Telerik.Web.UI.RadMenu.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String nodeIndex)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException:



How to Slve This Error..Please Guide
Shinu
Top achievements
Rank 2
 answered on 04 Jul 2011
2 answers
50 views
Hello,

I would like to make a page which content will change based on some criteria. For example the page will have a dropdown list and when the user selects the value "1" the page will contain a raddatetimepicker and a textbox. Or when the user selects the value "2" from the dropdown list,the page will contain 3 textboxes and 3 labels.

Could you please help me on that?Which approach should i use?

Regards,
Peny
Peny
Top achievements
Rank 1
 answered on 04 Jul 2011
4 answers
140 views
Hello,

I can easily display a radalert dialog from my C# codebehind with the following line of code:

RadAjaxManager1.ResponseScripts.Add(@"radalert('Record already exists.', 225, 110);"); 

I assumed that working with the confirm and prompt dialogs would be similar, so I tried the following:

RadAjaxManager1.ResponseScripts.Add(@"radprompt('Are you sure?', promptCallBackFn;"); 

But I cannot get the radprompt to even display (at this point I am only concerned with displaying the prompt). Am I wrong in assuming that I can treat these dialogs identically?

Thanks,
Marin Bratanov
Telerik team
 answered on 04 Jul 2011
3 answers
143 views
Hi All,

I'm able to use bordersize="0" on a splitter to make the outer borders disappear.  But inside that there is a sliding pane that I want to have a 1px border around - otherwise it looks kind of weird.  I can do that via some CSS as per examples in this forum however if I had a second sliding pane on that page the CSS would apply to that as well even if I didn't want it.

I'm about to look into if I can incorporate some form of id based selection into the CSS tag but beyond that is there a way yet to set the borders within the slidingpane's tag?

EDIT:
Trying out the instance based CSS doesn't work - perhaps because the ID isn't what you specify in the CSS but rather made up from the parent splitter name too or maybe because my CSS is so rusty!  The CSS I tried is shown below:

#Radslidingpane4 .RadSplitter .rspSlidePane .rspSlideContainer
{
    border:solid 1px black;       
}




Regards.

Jon
Marin Bratanov
Telerik team
 answered on 04 Jul 2011
6 answers
482 views
I'm using the MultipleFileSelection="Automatic" in AsyncUpload  (trail of 2010 Q2) to ensure multiple files can be uploaded. Everything goes well with the uploading of multiple files, but when I write the following code in the Button click event of my form I get an IOException (File Could not find file 'C:\{app dir}\App_Data\RadUploadTemp\3yvza1nr.zhh'.):

            foreach (UploadedFile file in AsyncUpload1.UploadedFiles)
            {
                business.AddPhto(file.InputStream);
            }


The weird thing is that I can see that temporary files are deleted when the postback happends. Sometimes all files are gone, sometimes all the files are there.
My question is: How do I use the uploaded files and what should I do to prevent deletion of temporary files before I have the chance to handle them.

Kind regards,

Michel
Peter Filipov
Telerik team
 answered on 04 Jul 2011
1 answer
83 views
Have a need to make a one section of pageview persist over the child tabs clicks.  For example; have a tab named Other Info.  With in that tab there are 3 sub tabs.  There is common info across all of the sub tabs.  Any ideas on how to get this to work?
Plamen
Telerik team
 answered on 04 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?