I have certain columns in my DataSource such as "ID", "StartTime", "EndTime", etc.I would like to present them a bit differently in the listview.for example, I want to present the "StartTime" and the "EndTime" in ("hh:mm:ss") form, and would like to show only IDs smaller than 10.I thought about writing the code in
I have no problem writing the conditions in code behind, but the question is:since the ListView1_ItemDataBound event handler is fired for every column, how can I know in which one I am concerned, and so which condition to use?for example, if it is a "StartTime" then I want to have (DateTime)item.ToString("hh:mm:ss"), but if it is "ID", I only want to check if ID<5.
I have a forum like page ( vBulletin like page). There are mainly two columns involved. User and Decription. The page looks like this
user pic Subject
user pic Subject
In it , userpic, username, subject and descriptions are to be repeated every time. I used listview for this.. But the column 'download link' is to be used at once only in the first post ( of thread author). So, how can I achieve this. I am using asp.net 3.5 and sql server 2005.
I have a table which has like 450 fields, i want to add edit option to my GridView which allow user to edit the data for that row.i don't wanna write ItemTemplate field for 450 fields, is there a way to get it done automatic query using ListView or GridView whatever is good for it.
I want to display my records in ListView. Per row must have only 3 records. I am using Mysql, The data is connected and retrieved fine. But I unable to configure it's view to "Tiled" Is it possible by using code behind or asp.net source view?
in asp.net page user able to select gridview Columns, and it will hide remaining columns and that selection done by check box with column list bellow is Image link , what exactly I am looking for [URL] it look bellow after selection of column done [URL]
I am simply trying to change the listView template based on a value in the listview data. I do have this displaying the information correctly. Except when I try to change the item template based on a value in the listview. My code is below ....
I have a ListView, I've setup to use an ObjectDataSource, I've created my Layout and Item templates, and I'm able pull and view a list of my data no problem. However I want to add delete capabilities to my ListView and my reference material tells me to go into the "Configure ListView..." option under the ListView's smart tag, the only problem is I don't have that option, the only three options in my smart tag are "Choose DataSource", "Configure DataSource..." and "Refresh Schema", what am I doing wrong?
I have anested ListView control. I also implemented a jQuery to automatically expand the TextBox control inside of the nested ListView Insert Template. The problem is, when the Textbox expand, the outer ListView control is not; therefore, the Textbox control expands underneath the buttons of the outer listView control. How do I expand the outer ListView control as the nested ListView textbox is automatically expand? One great example is in Facebook where if I add a response comment, it'll automatically push any comments below mine down. If nested Listview control is not the best way to do this, what are my options?
Does anyone have an example for how to create a Dynamically Templated Listview with prefernces page to specify which columns & column order)? Also the listview would also have Edit, delete and insert options if possible. And uses the n-tier approach with Bus Layer and does NOT use LINQ.
Is there any way to enable alternative ListView (LV2) or any other control in case when ListView (LV1) returns no records from DB? I already have emptydatatamplate designed for this case, but I need to enable a new ListView below in this particular case and I don't know how to achieve this!
I try to datbind a listview which is inside another listview InsertItemTemplate.
I'm binding the listivew in the parent listview onitemcreated events. I receive the error Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
In a gridview, i have a column which displays an Amount. the amount displayed can be negative / positive. When there is a negative value, suppose for eg, the amount is -15000, in the grid view it showsis there a way where i can increase the width of this particular column.
I am having trouble finding how to solve the following issue :
I am using nested listviews to display Sales and Sales details.
The main ListView displays General Information about Sales and the child ListView displays the detailed information about one sale. the child listview is shown only when the user clicks on a link (see included code, DataBind is made on PageLoad) :
ASPX Markup Code :
C# Behind Code :
If I removed the datapager part, I can manage show/hide the child list view on the button click event. but if I want to use the DataPager with the PreRender event handling, the child listview is not longer shown on button click.