|
didn't exactly get what you trying to do but I can suggest you can use javascript.
|
|
|
|
|
I would really prefer to do this serverside. Also, the placeholder can contain a number of things, not necessarily a href.
|
|
|
|
|
I have created a data source view using SQL 2005 Analysis Services. But I am lost on how to connect a datagrid to this data source view. Does anyone have any suggestions.
|
|
|
|
|
|
thanks Richard. I am going to try that.
|
|
|
|
|
hi sir
please tell me how to create a dynamic array in asp.net with c# at run time.
help me soon as possible.
thanks
vivek
|
|
|
|
|
|
How about List<object>
Best way to use Dynamic Array in C#.
|
|
|
|
|
rummer wrote: how to create a dynamic array in asp.net with c#
Use ArryList
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
You can use arraylist, hashtable, ordereddictionary, queue, stack etc. Choice depends on your usage.
|
|
|
|
|
Hi all,
I am using C#.NET 2005. SQL Server 2005. Is that possible to have a multiple datavaluefield in dropdownlist? Normally i am using ddl.selectedValue to get value for that selected item. So, can i get 2 or more value under a item?
any suggestions are welcome
thanks in advance.
regards
cocoonwls
|
|
|
|
|
No. Actually there must be only one Value for each Dropdown option.
Also the DataValueField will be unique. If you want to create such thing, you need to use your own dropdownlist.
|
|
|
|
|
you can do this by adding a custom data field to the data source having value as concatenation of the two or more fields that you wanna use as DataValueField.
Then again process/manipulate this value while retrieving the SelectedValue of the dropdown list.
|
|
|
|
|
Hi,
Thanks for both of your kindly help. I have found a solution. I am using concatenation in query and put in the DataValueField.Then retrive it by ddl.selectedValue.split() to get the value in string array.
Here is the example:
Query = Select (fieldA + ',' + fieldB) as Result From Table1
Set DataValueField to Result.
Then, set String[] aResult = ddl.selectedValue.split(',')
Finally get value from aResult[i].
Thank you
regards
cocoonwls
|
|
|
|
|
I make a menu with asp.net.
now there's a problem.
I am Iranian and persian language is right to left. thus the sub-menu should appears in the left of the menu. But I can't set it. Please help me...
Is there any software to make menu for persian language.
|
|
|
|
|
|
Hi, sorry for my bad english, but I'm italian xD!
However,
At this link there is an image that explain you what I want to do.(first look at it!!!)
Link The foto!!
I want when I click on a row of gridview, send me to another page that do see the detail of what I clicked.
For example if I click on the picture of "Alfa Romeo", I must see the detail of the car in another gridview in another page.
The path of the photos is stored in the database in the field 'FotoEsterno'.
Someone can help me?
|
|
|
|
|
for that u have to handle RowDataBound and SelectedIndexChanged Events. Below is the code
protected void gvItems_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect("ToPage.aspx?SelectedItemId=" + gvItems.SelectedDataKey.Value)
}
protected void gvItems_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType==DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(this.gvItems, "Select$" + e.Row.RowIndex));
}
}
Now at ToPage.aspx u have the Id of the Selected Item so you can display the data related to that item as you want to display.
|
|
|
|
|
Waste of time doing a Response.Redirect from a postback event, just use a Hyperlink column.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: Waste of time
Yes He is right Try to use ItemTemplate as Mark suggests
If It Helps Click It as Answer
|
|
|
|
|
But the original requirement was to able to click on datarow not any control in the gridview row. thats why i have prvovided that code. please read the requirement carefully.
|
|
|
|
|
Nisha Agrawal wrote: please read the requirement carefully.
Please look at all of the requirements. The image clearly shows and says the OP want to click on a LINK
only two letters away from being an asset
|
|
|
|
|
yes, it's my mistake. I just followed the words that were written in the main post and ignored the one in the image.
|
|
|
|
|
Ok, it works, because when I click the link, it has this value
"http://localhost:3849/progetto/visualizza.aspx?IDModello=24," but now to see the data, including other photos in the DataList , how should I proceed?
|
|
|
|
|