|
I am sorry, my last reply was wrong. Here is how you do that.
1 - Goto tree view properties, choose "Nodes".
2 - Choose one node, and in the properties, make "SelectAction" to "Expand".
You are done.
|
|
|
|
|
Hi, I have the complex business object like: Ownership. Ownership object is collection of buisness objects, collection of person objects.
class Ownership
{
Collection<BusinessData> Businesses;
Collection<PersonData> Persons;
}
In the ASPX.cs Page_Load I am adding the business objects to Ownership object:
OwnerShip owners = new OwnerShip();
owners.Businesses.Add(new BusinessData("XX LLC", true, 0, 20, "pres", "", true)); XX LLC is business name.
owners.Businesses.Add(new BusinessData("YY LLP", false, 0, 20, "vice president", "", true));
In ASPx page it is like this:
<asp:GridView ID="gvOwners" runat="server" AutoGenerateColumns="False" Width="787px"
OnRowDataBound="gvOwners_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:DataList ID="BusinessPersonDataList" runat="server">
<ItemTemplate>
<%# ((BusinessDescriptionData)Container.DataItem).BusinessName %>
</ItemTemplate>
</asp:DataList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Now in the RowDatabound event of GridView, I want to bind one DataList with Business colection.(in another DataList I want to bind the Persons collection, I did not put the code for this part yet. First I am trying with the Busienss objects).
The RowDataBound event is like trhe below:
protected void gvOwners_RowDataBound(object sender, GridViewRowEventArgs e)
{
OwnerShip os = null;
GridViewRow r = e.Row;
if (r.DataItem != null) // Make sure we're not in the Header or Footer row
{
os = r.DataItem as OwnerShip;
}
DataList BPDataList = e.Row.FindControl("BusinessPersonDataList") as DataList;
if (BPDataList != null && os != null)
{
BPDataList.DataSource = os.Businesses;
BPDataList.DataBind();
}
}
When I run the page, I am not getting any results. The Gridview is not displaying anything. If I remove the RowDatabound event and in the page_load gvOwners.DataSource = owners.Businesses; I have not used the datalist in this example, just binded to one Label in Gridview. Then it is displaying the results.
I think the RowDatabound event is not firing. What is the problem in the above?
Thanks in advance.
|
|
|
|
|
You need to put break points and step into the code to know what's going wrong.
|
|
|
|
|
Hi,
Does anyone know how set the dropdown width of a HTML Select control in IE??
I want to have the dropdown width wider than the control.
It works ok in FireFox, Bill.
Malcolm
|
|
|
|
|
|
HOo does that affect the DROPDOWN WIDTH?
|
|
|
|
|
Can you post the your html code ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
<select id="Select1" style="width:120px;">
<option>options 1 </option>
<option>options 1 </option>
<option>options 1 </option>
<option>options 1 </option>
</select>
Check this one.
Give width in pixels its working in my machine.
Any issue with this ?
if then also you have any issue
do one thing for default selected option give space in it
<option> Select One </option>
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
You do not understand
I want to set the width of the list that drops down seperately
from the width of the control
So it displays all text
|
|
|
|
|
Still not understing the issue
Do you mean that drop down is having some options whose text is more than the width of control ? beacuse of it user can't see the whole text of the list ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
|
Hi all
I have an user control where I use Slider Extender from asp.net ajax control toolkit. This Control is loaded into update panel in the aspx page. When I drag the slider sometimes I get an error "htmlfile: Unspecified error" in ScriptResource.axd. This error occurs on the line
var clientRects = element.getClientRects();
This error is not repeatative too. Sometimes this error occurs. Has anyone come across this issue ? how can I resolve this? thanks in advance
|
|
|
|
|
I'm having trouble making a module for my app in which I am in an initial page, page1, which gives me the option to search for orders from a certain provider.
I select my provider in page1 and have a link, Search..., that opens a new page or window with orders from a that provider that I have selected in page1, displaying the orders on a gridview.
Afterwords I select the orders from this gridview that I wish to view and only return the ORDER_ID from those I have selected to my initial page, page1.
How can I do this?
VisualStudio 2005, visual basic, asp.net 2.0
|
|
|
|
|
If the information you are passing is not sensitive, pass it through query string. Pass the provider selected through query string to next page. When user selects orders, again supply that values to page1.
|
|
|
|
|
I have User Control ucParent, inside which I have User Control ucChild. I am trying to refer to the ucChild from ucParent, but I am not able to ? Any hints, ideas ?
BTW, if I have ucChild in an aspx page, I am able to refer it.
Thanks in advance !
|
|
|
|
|
Het2109 wrote: I have User Control ucParent, inside which I have User Control ucChild. I am trying to refer to the ucChild from ucParent, but I am not able to ?
It's not clear. What's the error you are getting ?
|
|
|
|
|
You asked a question, someone has given you reply now don't you think you should clear his doubts regarding your question?
Any way you can access that user control in your parent UC should not be a preblem ? Might be you have resolved the things
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
pls guys i need some sirious help
i have a master page & 2 content pages....
what am i trying to do is ...i just put some text in the textbox in one content page where the textbox is not in the content placeholder & i need those text to be viewed in another content page in the textbox which is in the content place holder
but i am failed to do so...
i use these code..........
ContentPlaceHolder Content;
TextBox mpTextBox;
Content =
(ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1");
if (Content != null)
{
mpTextBox =
(TextBox)Content.FindControl("TextBox1");
if (mpTextBox != null)
{
TextBox1.Text = mpTextBox.Text;
}
}
TextBox tet = (TextBox)Master.FindControl("TextBox1");
if (tet != null)
{
TextBox1.Text = "Master page label = " + tet.Text;
}
pls help me......
modified on Friday, July 11, 2008 2:56 AM
|
|
|
|
|
gora12345 wrote: where the textbox is not in the content placeholder
AFAIK, it should be inside the content place holder.
|
|
|
|
|
i need the textbox not in the content placeholder..
because that is a search textbox ....so i placed it in the master page out side pf contentplace holder.....otherwise i couldn't get the search textbox in every content page.....i think there is some solution....pls yaar..waiting for ur help
|
|
|
|
|
In a past job, I created a lot of reusable WinForms custom controls, and now I'm starting to create some reusable Web Controls (in VS 2005).
Is there an easier way than what's described in Microsoft's tutorial [^], and can we put more than one web control into a DLL?
|
|
|
|
|
yes. it is possible. I have an article on creating web controls. Check that
|
|
|
|
|
i have a asp.net form, i only have to show javascript alert with ok button after submiting the data to database, when user press ok it redirect to my home page.
thanks in advance.
|
|
|
|
|
I'm not sure if this is what you meant but...
Button.Attributes["onclick"] = "javascript:return confirm('Thank you for your submittion');";
Make sure you put that code in a place where a post back will occur otherwise the javascript won't get applied to the button onclick event.
I'm not sure but you may be able to code that directly in the html source, instead of the code behind.
Best of luck,
Cheers
Disgyza
Programmer Analyst
|
|
|
|
|
I am not sure that we can give alert msg after data submitted into database. But It is possible that when submitting the record like "Are you want to save the records".
Server side action is happened when you try to insert records into database. Why do you try the client side for that time?
Balasubramanian K.
|
|
|
|