|
I responded to your other post, but I'll post again for all to see:
Read the forum guidelines. These rules include:
1. Don't put "urgent" or "help" in your message titles. We are not on your time schedule and everyone here needs help.
2. Make your message titles meaningful.
3. We will help you with existing code, but you are probably not going to get anyone to write an entire program for you. But feel free to use Google.
4. Do not under any circumstances CROSSPOST.
______________________
stuff + cats = awesome
|
|
|
|
|
I think he needs to read this[^] article.
|
|
|
|
|
I skimmed through it and I'm glad it's out there. But considering half these people are not using GOOGLE I suspect that they won't take the time to read the guidelines. Now, if I wrote something like that, it would not be as polite...
______________________
stuff + cats = awesome
|
|
|
|
|
We can improve the world, one moron at a time.
|
|
|
|
|
I don't have time to use Google, It's Urgent, I need the answer now!!;P
only two letters away from being an asset
|
|
|
|
|
Hello,
I have been looking examples of how to create an A-Z grouped index page from a list of data. This index page will contain a hyperlinked list of letters of the alphabet a,b,c...z that link to HTML "a name" tags within the same page. These links will that point to the correct letter of the alphabet which will correspond to the correct alphabetically grouped subset of data. This is a common feature on many sites and I'm sure this problem has been solved many times, it just that I think I am searching using the wrong keywords. This solution would likely include some combination of repeaters and/or datalists, and possibly a custom pager.
My list currently contains about 1000 items that I pull from a SQL table. I'd like to only hit the database once to grab the list of data if possible.
This is hard to articulate, let me try to explain this with an example:
There is an A-Z index on the top of the page (and maybe on the bottom) like this:
A, B, C.....Z
(if a user clicks the C, they are redirected to the names in the list that start with a C
A
=
abc
abe
about
...
B
=
ball
barge
bat
...
C <-- user is directed here when they click on the C in the A-Z index above)
=
car
cat
cave
Thanks for the help,
Josh Blair
Golden, CO
|
|
|
|
|
You could do this in many ways. I suggest nested repeater controls. One repeater control get one record for each heading A, B, C. In each item template add another repearter with your details. That ought to be really easy, which part are you stuck on?
Really it should be quite simple. You can use HTML Tables, Repearter, GridView etc...
Here is a some sample code to create a dataset for you. I'm assuming you know how to get a dataTable from the database. You have to right write your own code for that.
<br />
DataSet ds = new DataSet();<br />
<br />
SqlParameter[] parameter = new SqlParameter[1];<br />
parameter[0] = new SqlParameter("@EffectiveDate", EffectiveDate);<br />
DataTable dtParent = UAIG.Data.DataClass.GetDataTable("dbo.uspGetMenuHeader", parameter);<br />
parameter[0] = new SqlParameter("@EffectiveDate", EffectiveDate);<br />
DataTable dtChildren = UAIG.Data.DataClass.GetDataTable("dbo.uspGetMenuDetail", parameter);<br />
dtParent.TableName = "dtParent";<br />
dtChildren.TableName = "dtChildren";<br />
ds.Tables.Add(dtParent);<br />
ds.Tables.Add(dtChildren);<br />
ds.Relations.Add("children", ds.Tables["dtParent"].Columns["MenuID"], ds.Tables["dtChildren"].Columns["MenuID"]);<br />
<br />
<br />
<br />
<br />
<br />
foreach (DataRow rParent in ds.Tables["dtParent"].Rows)<br />
{<br />
<br />
foreach (DataRow rChild in rParent.GetChildRows("children"))<br />
{<br />
}<br />
}
-- modified at 15:08 Monday 2nd July, 2007
I didn't get any requirements for the signature
|
|
|
|
|
Thanks for the reply.
I know I could iterate through my parent and child datatables but that seems like "brute force". I was hoping that there was a more elegant approach using built-in databinding. Or maybe way to configure 2 repeaters or datalists with a custom pager to accomplish this.
I will try the brute force method and see where I get. If anyone else has a another alternative, please let me know.
Cheers,
Josh Blair
|
|
|
|
|
If you want to use databinding, you can use the dataview object on each table.
BTW, iterating through a table is not "Brute Force". The controls inside the repeater should all be created dynamically. There isn't really much difference from iterating through a table or calling an objects databind method. Pretty much the same thing happens.
I didn't get any requirements for the signature
|
|
|
|
|
Hi,
How do I add a table to a gridview's row? I remember I did it like this ages ago, but I can't find my code any where. I have a property gridview, and I want to display basic property details per row.
Please advise?
Regards
ma se
|
|
|
|
|
Just create an item template in the gridview. In the item template you can add any controls (including an HTML Table) that you want. From the gridviewrow you can use the FindControl method to access the control.
I didn't get any requirements for the signature
|
|
|
|
|
Hi,
I have one doubt, ie if an application contains different versions of the same assembly my ? is how the application automatically detects the latest version of the assemly.
can anybody helps me and i have one more doubt what you mean by late signing or something like that...
please help me..
Regards
Alex.
|
|
|
|
|
|
i am building a report.rdlc and using the report viewer and i wanted to know how can i hide or unhide columns in my report is this possible? can anyone assist me?
oh p.s. using c# but it doesn't matter if u know how to do it in vb will jus convert it
kenny
|
|
|
|
|
oh..
I have faced the same problem too. But i convert the report to excel and do the work what i required to fulfill only my output.
If u get the some solution please share it
|
|
|
|
|
yes i found a solution what u do is this
step 1
create a dataset with a table that has all the possible columns that you might use in your report
step 2
add all of these columns to your report
step 3
create report parameters for all the columns u want to hide / un-hide
step 4
assign the value of the hidden property for each column to evaluate whether or not to set hidden property to true or false
example set hidden property to =iif(Parameters!param_TicketId.Value="T",True,False)
step 5
assign values to the report parameters wherever you are going to build and run the report
<br />
ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report.rdlc");<br />
ReportDataSource rds = new ReportDataSource();<br />
rds.Name = "spTroubleTicket_AllTableAdapter";<br />
rds.Value = dsReport.Tables[0];<br />
ReportViewer1.LocalReport.DataSources.Add(rds);<br />
<br />
ReportParameter[] param = new ReportParameter[2];<br />
<br />
param[0] = new ReportParameter("param_TicketId", "F");<br />
param[1] = new ReportParameter("param_TimeRecieved", "T");<br />
<br />
ReportViewer1.LocalReport.SetParameters(param);<br />
ReportViewer1.LocalReport.Refresh();<br />
you can do any manipulation you want based on the code above my original code i allowed my users to select the column the wanted to be in the report. and i also allowed them to generate the dataset based on the specific search criteria they chose to use and use this as the dataset.
so in essence i create a data table with all possible columns and added it to my report and then allowed user to hide and unhide columns and generate there dataset to be used on the report dynamically
Kenny Edmond
|
|
|
|
|
p.s if u have any other problem just drop a message here will reply as soon as i see it
|
|
|
|
|
Left mouse click on the column (make sure you are not clicking on header or data cell, you have to click on the column itself (above the header)) that you would like to enable/hide and right mouse click and click on Properties (or hit F4). You will see TableColumn properties. You will have there Visibility property with + sign on the left. Click on + sign and expand Visibility. You will have there Hidden property. You can put your custom code to to view or hide your column. For instance =IIF(Fields!LeadNext.Value = 4, TRUE, FALSE).
Vlad Bezden
|
|
|
|
|
Hello all;
Iam using asp.net 2.0
I have added in web page dataList
<ItemTemplate >
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
<asp:ImageButton ID="ImageButton1" runat="server">
</asp:Panel>
</Item..>
.................
i want to in page load to check the query string if z=true
make panel above visable =true
and if the false make it viat false
I have tried many way to access to the panel but alway give me error
how can I solve that????
------------------nothing help in page_load
//DataList1.Controls[1].Visible = false;
/DataList1.FindControl("Panel1").Visible = false ;
-----------------
aj123
|
|
|
|
|
When will they learn Urgent should not be used in the subject line
only two letters away from being an asset
|
|
|
|
|
<br />
<br />
foreach (RepeaterItem ri in this.Repeater1.Items)<br />
{<br />
if (ri.ItemType == ListItemType.Item || ri.ItemType == ListItemType.AlternatingItem)<br />
{<br />
<br />
YourObjectType YourObject = (YourObjectType)ri.FindControl("YouObjectId");<br />
YouObject.visible = false;<br />
}<br />
<br />
}<br />
I didn't get any requirements for the signature
|
|
|
|
|
Should be used in the OnItemCreated event (without the foreach), not the page load event.
only two letters away from being an asset
|
|
|
|
|
Can you do OnItemDataBound="RepeatedRow"?
public void RepeatedRow(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)<br />
{ <br />
<br />
DataRowView r = (DataRowView)e.Item.DataItem;<br />
if (r != null)<br />
{<br />
<br />
r.FindControl...<br />
<br />
}<br />
} <br />
<br />
I didn't get any requirements for the signature
|
|
|
|
|
You have been a member long enough to know not to use urgent in your message titles.
______________________
stuff + cats = awesome
|
|
|
|
|
I need this sort of working like the Document Object in Access - When user clicks on a link inside my ASP.NET application, Microsoft Word should be launched with some prefilled text. User will then modify the document and close it. Upon closing, the modified document needs to be saved as binary data directly in the database.
I tried using Word.ApplicationClass, it could write a file but not launching the word application.
Thanks
|
|
|
|