Last post Mar 26, 2011 01:20 AM by duttavr
Mar 25, 2011 02:06 PM|smiely|LINK
<telerik:GridDropDownColumn DataField="SortOrder" ColumnEditorID="GridDropDownListColumnEditor1"
This is getting numbers starting from 0, I want it from 1. How do I do it ?
In edit mode I am setting order for people like ... move no.6 to no. 2.
Mar 25, 2011 02:19 PM|duttavr|LINK
The DropDown is not preparing the data here, Dropdown is bound with a datasourceID.
I prefer you change the query to get the right data whatever you want to bind with this DropDown.
other way your change the data at the time of bind it to dropdown. You would need to be little careful on this second approch when you send the data back to db.
I suggest just change the query you use to bind the data to get right values to disply.
Mar 25, 2011 02:23 PM|smiely|LINK
Thanks Duttavr for replying. I do understand what you are saying. What function will the best to use in SQL?
Mar 26, 2011 01:20 AM|duttavr|LINK
What function will the best to use in SQL?
As per you your query you would need to start numbers from 1. I guess numbers are stored from 0 in DB. am I right?
In this case, can't you just subtract 1 from number whilst fetching the data.
Select EmployeeNumber - 1, EmployeeName from Employee
coming to your other quesion.
"In edit mode I am setting order for people like ... move no.6 to no. 2. "
what is the logic/sequence behind changind 6 to 2. do you want to substract 4 from number?