Good Morning,
I am currently working with the RadListView to display 4 columns from a datasource. This all works fantastic and is quite fast. I had originally been using the grid but found it to be a little overkill as all I need to do is display the columbs, allow selecting of a row and loading some data when that row is selected.
I have also worked with the repeater and datalist control from the standard asp.net toolkit but found they were a bit more difficult to get access to controls within the ItemTemplate definitions.
The problem I am runing into is as follows. I need to be able to do the following (all in javascript)
1. When a user clicks a row I need to be able to set teh background color of the row and turn off any other rows. I realize the RadListView allows for a postback but it only seems available if you include a button in one of the columns to generate a ItemCommand. What I ended up doing was placing an onclick event in each <tr> definition that allows me to call a javascript routine. The problem I have is that I can pass a referene to the row and change the background color, but I cannot find a way to access any of the other rows in the listview. Is there a way to get this collection of rows so I can handle the selection piece myself by setting the background color?
2. In the javascript function when I pass the row reference, how do I get to the controls? I know I can do a get_dataKeyValues I believe it's called and I can access the databound columns. This works great, but what if I have a simple checkbox control that I want to set it's value in the javascript function? How do I get access to this row collection?
3. I will be forcing a postback once a row is selected and I need to load the assocaited data, will this postback allow me to update the ListView control through the radajaxmanager?
The biggest problem is being able to turn off and on the background color for selection. The itemSelect command in RadListView would have been nice but it generates a postback which I do not want to happen since many of my editors are on the client side until the user is ready to submit the final data.
Any help would be appreciated.
Raymundo Lopez
I am currently working with the RadListView to display 4 columns from a datasource. This all works fantastic and is quite fast. I had originally been using the grid but found it to be a little overkill as all I need to do is display the columbs, allow selecting of a row and loading some data when that row is selected.
I have also worked with the repeater and datalist control from the standard asp.net toolkit but found they were a bit more difficult to get access to controls within the ItemTemplate definitions.
The problem I am runing into is as follows. I need to be able to do the following (all in javascript)
1. When a user clicks a row I need to be able to set teh background color of the row and turn off any other rows. I realize the RadListView allows for a postback but it only seems available if you include a button in one of the columns to generate a ItemCommand. What I ended up doing was placing an onclick event in each <tr> definition that allows me to call a javascript routine. The problem I have is that I can pass a referene to the row and change the background color, but I cannot find a way to access any of the other rows in the listview. Is there a way to get this collection of rows so I can handle the selection piece myself by setting the background color?
2. In the javascript function when I pass the row reference, how do I get to the controls? I know I can do a get_dataKeyValues I believe it's called and I can access the databound columns. This works great, but what if I have a simple checkbox control that I want to set it's value in the javascript function? How do I get access to this row collection?
3. I will be forcing a postback once a row is selected and I need to load the assocaited data, will this postback allow me to update the ListView control through the radajaxmanager?
The biggest problem is being able to turn off and on the background color for selection. The itemSelect command in RadListView would have been nice but it generates a postback which I do not want to happen since many of my editors are on the client side until the user is ready to submit the final data.
Any help would be appreciated.
Raymundo Lopez